There is no need for all this complication. At the start of the first disk create a 
small
partition /boot
which contains the kernel and lilo files (chain loader etc) i.e what is normally in 
/boot.
Create a
small linux installation (which can also be used as a rescue from a non bootable raid).
Create two
bootable images which boot /dev/sda2 (rescue) and /dev/md0 (raid) with a raid capable
kernel and make the raid
/dev/md0 whatever way you like. Mark the partitions with id 0xFD and install your 
favourite
distribution
to the raid partition. Reboot and select the raid menu option in lilo when the machine
comes up.
Voila, your'e running on raid root!

Brian Murphy


Thomas Seidel wrote:

> You're right. LILO doesn't like to install itself to a root raid1 partition
> (LILO: "Sorry, don't know how to handle device 0x0900"). On the other hand,
> the kernel image MUST be loaded from ONE of the mirrored devices. My way to
> solve this chicken-and-egg problem is described as followed:
>
> - create the root raid1 partitions as usual (mark one partition as failed, as
> discussed here before). There is no need for a seperate non-mirrored /boot
> partition.
> - install linux to the working (non-failed) partition
> - create lilo.conf (change the device names as needed):
> # Start LILO global Section
> boot=/dev/hda
> #compact       # faster, but won't work on all systems.
> read-only
> prompt
> timeout=50
> vga = normal    # force sane state
> # End LILO global Section
> #
> # The root fs is on /dev/md0
> # The kernel will be fetched from /dev/hda2
>   image = /boot/vmlinuz
>   root = /dev/hda2
>   label = Linux
>   append = "root=/dev/md0 md=0,1,0,0,/dev/hda2,/dev/hdc2"
> #
>   image = /boot/vmlinuz
>   root = /dev/hda2
>   label = LinuxNoRaid
>
> - run lilo
> - change /etc/fstab ( / will be mounted from /dev/md0 )
> - reboot. Lilo will load the kernel from /dev/hda2. The kernel start /dev/md0
> and set /dev/md0 as the real root device. The resync thread starts syncing the
> root partition.
>
> If you have to use lilo again, boot with LiloNoRaid, do the changes, run lilo,
> and reboot.
>
> Thomas
>
> >

Reply via email to