[Bug 2147295] Re: Add rd.auto=1 to grub for storage with md RAID
Dan Bungert
2147295 at bugs.launchpad.net
Wed Apr 8 14:22:34 UTC 2026
** Also affects: subiquity (Ubuntu)
Importance: Undecided
Status: New
** Changed in: subiquity (Ubuntu)
Milestone: None => ubuntu-26.04
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to subiquity in Ubuntu.
https://bugs.launchpad.net/bugs/2147295
Title:
Add rd.auto=1 to grub for storage with md RAID
Status in subiquity:
New
Status in subiquity package in Ubuntu:
New
Bug description:
A fresh Ubuntu 26.04 Server (beta) installation using autoinstall with
the root filesystem on md RAID1 fails to boot after installation. The
system drops to a dracut emergency shell with an error indicating the
root device UUID (the md device) cannot be found.
Steps to reproduce:
1. Prepare an autoinstall user-data with md RAID1 as the root filesystem, e.g.:
storage:
config:
- {type: disk, id: nvme0, ptable: gpt, match: {path: /dev/nvme0n1}, ...}
- {type: disk, id: nvme1, ptable: gpt, match: {path: /dev/nvme1n1}, ...}
- {type: partition, id: nvme0p3, device: nvme0, number: 3, size: 32G}
- {type: partition, id: nvme1p3, device: nvme1, number: 3, size: 32G}
- {type: raid, id: md0, name: md0, devices: [nvme0p3, nvme1p3], raidlevel: raid1}
- {type: format, id: fs-root, volume: md0, fstype: ext4}
- {type: mount, id: mount-root, device: fs-root, path: /}
2. Boot the Ubuntu 26.04 Server ISO and launch the autoinstall via GRUB:
linux /casper/vmlinuz ip=dhcp autoinstall 'ds=nocloud;s=http://SERVER/path/' ---
3. Installation completes successfully.
4. On first reboot, the system drops to a dracut emergency shell.
Expected result:
The system boots normally after installation.
Actual result:
Dracut fails with Failed to mount sysroot.mount - /sysroot. The root
device UUID is not found because the md RAID arrays have not been
assembled. From the dracut emergency shell, running mdadm --assemble
--scan makes the UUID appear, confirming the arrays are present but
not assembled.
Workaround:
Adding rd.auto=1 to the kernel command line via the GRUB editor allows
the system to boot. Making it permanent:
echo 'GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX rd.auto=1"' > /etc/default/grub.d/50-md.cfg
update-grub
Understanding of the potential root cause:
Ubuntu 26.04 switched the initramfs generator from initramfs-tools to
dracut. initramfs-tools automatically assembles all md arrays during
early boot. Dracut does not. It requires the rd.auto=1 kernel
parameter (or explicit rd.md.uuid= entries) to assemble md arrays
before mounting root.
Subiquity does not add this parameter when configuring GRUB for the
target system. The relevant code is in subiquity/models/filesystem.py,
FilesystemModel.render(). The curtin config it generates contains a
grub section but no mechanism to add kernel command line parameters.
Curtin's BootCfg (in curtin/config.py) also has no field for custom
kernel arguments.
A minimal fix is to have FilesystemModel.render() detect when md RAID
arrays are present in the storage configuration and add a write_files
entry that creates /etc/default/grub.d/50-curtin-md.cfg with
GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX rd.auto=1". This file is
written before curtin runs setup_grub / update-grub, so the parameter
is picked up and baked into grub.cfg.
A pull request with this fix is available at:
https://github.com/canonical/subiquity/pull/2355
Affected version: Ubuntu 26.04 beta, Subiquity from the 26.04 server
ISO
Not affected: Ubuntu 24.04 and earlier (which use initramfs-tools)
To manage notifications about this bug go to:
https://bugs.launchpad.net/subiquity/+bug/2147295/+subscriptions
More information about the foundations-bugs
mailing list