General discussion


Moving Linux install to new machine

By brian ·

I have a Linux server set up with 2 hard drives, both IDE. The main drive has 3 partitions. A swap and two others. The second drive is insignificant. The system is uses the Grub boot loader.

I just inherited an HP NetServer E50 with 2 18GB Ultra/Wide SCSI drives, connected to an Adaptec AHA-2940 (AIC77xx). I wish to move the whole installation from the old server to the new one. As I said, I'm not real concerned about the 2nd HD. I can copy that data later once it's up and running. My problem is obvious: going from IDE to SCSI, different video, NIC etc. The video and NIC are not a big deal. I can deal with that once it's running. But how would I go about doing a "clean" transfer? I know there will be issues with the mtab, fstab, /dev and /mnt directories.

Is there a straight forward method to doing this?


This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by les In reply to Moving Linux install to n ...

Not that i am aware of....Here's your best bet:

Assuming your using redhat....

Load up a default install of Redhat on the new box.
This should take care of all the hardware related stuff.

Now add your ide drive into the new machine. You should be able to use fdisk and e2label to see all the partitions (e.g. /dev/hda1 = /, /dev/hda2 = /home etc)
Mount these partitions on mount points in your current filesystem.
When im doing this i always like to make meaningful mount points, for example if i wanted to mount my old root filesystem i would make a directory called /mnt/oldroot, then mount the old root partition from the old ide drive.

Once i have the drive mounted and can see the old contents i would selectively copy config files, cut and paste passwd, group, shadow, gshadow files etc and for data filesystems i would usually just do a "cp -R".

There is no easy way to migrate data between differently configured servers. If your machine is fast the redhat will install quickly (1/2 hour max) then say another hour for restoring data and merging config files etc (or longer depending on the amount of data you have).

Related Discussions

Related Forums