Intel RAID and Arch Linux

Getting FakeRaid working with an Arch install

If you’re running into an error when booting your shiny new Arch install with the message unable to find root device 'UUID=<uuid here>' don’t panic. There’s a simple fix that does not require a fresh install

The Problem

If you don’t care about what’s going on feel free to skip ahead to the solution section. The issue here is that the Intel RAID driver that many motherboards ship with is not a real hardware RAID controller. Hardware RAID exposes your RAID configuration to your OS as though it was a single real volume. This means your OS does not have to be aware of anything special going on.

However, Intel RAID is actually FakeRaid — your OS has to explicitly detect and load your configuration. If you installed your OS to a RAID volume, this loading needs to happen before your system boots since it is the root volume. This is why you are seeing the message unable to find root device — the RAID volume is not yet mounted.

The Solution

The solution here is to make sure your initramfs in the boot directory is configured with mdadm_udev which is a utility to manage software RAID configurations. To do this, boot up into a terminal using an Arch ISO. Once you’re there run through the following commands

Use lsblk to figure out what device your OS is installed on. For me it’s md126p5

dax@intrepid ~$ lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

sda 8:0 0 465.8G 0 disk

└─md126 9:126 0 931.5G 0 raid0

├─md126p1 259:0 0 450M 0 md

├─md126p2 259:1 0 100M 0 md

├─md126p3 259:2 0 16M 0 md

├─md126p4 259:3 0 599.5G 0 md

└─md126p5 259:4 0 331.5G 0 md

sdb 8:16 0 465.8G 0 disk

└─md126 9:126 0 931.5G 0 raid0

├─md126p1 259:0 0 450M 0 md

├─md126p2 259:1 0 100M 0 md

├─md126p3 259:2 0 16M 0 md

├─md126p4 259:3 0 599.5G 0 md

└─md126p5 259:4 0 331.5G 0 md

Mount that drive to a directory

dax@intrepid ~$ mount /dev/md126p5 /mnt/

Next, use arch-chroot to simulate as though you were booting up into that drive.

dax@intrepid ~$ arch-chroot /mnt

Use lsblk again to find your boot directory (it’s usually around 100mb and a FAT formatted) and mount it. Mine is at md126p2

dax@intrepid ~$ mount /dev/md126p2 /boot

That’s enough preparing, time for the real fix. Open up your mkinitcpio.conf for editing

dax@intrepid ~$ vi /etc/mkinitcpio.conf

Edit the HOOKS line to include mdadm_udev right before the filesystems entry. Mine looks like this

HOOKS="base udev autodetect modconf block keyboard keymap mdadm_udev filesystems fsck"

Almost done! Save and exit the file and generate a new initramfs using mkinitcpio

dax@intrepid ~$ mkinitcpio -p linux

All done! Reboot your machine and your RAID volume should be loaded properly and everything should work

Dax Ravi works with a team of software engineers that help companies execute on their technology goals. If you’re interested in building something with us please shoot an email to hello@ironbay.co and check out our github