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

John Karns jkarns at csd.net
Wed Mar 13 18:37:33 MST 2002


On Tue, 12 Mar 2002, BOF said:

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

What I usually do in such a case is (as root):

- mount the destination disk (e.g. at /mnt)

- mount all the partitions on the destination disk (/mnt/usr, etc.)

- issue the command (as one long command - it's wrapped here)

find / \( -path '/proc' -prune -o -path '/mnt' -prune \) -o -print | cpio
-p -dmuv /mnt

(using 'V' instead of 'v' as a cpio parm will speed things up slightly, as
it won't print the filenames but rather a '.' for each

- after the copy is complete, "cd /mnt; chroot . sbin/lilo"

----------------------------------------------------------------
John Karns                                        jkarns at csd.net




More information about the LUG mailing list