Support for RAID in grub-setup
Hi all,
I'm a bit behind the schedule I created for SoC (I had some unplanned things happening the last 2 weeks), but I've just committed the RAID support for grub-setup and I'm going to work on LVM support very soon.
Grub-setup will ask Linux for the members of the RAID array that is given as destination device. It will then install on the MBRs of those devices and embed core.img after MBR. If it can't embed the core image it will fail, I'm not sure whether we should support reading core.img from a RAID array...
I let grub-setup put the RAID device directly into the prefix and put -2 in grub_install_dos_part. I've modified make_install_device() in init.c to leave the prefix alone when grub_install_dos_part is -2.
Jeroen Dekkers
Quoted 3 lines · Jeroen Dekkers
I'm a bit behind the schedule I created for SoC (I had some unplanned things happening the last 2 weeks), but I've just committed the RAID support for grub-setup and I'm going to work on LVM support very soon.
Great.
Quoted 5 lines
Grub-setup will ask Linux for the members of the RAID array that is given as destination device. It will then install on the MBRs of those devices and embed core.img after MBR. If it can't embed the core image it will fail, I'm not sure whether we should support reading core.img from a RAID array...
Personally, I like to see that every part can be read from a RAID device, but maybe not so important in reality....
Quoted 3 lines
I let grub-setup put the RAID device directly into the prefix and put -2 in
grub_install_dos_part. I've modifiedmake_install_device()ininit.cto leave the prefix alone whengrub_install_dos_partis -2.
So, if my understanding is correct, core.img is read from a single disk, but the rest is handled in a RAID device, right?
Okuji
At Fri, 28 Jul 2006 00:20:42 +0200,
Quoted 10 lines · Yoshinori K. Okuji
Quoted 5 lines · Jeroen Dekkers
Grub-setup will ask Linux for the members of the RAID array that is given as destination device. It will then install on the MBRs of those devices and embed core.img after MBR. If it can't embed the core image it will fail, I'm not sure whether we should support reading core.img from a RAID array...
Personally, I like to see that every part can be read from a RAID device, but maybe not so important in reality....
It would be possible to calculate how to write the image to the file so it ends up being a consecutive image on the physical disk. But I think it's not worth the trouble, especially given that we can always embed the kernel if we keep the size below the 31k.
Quoted 6 lines
Quoted 3 lines
I let grub-setup put the RAID device directly into the prefix and put -2 in
grub_install_dos_part. I've modifiedmake_install_device()ininit.cto leave the prefix alone whengrub_install_dos_partis -2.So, if my understanding is correct, core.img is read from a single disk, but the rest is handled in a RAID device, right?
Yes, core.img is embedded after the MBR on the specific disk. If you can boot from a disk, it's a pretty safe to assume thatt you can also read core.img for the same disk. Core.img includes the RAID module and that is used to read everything else it needs.
Jeroen Dekkers
Quoted 4 lines · Jeroen Dekkers
It would be possible to calculate how to write the image to the file so it ends up being a consecutive image on the physical disk. But I think it's not worth the trouble, especially given that we can always embed the kernel if we keep the size below the 31k.
It would depend on the user... AFAIK, some stupid Windows software wants to use that region for something else.
Quoted 4 lines
Yes, core.img is embedded after the MBR on the specific disk. If you can boot from a disk, it's a pretty safe to assume thatt you can also read core.img for the same disk. Core.img includes the RAID module and that is used to read everything else it needs.
Nice!
Okuji
At Sat, 29 Jul 2006 13:21:47 +0200,
Quoted 9 lines · Yoshinori K. Okuji
Quoted 4 lines · Jeroen Dekkers
It would be possible to calculate how to write the image to the file so it ends up being a consecutive image on the physical disk. But I think it's not worth the trouble, especially given that we can always embed the kernel if we keep the size below the 31k.
It would depend on the user... AFAIK, some stupid Windows software wants to use that region for something else.
I think the number of people who use RAID and such stupid Windows software on the same hard disk is pretty small. :-)
This is probably different for LVM. But AFAIK we are currently always overwriting the region and booting will fail if the stupid Windows software overwrites that region.
Jeroen Dekkers