Click to See Complete Forum and Search --> : Migrating installed Linux to a different computer - a report


saikee
08-27-2007, 07:30 AM
Migrating installed Linux to a different computer

This thread is to record Linux's ability of being moved from computer to computer. The systems are about 3 years old with kernels ranging 2.4.20 to 2.6.14. This is not intended as a viable method of moving installed Linux systems but serves to inform what happen if a user brutally removes a Linux hard disk and installs onto another PC.

I have one PC with 5 hard disks. It is an ongoing experimental system originally installed with 100+ systems (http://www.justlinux.com/forum/showthread.php?threadid=143973) later expended to 145 (http://www.justlinux.com/forum/showthread.php?t=147959). Currently it is loaded possibly more than 165 systems. This project is coming to an end because the kernel 2.6.20 and newer no long accept a Pata hard disk with 63 partitions, which are what I have in my had, hdc and hdd disk. I stop because new Linux cannot be installed into this PC simply because new kernels do recognise more than 15 partitions in a Pata disk.

What I am doing is just to use a cloned copy of the had disk hda and put it in a newer computer and tried to use the 63 partitions in the new surrounding. The hda3 partition of this disk has a fat16 partition which I have installed Grub inside for booting all the 145 systems by chainloading. The same menu will work in any other PC.

Original PC hardware details : Asrock 939NF4G mobo, AMD64 3200 CPU, onboard video configured as “vesa”, Onboard nic Realtek 8210CL 10/100 Ethernet and Realtek ALC850 7.1 audio codec onboard sound card.

Newer PC hardware details : Abit AW9D-Max mobo, Intel E6700 Core 2 Duo, XFX Geforce 7600GT video configured as “nv”, Onboard PCI-E Gigabit Lan 10/100/1000Mb Ethernet and Abit Audio Max 7.1 CH on board sound card. To conduct the test I temporarily remove the hard disks in this newer PC so that it only boots the cloned hard disk from another computer.

The technical hurdles the Linux distros have to cross are

(1) A completely different CPU and chipsets
(2) A completely different video
(3) The newer PC has already the Cdrom occupying the as disk hda position and so the hard disk, originally installed as hda, is now recognised as a hdb (from a master changed to a slave on an IDE cable)which is still the first bootable hard disk. Due to this change none of the original boot loaders work.

(Note: I could have saved myself a lot of work if I swapped temporarily the IDE cable positions so that the hard disk booted up as a hda disk but I needed a bit of challenge and went for configuring the boot loaders instead)

Item (1) and (2) are left to the distros to sort themselves out as I did not intervene. To make the 62 partitions boot (one of the 63 partitions is the extended partition which cannot hold an operating system) I have to carry the following modifications:-

(a) Alter all partition reference of hda to hdb in each /etc/fstab.
(b) Alter all partition reference of hda to hdb in each /etc/lilo.conf if the distro uses Lilo and in /boot/grub/menu.lst if it uses Grub (or grub.conf instead of menu.lst for the Red Hat family).
(c) Restore each boot loader using “lilo –b /dev/hdbx” or “grub-install /dev/hdbx”, where x is the partition number.
(d) For some distros I had to build the device names hdb1 to hdb63 because the original hdb device was a Cdrom, using a method previously posted in the forum (http://www.justlinux.com/forum/showthread.php?t=147954).

Results

3 primaries partitions work without any modification. They are Dos 6.22, Win 3.11 and a Data-only partition hosting Grub booting all systems by chainloading.

Two of the partitions were repeated elsewhere (could not explained why but it was a backup disk and not the working copy).

17 Linux distros failed to boot in the new PC. They are

Mandrake 9.2
TurboLinux V7
Arklinux 2006-1
Debian Woody
Kalango 3.2
Re Flag 4.1
Linare 2
Tinysofa 2
Specifix 0.15
PCLinuxOS 0.91
Ubuntu 6.04 Dapper
PCLinuxOS 0.92
Net Secl 2
Suse 10
Grml 0.6
Karamad 1.4.2
Elive 2

The following distros boot successfully after being moved to the new PC

Puppy 1.0.6
VideoLinux 2
Red Hat 9
Lycoris 4
Libranet 2.8.1
Mandrake 10
Yoper 2
Knoppix 3.6
Buffalo 1.5
Kanotix 9.2004
Blag 30001
Fedora Core 4
Debian Sarge
Slackware 10
Xandros 201
Vine 3.2
Ubuntu 5.04
Asian Linux 2
Wolvix 1.0.4
Mepis 3.4.2
DreamLinux 1.0
Slampp 1.1
Slax 5.0.6
Vector 5.1
Kororaa 2005
Smgl 0.95
Lunar 1.6
Foresight 0.93
SkoleLinux Sarge
NepalInux 1.0
Klax 3.5
SciLinux 2005
Progeny 2
Whax 3
Troppix 1.2
TopologicalLinux 6
Haansoft 2006
Fedora Core 3
Scientific Linux 4.0
Slynux 2.0

40 of the distros make it.

Some interesting observations

(i) The distros are operational using “vesa” as the video driver.
(ii) Red Hat family distros detect the hard ware changes and ask permission to “remove configuration” and then “configure” the new hardware discovered.
(iii) Many of the distros in the Pata disk has been migrated 4 times. This is to say distro like Red Hat 9 was first installed in Computer A, then migrated to Computer B, then Computer C and now finally in Computer D simply by attaching the same hard disk (or a clone) to the new computer. I am rather sad to see Debian Woody3.0, with the oldest 2.2.20 kernel, didn't make it.
(iv) A couple of distros obviously hung on booting. Most report kernel panic- not syncing:VFS:unable to mount root fs or unknown block.
(v) The booted up systems still need a lot of work to get the network and sound card drivers changed.
(vi) Some older versions of distros failed to boot but newer versions were successful (Mandrake and Debian) Ubuntu went the opposite way.
(vii) Smaller footprint distros like Puppy, the Slax family (Slax, Whax, Slampp and Wolvix) and the Knoppix family have no fear of being moved around. They are very adaptable.

I am running only Sata disks in the newer computer with newer Linux distros and have no intention of migrating the old systems or hard disk over. I did it just to see how the Linux are coping with new hardware and am pleasantly surprised to see how well it performed.

Conclusions

40 Linux out of the 57 distros booted successfully in a new PC. This a 70% of the installed Linux.