Skip to content
vast-cow's blog
Go back

Setting up RHEL to boot with `/` (root) on an `mdadm` RAID device

Edit page

When you place the RHEL root filesystem on a software RAID array built with mdadm, the initramfs (dracut) must be able to find and assemble that RAID array very early in the boot process. A reliable way to do this is to pass the RAID array UUID to the kernel command line via GRUB, so dracut knows exactly which array to assemble.

Below is a minimal and practical configuration workflow.

1) Confirm the RAID array UUID

First, obtain the array definition and its UUID from mdadm.

$ sudo mdadm --detail --scan
ARRAY /dev/md/0 metadata=1.2 UUID=XXX

Key point:

2) Add the RAID UUID to the GRUB kernel command line

Edit GRUB’s default configuration and append rd.md.uuid=XXX to the kernel parameters.

$ sudo -e /etc/default/grub
GRUB_CMDLINE_LINUX=".. rd.md.uuid=XXX"

What this does:

Notes:

3) Regenerate GRUB configuration and update BLS entries

On modern RHEL, Boot Loader Specification (BLS) entries are commonly used. The following command regenerates GRUB config and updates the BLS kernel command line:

$ sudo grub2-mkconfig -o /etc/grub2.cfg --update-bls-cmdline

Why this matters:

Outcome and quick validation

After these steps, the bootloader will pass rd.md.uuid=XXX to dracut, dracut will assemble /dev/md/0 early, and the system will be able to mount the root filesystem from that md RAID device.

If you want a quick sanity check after reboot, you can confirm the array is active:

cat /proc/mdstat
sudo mdadm --detail /dev/md/0

Edit page
Share this post:

Comments


Previous Post
A Simple Bookmarklet for Setting Text in a Prompt Field
Next Post
Rewriting a Specific String in a Specific File with git-filter-repo While Minimizing Changed Commits