[fmt'd accidentally]
> Actually, I'd suggest something slightly better: Instead of writing
> kernel chunks only on the first disk, those chunks may as well be
> written on each disk, and you'd end up with a complete bootable
> kernel on each disk. The advantage is that if you loose a disk in
> a Raid 4/5 configuration, you still have a working kernel on each
> of the other disks, and you can still boot in degraded mode.
This solution seems the best of all that I've heard so far. Reserve a
certain amount of space at the beginning of every partition included in a
metadisk; 2 MB? A kernel and initrd image (if any) are copied into each
component partition, in that first 1-2MB reserved space.
Then booting off a metadisk is simple. Just list the component partitions
on the kernel command line, line
append = "md-root=linear,/dev/sda1,/dev/sdb1,/dev/sdc1"
or
append = "md-root=raid1+0,/dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1"
or
append = "md-root=raid5,/dev/sda1,/dev/sdb1,/dev/sdc1"
or
append = "md-root=raid1,/dev/sda1,/dev/sdb1"
...
md yanks the kernel and initrd off the first partition it finds.
Installation is even easy... :)
cat vmlinux.gz initrd.img.gz > mdimage
dd if=mdimage of=/dev/sda1 bs=1024k # md part 1/3
dd if=mdimage of=/dev/sdb1 bs=1024k # md part 2/3
dd if=mdimage of=/dev/sdc1 bs=1024k # md part 3/3
You probably want to MD5-sum the 2MB kernel/initrd space and write disk
offsets, so the above example is a simplification.
How does that sound?
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html