Ubuntu – How to install GRUB on a RAID system installation


I'm trying to setup and install Ubuntu on a RAID 1 setup. I have two disks, sdb and sdc. I've been following this guide


which more or less works for getting everything set up and Ubuntu installed. The problem is at the end of the installation, it tries to install GRUB. By default it tries my "first disk", which gives a "fatal error". I've tried installing it on a specific partion, e.g. sdb1 as well as RAID devices, e.g. md0, md1, etc.. Nothing seems to work.

The actual error is

Unable to install GRUB in /dev/sdb

Executing 'grub-install '/dev/sdb' failed.

This is a fatal error.

Then I'm taken back to the main install menu. If I choose "Install the GRUB boot loader on a hard disk" option, I can pick the partition, but entering sdb2 or md1 gives the same error.

So I went ahead an just didn't install GRUB, which means now I presumably have a working Ubuntu installation, but I can't boot it. I've tried booting from the LiveCD to install GRUB, but I can't chroot into my system because it doesn't seem to recognize that my disk is a Linux disk. There's an error about it being a RAID partition.

So basically I would really like to know how you know to which device to install GRUB at installation, or at the very least, how to install it on to my system now.

I suppose I should also mention that sda is a Windows 7 installation that I would like to keep around and be able to access at boot.

Thanks for any help.

Best Answer

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.)

Related Question