How do I install GRUB on a RAID system installation?

My problem turned out to be that I had GUID partition table since my drives were 2TB each. The method I originally tried to follow didn't assume this, and so installing GRUB didn't work.

Instead, you should make a small (1MB) partition on each disk and RAID them together and set it as a GRUB boot partition (I'm not sure of the actual name). Set up your other RAID partitions (e.g. swap and /) and then the GRUB installer should find the boot area just fine.

(On Debian this is called a reserved BIOS boot area.)


Many of the answers here are just plain incorrect, telling you to disable BIOS RAID! The correct solution is at this blog entry. I'll summarize it below.

At the stage of the install where it is attempting to install GRUB it will detect as

/dev/mapper

This is incomplete! That's why the GRUB install fails.

You need the actual name of the RAID array to install to. So during that step, press ctrl+alt+F2 to drop to a busybox terminal, then enter

ls -l /dev/mapper

Pick out the name of your array from the list shown, then press ctrl+alt+F1 to switch back to the install (you can switch back and forth as much as you like with no problems) and enter it in the field as

/dev/mapper/{your array name}  

then GRUB installs perfectly and you're ready to go, with a proper BIOS RAID array intact.


A slight variation on @root45's recipe got me going (on an Ubuntu-only system). I didn't make the bootable partition part of the Raid array.

I created a small bootable GRUB partition (I chose the partition editor's option: "use is 'bootgrub'" or something similar) and did not make it part of the Raid device along with the swap and data (/) partitions.

You can rewrite the Grub2 data to the 'bootgrub' partition at any time .... as indeed the installation process will, on your behalf, when given the choice after all your selected packages have been installed; or at any time later if corrupted with grub-install /dev/sda changing the 'sda' to the device of the partition you used in 'step one' above to be 'used as "bootgrub"'.

If you choose to cause the installing of the many packages in a LAMP server, for example, it can be quite a while after partitioning before you get asked about writing the Grub2 data to the hard disk ... and the defaults it offered at that time caused an error until I supplied my "bootgrub" partition's device ... and all went OK and I have a viable system now.