[lug] Duplicating the Boot partition on a second drive

rm at mamma.varadinet.de rm at mamma.varadinet.de
Fri Mar 23 14:53:15 MST 2001


On Fri, Mar 23, 2001 at 02:45:03PM -0700, J. Wayde Allen wrote:
> 
> I'm currently trying to decide how I'm going to partition two hard drives
> on a server I'm building, and would like to create two bootable
> partitions.  My thought is that I can create a bootable root partition on
> the first drive (/dev/sda1) and a similar bootable partition on the second
> drive (/dev/sdb2).  I would then like to make /dev/sdb2 a copy of
> /dev/sda1.  The idea being that if drive 1 fails I "should" be able to
> boot the system off of drive 2.
> 
> What is the best way to copy /dev/sda1 to /dev/sdb1?  Can I just do a cp
> or should I use something like dd or cpio?

At least the master boot record (and the LILO part) can't just be
copied since they store references to disk sectors/partitions.
I usually run lilo with the -C switch to give it the right configuration
file and the -r switch to chroot to the right disk. 

Now, the only thing i'm longing for is a way to tell LILO to
try a fallback root partition if the main one fails. Any
ideas ?

 Ralf



More information about the LUG mailing list