Re: [Nolug] Cloning hard drives

From: Scott Harney <scotth_at_scottharney.com>
Date: Thu, 17 Jul 2003 10:22:55 -0500
Message-ID: <87lluxqisw.fsf@zenarcade.local.lan>

mah@everybody.org (Mark A. Hershberger) writes:

> The master disk (the one you are copying from) is mounted under
> /mnt/master. If you have separate partitions, they are mounted under
> there as well (e.g. /mnt/master/usr for the /usr partition). The
> disk you are copying to is mounted under /mnt/slave and has
> partitions large enough to hold the data that is on the master.
> Following the above example, the slave disk's /usr is mounted under
> /mnt/slave/usr.
>
> Copying the data is fairly simple:
>
> # (cd /mnt/master; tar cf - .) | (cd /mnt/slave; tar xf -)

The only thing I would add to this is to run your OS off of a CD
distribution or a different HD than your source or destination disk.

I would also add "p" to the slave side of the tar to preserve
permissions. ie. "tar xpf -"

> Of course, you still have to have something on the MBR, but I guess
> you knew that. (I recommend grub).

This is one place where dd would be appropriate. Assume master disk
is /dev/hdb and destination disk is /dev/hdd. You have grub or LILO
on the MBR of /dev/hdb.
dd if=/dev/hdb of=/dev/hdd bs=512 count=1

-- 
Scott Harney<scotth@scottharney.com>
"...and one script to rule them all."
gpg key fingerprint=7125 0BD3 8EC4 08D7 321D CEE9 F024 7DA6 0BC7 94E5
___________________
Nolug mailing list
nolug@nolug.org
Received on 07/17/03

This archive was generated by hypermail 2.2.0 : 12/19/08 EST