Nothing spikes a sysadmin’s blood pressure faster than a production server stalling mid-reboot and dropping straight into the dracut:/# prompt. You have no SSH, no network, and no obvious clue beyond a timeout waiting for a root device. Treating Dracut as a black box works fine—until a kernel update or storage swap breaks it.
Below is a practical workflow for customizing initramfs, embedding storage drivers persistently, and getting out of early-boot failures fast.
When a Reboot Drops Into the Dracut Emergency Shell
Imagine a routine maintenance window. You install kernel updates, swap a storage controller, or clone a VM onto a hypervisor with a different virtual disk driver. You reboot, wait about three minutes, and the console spits out:
[ 184.210942] dracut-initqueue[412]: Warning: dracut-initqueue: timeout, still waiting for following hardware devices
[ 184.211503] dracut-initqueue[412]: Warning: /dev/mapper/vg0-root does not exist
Generating "/run/initramfs/rdsosreport.txt"
Entering emergency mode. Exit the shell to continue.
dracut:/#
Your data is still sitting safely on disk, yet the kernel cannot see it. Standard logs under /var/log are unreachable too, because the real root filesystem has not been mounted yet.
Why Early Boot Fails
Fixing boot failures quickly starts with knowing what happens before systemd takes over. First, the bootloader (GRUB2 or systemd-boot) loads the Linux kernel alongside a compressed RAM archive called initramfs. That tiny temporary root filesystem holds the kernel modules, udev rules, and scripts needed to detect your disks and mount the real root partition.
Dracut builds that image by default on RHEL, Fedora, Rocky Linux, AlmaLinux, and openSUSE. You will also find it on Debian or Ubuntu hosts configured to use Dracut instead of initramfs-tools. When early boot breaks, the culprit is almost always one of four things:
- Host-only mode stripped a needed driver: Many distros default to
hostonlymode, which packs only the modules active on the machine during build time. Move that disk to a new HBA or hypervisor, and the new driver is missing. - Out-of-tree modules were skipped: Third-party NVMe, RAID, or filesystem drivers built with DKMS are sometimes left out unless you explicitly include them.
- Manual flags got wiped on the next kernel update: Running a one-off
dracutcommand fixes today’s boot. Next month’s kernel package install regenerates the image from config files and silently drops your CLI flags. - Slow compression or low-memory failures: Heavy compression settings or bloated generic images can stall builds—or even OOM—on small 1 GB to 2 GB VMs.
Comparing Your Initramfs Options
You have three main levers when tuning Dracut or recovering a broken machine. Choosing the right one up front saves hours of guesswork.
1. Host-Only vs. Generic Images
A generic image (--no-hostonly) bundles nearly every storage, network, and filesystem driver into /boot/initramfs-*.img (or /boot/initrd.img-* on Debian-based systems). It is ideal for golden templates or rescue USBs that must boot anywhere, though images often exceed 100 MB and take longer to decompress.
A host-only image (--hostonly) inspects your running kernel and includes only the modules your current hardware needs. Pairing host-only mode with targeted driver overrides and zstd compression hits the sweet spot. On a 4 GB RAM Ubuntu 22.04 VM running Dracut, switching from generic xz to host-only zstd cut initramfs build time from roughly 45 seconds to under 8 seconds and shrank the image from 112 MB to 34 MB.
2. CLI Flags vs. Drop-In Config Files
Passing --add-drivers on the command line works great for an emergency fix from a rescue shell. Still, CLI flags do not persist. Drop-in files inside /etc/dracut.conf.d/ survive every future kernel upgrade because package managers read them automatically.
3. Emergency Shell Debugging vs. Live ISO Chroot
Booting a Live ISO and chrooting into your root partition always works, but attaching an ISO and assembling LVM or RAID arrays takes time. Inspecting /run/initramfs/rdsosreport.txt or booting with rd.break right inside the Dracut shell often reveals the missing module in under two minutes.
Five Habits That Keep Dracut Predictable
After untangling plenty of botched kernel upgrades, these five practices are what I rely on to keep servers booting cleanly.
1. Inspect the Initramfs Before Rebooting
Never assume a driver made it into your boot image. Run lsinitrd to verify the contents of your newly built initramfs before restarting a remote host:
# List storage drivers embedded in the current initramfs
sudo lsinitrd /boot/initramfs-$(uname -r).img | grep -E 'nvme|megaraid|virtio'
# Inspect a specific config file inside the image
sudo lsinitrd /boot/initramfs-$(uname -r).img /etc/fstab
If your storage driver is missing from that output, do not reboot yet.
2. Persist Early-Boot Drivers in /etc/dracut.conf.d/
Leave /etc/dracut.conf alone, since package updates can overwrite or conflict with it. Create a dedicated drop-in file such as /etc/dracut.conf.d/99-custom-drivers.conf instead:
# /etc/dracut.conf.d/99-custom-drivers.conf
hostonly="yes"
compress="zstd"
# Always include these drivers in initramfs
add_drivers+=" nvme vmd virtio_scsi "
# Force-load critical drivers before udev triggers
force_drivers+=" dm_mod "
Watch the leading and trailing spaces inside the quotes (" nvme vmd "). Dracut concatenates config strings verbatim; omitting those spaces glues module names together and causes silent failures.
3. Rebuild Without Deleting Your Fallback
Keep at least one known-good kernel and initramfs pair in /boot. Before testing new Dracut settings, back up the working image and target a specific kernel version explicitly:
# Back up the working image
sudo cp /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
# Rebuild initramfs for the running kernel
sudo dracut --force --kver $(uname -r)
# Verify the newly embedded drivers
sudo lsinitrd /boot/initramfs-$(uname -r).img | grep vmd
Migrating a disk to unfamiliar hardware? Temporarily build a portable image with sudo dracut --force --no-hostonly --kver $(uname -r). Once the machine boots on the new host, switch back to hostonly="yes" and rebuild.
4. Debug Directly From the Emergency Prompt
Resist the urge to power-cycle blindly when a server lands at dracut:/#. Run these checks right from the emergency shell first:
# Check why udev or device initialization failed
cat /run/initramfs/rdsosreport.txt | less
# See which block devices and modules the kernel detects
lsblk
lsmod
# Load a missing driver manually (plus LVM if needed) and resume boot
modprobe virtio_blk
lvm vgchange -ay
exit
If the server finishes booting after a manual modprobe, you have found the exact culprit. Add that module to /etc/dracut.conf.d/99-custom-drivers.conf and run sudo dracut --force so the next reboot succeeds on its own.
For hangs that happen before the emergency shell even appears, press e at the GRUB menu and append rd.shell rd.debug to the kernel line. Dracut will print verbose execution traces so you can spot the exact hook or device that stalled.
5. Watch /boot Space and Verify After Patching
A full /boot partition causes dracut to write truncated images, which guarantees a failed boot. Older 512 MB /boot partitions fill up fast once four or five kernels accumulate. Check df -h /boot regularly, prune old kernels with your package manager, and run a quick lsinitrd check after patching—ten seconds of verification beats an hour on an out-of-band console.

