Ubuntu Server Won’t Boot to Raid 1 Array

grub2raidUbuntu

I have a 4 drive RAID array. A small part of each disk is partitioned and used in RAID 1 for /boot. Everything else is RAID 5. When I start the computer GRUB2 shows up and I can use its command line and view each of my RAID arrays (ls (md0)/ or ls (md1)/etc, for instance). However, when I actually try to have GRUB2 boot the system I get these errors:

modprobe: FATAL: Could not load /lib/modules/2.6.35-22-generic-pae/modules.dep: No such file or directory

mount: mounting /dev/disk/by-uuid/[uuid] on /root failed: Invalid argument
mount: mounting /dev on /root/dev failed: No such file or directory
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /proc on /root/proc failed: No such file or directory
Target filesystem doesn't have requested /sbin/init.
No init found. Try passing init= bootarg.

Here are the GRUB2 commands that are being run:

recordfail
insmod raid
insmod mdraid
insmod part_msdos
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set [uuid]
linux /vmlinuz-2.6.35-22-generic-pae root=UUID=[different uuid] ro quiet
initrd /initrd.img-2.6.35-22-generic-pae

I have tried

fsck /dev/md0
fsck /dev/md1

and both arrays come out clean. I've booted to the CD and looked everywhere I can think of for a discrepancy that would cause GRUB2 to fail to boot. Using the GRUB2 command line and the CD command line everything appears to be in working order. Both RAID arrays show up active and not degraded. What is keeping GRUB2 from being able to mount and boot the system?

Best Answer

Ah, now I'd probably be more tempted to install GRUB onto the actual disks, not onto the md0 device.

grub> root (hd0,0)
grub> setup (hd0)

grub> root (hd1,0)
grub> setup (hd1)

Because that way, the bootloader sees the disks as disks first, and not have to load a module to make it work. It's also backwards compatible with GRUB, compared to GRUB2.
It's a bit like how you have a separate /boot partition that's RAID1.