[lug] Migrating an existing installation to a new hard drive (fwd)
John Karns
jkarns at csd.net
Wed Mar 13 22:07:08 MST 2002
Oops, forgot something regarding running lilo on the copied fs. Before
running lilo, you should create a copy of the lilo.conf in /mnt/etc, e.g.,
/mnt/etc/lilo.conf.new. Then change the "disk =" reference from the
original device, to reflect the device of the 2nd hd. Then execute lilo:
- after the copy is complete, "cd /mnt; chroot . sbin/lilo -C
/etc/lilo.conf.new"
But it may be easier just to boot from a rescue floppy or CD and run lilo
with the new disk replacing the old.
----------------------------------------------------------------
John Karns jkarns at csd.net
---------- Forwarded message ----------
Date: Wed, 13 Mar 2002 20:37:33 -0500 (COT)
From: John Karns <jkarns at csd.net>
To: BLUG <lug at lug.boulder.co.us>
Subject: Re: [lug] Migrating an existing installation to a new hard drive
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