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
> On Thu, 22 Jul 1999, Mark Ferrell wrote:
> > I could be off my rocker, but I believe the answer your looking for is the fact
> > that Lilo cannot correctly use a raid for booting. Typically I would imagine you
> > would settup / as the mirror, and perhaps make a /boot that's it's own non-raid
> > partition for kernel images and such, thusly lilo would be able to handle the
>images
> > correctly. This is something I have done for a Raid5 / partition and it works
> > fine.
>
> With RAID5 that (LILO not understanding how to read a RAID volume) is a
> genuine issue.
>
> With RAID1, though, each root partition image is an intact and complete
> partition, and should be useable by LILO. The only real problem is that
> LILO refuses to use it at LILO install time since it thinks "/" is on md0
> (or whatever) and it doesn't know how to deal with that.
>
> If I could just find a way to tell LILO that md0 is actually sda0, I think
> LILO would be able to boot RAID1.
>
> -Andy
>
>