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

D. Stimits stimits at idcomm.com
Wed Mar 13 19:54:14 MST 2002

Btw, something that can simplify a clone is to do it while running from
a rescue cd, with the source disk mounted read-only. Trying to clone
from an active disk adds some complications, especially if a journalling
filesystem is involved.

D. Stimits, stimits at idcomm.com

John Karns wrote:
> 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
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug

More information about the LUG mailing list