Sunday, 22 January 2012

Booting Fedora 16: "No such device" error

If you installed Fedora 16 to a new software RAID device, you may find yourself unable to boot into it, receiving a "No such device" error. In my case, this turned out to be easily resolvable by adding the necessary RAID modules to the bootloader - the instructions below assume you're using the GRUB bootloader.

First, boot to rescue mode using your Fedora installation media.

Change root to your installed system:
# chroot /mnt/sysimage

Add the missing modules to GRUB:
# echo "GRUB_PRELOAD_MODULES=\"raid mdraid09 mdraid1x\"" >> /etc/defaults/grub

Regenerate GRUB's configuration file:
# grub2-mkconfig -o /boot/grub2/grub.cfg

Install GRUB to the correct location. You will need to change /dev/sda to that correct location. I.e., /dev/sda installs GRUB to the MBR of the first HDD.
# grub2-install /dev/sda


Update 23 Jun: I'm happy to say that Fedora 17 doesn't suffer from this blight. The installation process correctly adds the insmod mdraid1x line.