Moving Ubuntu boot drive from one PC to another

I’m upgrading one of my computers, and I want to simplify (I hope) the process by simply moving the boot drive from the old computer to its new computer home. This will mean that the drive will go to sleep in a house with a Celeron 800 and 512MB of RAM but will wake up in a house with a Pentium 4 2.4 and 2GB of RAM*, with all the related changes in the ways the magic smoke has to find its way around.

At any rate, my main objective in this is to avoid having to re-do all the tweaks, installations, and customizations I’ve made to Ubuntu in the year and a half or so I’ve been using it. But my question is, will the OS recognize all the changes that need to be made and make them, or am I likely to encounter craziness when it tries to act like it’s still in its old Celeron-driven house?

*I said it was an upgrade, not a modernization.

I can’t give a definitive answer and it has been at least a year since I last used Linux seriously. (My current laptop and now sole computer hates Linux and I decided it was better to use Windows than to try to fight with it)

However, the one time I tried this, on a whim, from an AMD K6-III 500MHz machine with 256MB RAM to an AthlonXP 2600+ with 1GB RAM (along with a host of other minor differences), the result was pretty messy and I had to redo a lot of etc files before I had a working machine again.

However, that was Gentoo, which is, for the most part, the devil incarnate. I’m not sure if Ubuntu would react differently. It was also several years ago.

If the video has changed significantly, you might expect X.org to complain. Some other drivers might need to be recombobulated. IME, Linux is pretty fickle WRT hardware, but, again that experience is quite dated. When I switched to Ubuntu, I never tried that again as I never had much reason to.

I’m pretty sure this won’t work with any OS. Any number of drivers, kernel options, and other hardware-based changes will be different and incompatible. Pretty much everything that the installer originally set up will be wrong. You might be able to make it work, but I have to imagine the resulting computer will always have…personality.

I did it with Ubuntu, and its not a good idea, unless the machines are similar in terms of things like videocard, soundcard, and motherboard, you’re gonna have problems. When I did it (with those kinds of differences), I couldn’t get it to work. It either wouldn’t fully boot, or if I could get it to boot fully, the display was so garbled that I couldn’t see to even try and fix things. You can do it with Windows installs, but Linux doesn’t like it, for some reason.

Yeah, that’s my experience. If the motherboard stays the same, you have some hope, but I pretty much had to rewrite damn near everything and install a new kernel. It worked, but it would’ve been easier to have just installed anew.

Tuckerfan: I’m no expert, but I know that a standard Windows install tends to include generic drivers for just about any configuration of hardware that it could run into. The Linux kernel doesn’t work quite like that and tends to be a bit more specific to the machine. Sometimes it will work, but other times, it needs to be rebuilt for the new machine and appropriate drivers need to be installed and etc files reconfigured. Just not worth it, IMO

Thanks, all. :slight_smile:

Something in the back of my head told me it would wind up being more trouble than it was worth. Color me dissuaded. Glad I kept a list of all the installs I added along the line.

Keeping a history of everything you do is always a good idea. It might even be fun as you go through that list on the new install to see how your install has changed over the years. Kind of a, “Baby, look how far we’ve come”-type moment. :wink:

Assuming you haven’t compiled a new kernel, I bet it will boot, but who knows what will happen after that. I’ve used old Linux boot discs to recover different distros on new computers before. I’m not familiar with Ubuntu but most flavors of Linux start out with generic kernels that work with almost anything. That’s how they are able to install, they load generic kernels to run the install program. Some just keep the same kernel to run things after the install.

I always like upgrading. It’s a good chance to get things set up the way you want without any mess. Sort of a spring cleaning type thing.

I think it might well work. As others have mentioned, the Ubuntu kernel is generic and should be able to boot on almost any machine. (After all, the LiveCD can boot on almost anything, and it uses the same kernel.) With the latest version (8.10), X (the graphics subsystem) automatically detects the graphics hardware without needing a configuration file. I can’t think of anything else that would be hardware-dependent.

It will almost certainly work fine. Unlike Windows, which makes assumptions about the hardware based on information recorded in the registry, the Linux kernel probes the hardware and then loads the appropriate available modules on boot, every time. So even copying the disk from an IDE based system to a generic SATA drive will boot up ok (try that with a windows OS). Of course, if you compile your own kernel with a specific set of features for your hardware (as you might with a source distribution like Gentoo) you may have issues with missing modules. Just have a quick check to ensure that the kernel supports all the hardware in the new system while it is in the old system. For Ubuntu, this should be the case - download a LiveCD for your current Ubuntu distribution and boot it on your new system as a test.

The other issue is the Video server. Before autodetection was added, you could get caught out by changing the video card - the xorg.conf contained information on the video card driver and mode lines for the display, and changing hardware underneath that caused all sorts of grief (up to and including kill a CRT based monitor). You may still get caught now if you have loaded a proprietary kernel module for a Nvidia/ATI graphics card. I would revert to Xorg opensource drivers before the system switch.

I have regularly updated my Linux server (sme, a Centos based system) by swapping the hard drive into a new box, and it always just works. I’ve moved physical linux installs to virtual machines and back, and even swapped linux between physical and virtual booting, no problem. And I’ve swapped hardware around - with the caveat of being careful with the video settings, it is absolutely fine.

Si

I fairly regularly install a basic debian system from the same disc image to different machines and it always works fine. Areas which may need manual tweaks are video drivers and configuration and IME the network can “move around” (for instance, some machines move eth0 to eth4 while booting for some reasons). Since you’re moving the drive itself, there’s probably not going to be any problems with mount points etc.

Just make sure you’ve got a bootable linux lying around so you can tweak the configuration if the system won’t boot properly. I like http://www.sysresccd.org/

I like sysresccd, too. :slight_smile:

Well, the opinions got mixed on this, but I think I’d already made up my mind to just re-build my system from a new install of Ubuntu.

Hell, I had been meaning to getting around to upgrading to 8.04 anyway. :slight_smile:

Okay, just to put the cherry on this thread, I decided yesterday, “What the hell?” and actually wound up doing two full brain transplants.

The original computer referenced in the OP above was a Dell OptiPlex GX150 running Ubuntu 7.10, which I upgraded to a GX260 (specs in OP). I pulled my boot drive, a data drive, a DVD multidrive, and a PCI SATA controller card out of the GX150 and moved them into the GX260. There was a brief hiccup in getting started back up, but the biggest problems I’ve had stem from my decision to go ahead and upgrade to Ubuntu 8.04 “while I was there,” which has resulted in my hosing my WINS and my SAMBA access to the data drive, which I use for network backups. No biggie. I configured 'em once, I can configure 'em again.

Fresh off that success (and before I’d hosed things with the software upgrade), I pulled my ancient Dell OptiPlex GXa (Pentium II 300, 384 MB RAM) out from it’s dark hiding place under my desk and extracted its boot and data drives, its PCI USB 2.0 card, and it’s 5.25" floppy disk drive and transplanted them to my Dell OptiPlex GX1p (Pentium III 450, 768 MB ECC RAM) which I thought died last spring, but which it turns out only needed a long rest and a new boot drive. The boot drive is set up to boot either Win98 or DOS-Win3.1, and after some extensive driver shuffling and a few reboots, the Win98 partition seems to be better than ever. I haven’t tried the DOS-Win3.1 partition yet, but since I don’t network those and they use a generic SVGA driver, I don’t anticipate any problems at all.

Verdict: brain transplants can be done!

Just wondering… why don’t you get Ubuntu 8.10 “while you’re here”? :slight_smile:

6 months is a long time from a computer software development standpoint.

Because (a) 8.04 is LTS and (b) you can’t go directly from 7.10 to 8.10 through the “click here to upgrade to the newer version” button.

Besides which, dude, I’m running 5 year old hardware. Do you really think 6 month old software is going to be a big crimp in my style? :slight_smile:

Preach it brother, preach it !!! :smiley: