[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Linux mirror on a second hd



>I'm looking for a software utility to mirror my Linux hd on a second hd ?
>
>I've two 4.2 Go IDE HDs. The first one contain the linux root partition,
>a second partition for data and the swap partition. The second is free to
>use for backup.


Simply use dd   ....   `man dd' for more info.

Basically, you should be able to do something like:

dd if=/dev/hda of=/dev/hdb

But, I've had trouble with that for some reason.   What I've ended up doing
is:

cfdisk /dev/hdb    # to create partitions on the second drive to match the
first.

dd if=/dev/hdaX of=/dev/hdbX     # replace X with each of the Linux
partitions to duplicate

Then, all you'll need to do is create a Linux boot disk that you can boot
from (with the new drive as the new master) and run liloconfig to reset the
MBR, etc.

One final thing:  Make sure you append the "bs=10485760" or something to the
"dd" commands above.  See the man page for more info, but this will
*significantly* speed things up.  (i.e. hundreds of percent faster).

To create a Linux boot diskette above, just find out which kernel you're
booting now (look at /etc/lilo.conf) and then do a:

dd if=/path/to/kernelfile of=/dev/fd0

to put the kernel onto a floppy.  You can boot directly off this.

Later,
Kevin


Reply to: