Failing to load rootfs: Ubuntu 10 + grub2 + rootfs ext4 w/ RAID1
- by James
I am having problems booting a new Ubuntu 10 (server) install. My primary HD (/dev/sda) is laid out as follows:
Device Boot Start End Blocks Id System
/dev/sda1 * 1 18 144553+ 83 Linux <-- /BOOT
/dev/sda2 19 182401 1464991447+ 5 Extended
/dev/sda5 19 2207 17583111 fd Linux raid autodetect
/dev/sda6 2208 11934 78132096 fd Linux raid autodetect <-- / (ROOTFS)
/dev/sda7 11935 182401 1369276146 fd Linux raid autodetect
The rootfs is part of a RAID1 (software) array (currently degraded):
# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md2 : active raid1 sda6[1]
78132032 blocks [2/1] [_U]
The UUIDs for the partitions are as follows:
# blkid /dev/sda1
/dev/sda1: UUID="b25dd301-41b9-4f4d-9b0a-0e31713dd74c" TYPE="ext2"
# blkid /dev/sda6
/dev/sda6: UUID="af7b9ede-fa53-c0c1-74be-31ec752c5cd5" TYPE="linux_raid_member"
# blkid /dev/md2
/dev/md2: UUID="a0602d42-6855-482f-870c-6f6ecdcdae3f" TYPE="ext4"
Finally, I have my grub2 menuentry setup as follows:
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-25-server' --class ubuntu --class gnu-linux --class gnu --class os {
insmod ext2
insmod raid
insmod mdraid
set root='(hd0,1)'
search --no-floppy --fs-uuid --set b25dd301-41b9-4f4d-9b0a-0e31713dd74c
linux /vmlinuz-2.6.32-25-server root=UUID=a0602d42-6855-482f-870c-6f6ecdcdae3f ro nosplash noplymouth
initrd /initrd.img-2.6.32-25-server
}
When I attempt to boot, grub loads OK, however I eventually get the following error message:
Gave up waiting for root device. ALERT /dev/disk/by-uuid/a0602d42-6855-482f-870c-6f6ecdcdae3f does not exist. Dropping to a shell!
If from the grub bootloader I open a grub command line, I can ls (hd0,) and it lists the correct partitions with the UUIDs as shown above - sda6 shows 'a0602d42-6855-482f-870c-6f6ecdcdae3f' (the RAID UUID). If I ls (md2)/ it properly lists all the files on the RAID1 filesystem (ext4) so it doesn't appear to be an issue accessing the raid device.
Does anyone have any suggestions as to what the problem might be? I can't figure this one out.