Upgrade motherboard and CPU without reinstall

19

2

I have a home server running Ubuntu 10.04. I want to replace the motherboard and CPU without reinstalling the OS. I read a long time ago that this would sort of work on Windows XP, but with stability issues. However, I have a hunch that on a modern Linux there shouldn't be any problems.

Am I right?

Bart van Heukelom

Posted 2010-09-02T18:19:52.347

Reputation: 1 958

Don't know about the linux, but that is NOT true for XP. The hangup with XP would be all the onboard device drivers. I have tried this and unless you are extremely lucky, you wont be able to boot. You can sometimes boot into safe mode and then manually install the drivers if you have removable media like a floppy drive, but it wasn't worth it. – JNK – 2010-09-02T18:27:58.347

1Uh... I've done this recently XP AND linux (Xubuntu in this case) with few issues. The autoconfig systems on both are competent enough to handle the hardware changing without too many issues. – Fake Name – 2010-09-29T04:14:08.557

Answers

18

This should work fine overall for most modern Linux setups. Until last week's rebuild of my home server (moving from Debian/Lenny to Ubuntu/10.04 and installing a set of shiny new drives to rebuild onto) it was on it's third CPU+mobo combination and both switches of CPU+mobo worked fine. Also, when a work file server died a while ago we just transplanted the drives in another completely different box and everything worked just fine (all relevant hardware was detected, the software RAID arrays assembled fine, and so on) aside from the network device numbering issue I'm about to mention.

It is not unlikely that there will be some reconfiguration work to do due to differences in device enumeration. The motherboard's on-board LAN controller will most likely become eth1 if the previous board's was eth0 for instance, and in this case you will need to make some changes to either configure eth1 and any firewall/routing rules accordingly or reconfigure udev to remove the reservation for eth0 from the old NIC and set the new one to have that name (the file to change for this appears to be /etc/udev/rules.d/70-persistent-net.rules under Ubuntu's default arrangement).

There may be similar issues with drives getting named/numbered differently especially if you have several, but Ubuntu identifies partitions by UUID by default, as do the kernel's LVM and RAID support for identifying their volumes, so this should not be an issue in most cases.

I would not expect any problems that would simply stop booting completely (you will be running a pretty new kernel with 10.04, so shouldn't need to worry about the new board having hardware too new for the kernel to properly recognise), and if there were any such problems they could probably be fixed with a little jiggery-pokery after first boot or from a LiveCD, but I would recommend taking fresh backups of important data/configuration anyway, just-in-case.

In the above I'm assuming you are using one of the stock Ubuntu kernels. If you are running a custom kernel+modules more care is needed, as you may have left out things needed by the new board but not the old, but if you have installed a custom kernel then you'll be aware of the relevant things to be aware of here!

Windows XP or later can often survive a motherboard switch-over (after many reboots and perhaps a visit or two to SafeModeLand to sort out drivers) as it isn't nearly as pernickety as it was in the NT days in this regard as long as you are using the standard windows drivers for your I/O controller rather than something specific to the motherboard, but it is a much less safe bet than with Linux. A big enough jump in CPU/mobo tech (from single core single CPU to SMP and/or multi-core perhaps) which mean a different HAL being needed (or just a different one being optimal) will either cause Windows to fail to boot or fail to make proper use of the new hardware.

With any OS, if you are using your current motherboard's RAID controller (which will be a "fake-RAID" arrangement) for RAID instead of having it operate as a bog standard PATA and/or SATA controller then all bets are off and you will most likely need to reinstall. As Bob suggests, moving down from 64-bit to 32-bit would require a reinstall too. And also for any OS, having a second machine available is a useful safety net in case you need to get online to grab revised drivers or research some other problem that takes your main box temporarily out of action.

David Spillett

Posted 2010-09-02T18:19:52.347

Reputation: 22 424

6

I agree with JNK...this would NEVER work on pretty much any Windows machine. They are too finicky and you'd get BSOD pretty much right away. Linux is more forgivable however. I moved my HD to another machine, and booted from it once (a while back!) and kudzu just detected everything as new hardware and installed drivers for it. My system ran fine, and was pretty stable. Of course, you should make a backup before trying anything like this, even though your data should be safe.

Sean

Posted 2010-09-02T18:19:52.347

Reputation: 69

WRONG! Just finished doing a mobo swap between two of my computers. (One XP, one 7). I had to clear the CMOS on one, and find the driver CD to install the USB system drivers on the other (thumbdrives didn't work until they were installed), but it is completely doable. – Fake Name – 2010-09-29T04:15:48.850

2

This should work fine with Ubuntu. All your hardware is detected on boot, and the appropriate "drivers" (kernel modules) loaded. This is, of course, assuming you aren't doing anything silly like putting a 32bit CPU into a box running 64-bit Ubuntu or anything.

Bob

Posted 2010-09-02T18:19:52.347

Reputation: 214

I'm currently running 32-bit. The new CPU is a gift. I don't know exactly what it is, but it should be loads better than what I currently have, so it might be 64-bit. I presume that won't be a problem, since there is backwards-compatibility? Any overhead added there should be dwarfed by the new CPU's betterness. – Bart van Heukelom – 2010-09-02T18:51:22.133

@Bart If the CPU is AMD64 (most new ones are, including new Intel chips), then it will be fine, it will just run everything in 32-bit mode. If it's an Itanium (unlikely), that is running the IA-64 architecture, that will NOT run your existing 32-bit OS. – Bob – 2010-09-02T18:55:37.703

32- vs 64-bit is arguably the least of your problems.

Again, I'd strongly urge you to: a) reconcile yourself to "backup/restore" as the safest, most straightforward way to go b) test your backup/restore procedure ahead of time – paulsm4 – 2010-09-02T19:43:08.080

If you go from 32-bit-only to 64-bit-capable and don;t reinstall Linux completely, you can install a 64-bit kernel but keep using the 32-bit userland (just run aptitude install linux-image-2.6-amd64 in Debian and it'll do the rest) meaning you can take some advantage of RAM above 4Gb (or above 3.25Gb depending on your chipset) without a reinstall. – David Spillett – 2010-09-02T19:58:15.047

1Anyone who has actually worked with Itanium boxes is almost certainly not hanging out on superuser.com. – ThatGraemeGuy – 2010-09-02T19:59:48.167

1

Success! Not a snap but what happened was: I changed to quad-core AMD (motherboard had failed) not wanting complete reload over my recent Ubuntu kernel. Linux started but only reached a splash screen no login. On the GRUB menu I tried recovery/safe and also limited graphic mode choices also the GRUB terminal still did not get to solution. At the splash screen where I would login, Although I could not see anything, I then typed my user name then Enter, then password then Enter and the login started. Next was the plain desktop background but no icons or buttons :(. Keystrokes Cnt-Alt-T did not pop up terminal. **Then I tried gnu shortcut Alt-F2 and 2-second pause a beautiful command prompt popped up :). It said welcome and upgrade recommended please type do-upgrade- something I did it after a 3 hour upgrade all works fine. Ignore errors. Best luck with yours.

John Hadley

Posted 2010-09-02T18:19:52.347

Reputation: 11