Grub2 w/ RAID5 and btrfs “error: unknown filesystem”

btrfsgrub2mdadmraid5

I have a Virtual Machine (in ESXi 5.1) running Ubuntu Server 12.04. When I try to boot my system I grub2 tells me "error: unknown filesystem". I've tried booting a Live CD then reinstalling grub from both a chrooted environment and by supplying the –root-directory option. I've even tried a boot-repair CD (results here) and reinstalling grub. Whatever I use to fix it, I'm getting the error "Path `/boot/grub' is not readable by GRUB on boot. Installation is impossible. Aborting."

To complicate things I'm running a RAID5 array (5 disks) using mdadm and btrfs for my filesystem. The btrfs tools that ship with Ubuntu 12.04 are really old. I've added ppa:cjwatson/grub (currently grub2 ver 2.00-2) and ppa:yofel/btrfs (currently btrfs-tools ver. 0.20~git20130524~650e656-0daily13) to my software sources to get more up to date utilities, with no help. The system was previously working before switching from a 4 disk RAID0 setup. I think this may have been the first reboot since the upgrade, but it was running fine for weeks using RAID5.

Best Answer

Grub can't actually boot from anything but a raid 1 or raid 0 mdadm device. You will need to add a /boot device somewhere and just set that up in raid 1/0/raw.

I would do something like this

the 2 new volumes below {a,b} can be file backed but should be on separate physical disks.

/dev/sd{a,b}1 mdadm raid 1 /boot (2 new disks (500MB or so)) 
/dev/sd{c..g}1 mdadm  raid 5 / (current disks)