[lug] Migrating an existing installation to a new hard drive

Bear Giles bgiles at coyotesong.com
Wed Mar 13 00:14:19 MST 2002


> What would be the best way to move an existing Linux installation as an 
> exact copy to a new hard disk?

The classic solution is to use 'cpio' in 'pass-through" mode.  That will
copy the files and directories while preserving the permissions.

Or you could do real backups, restore them, then compare original
and new disks.  That way you'll know you have a set of good backups. :-)

In either case, you'll need to run LILO (or whatever) at some point
to set up the bootloader.  That's a common oversight.

....

That said, I'm a big fan of reloading the system from primary source,
not backups.  The reason is simple - it eliminates any risk of corrupted
files, bad configurations, etc., migrating from your old system to your
new system.  Unless you're installing from old CDs, you'll also pick
up bug fixes, newer versions, etc.

In this case, the process is straightforward:

1) figure out what packages you have installed now.

2) swap the disks, install software from packages onto the naked disk.
You should have a bootable disk when you're done.

3) configure the packages using guidance from your existing system.
At this point it's extremely convenient to mount your old / under
/mnt.

4) finally copy your old /home to your new /home with cpio.

This is a bit more work than cpio, but it's also a good way to 
eliminate any old cruft from the system.




More information about the LUG mailing list