You hit the emergency shell after a kernel update
You installed a new kernel module for your graphics card, or you switched your root filesystem to LVM on LUKS, and the next boot drops you into an emergency shell. The kernel cannot find your root device. The error message points to a missing driver in the initramfs. You need to rebuild that image to include the new hardware support or storage configuration.
The system is waiting for you to fix the boot environment. The kernel loaded, but the initial RAM disk lacks the drivers required to mount the real root filesystem. Without those drivers, systemd never starts, and the desktop never appears.
What the initramfs actually does
The initramfs is a temporary root filesystem loaded into RAM before the real root filesystem mounts. It contains the drivers needed to talk to your storage controller, decrypt your disk, assemble LVM volumes, and hand control to systemd. Think of it as a foundation crew. The kernel is the architect, but the initramfs prepares the site so the main building can be erected. It sets up the environment, mounts the root partition, and then execs into the real system.
Fedora uses dracut to build this image. The name stands for "dynamic RAM disk creator." It scans your current kernel modules, reads your storage configuration, and packs everything into a compressed cpio archive. When you change kernel modules, storage configuration, or encryption settings, the existing initramfs might not have the right drivers. Regenerating it ensures the image matches the current kernel and configuration.
The initramfs is not static. It is rebuilt whenever the kernel changes or when configuration files that affect the boot environment are modified. Fedora's package manager usually handles this automatically. You only need to intervene manually when the automation misses a change or when you are recovering from a broken state.
Rebuild the initramfs for the running kernel
Run dracut --force to rebuild the image for the kernel you are currently using. This is the standard command when you have modified configuration files or installed out-of-tree modules and need the changes to take effect on the next boot.
Here is how to force a regeneration of the initramfs for the active kernel.
sudo dracut --force
# --force overwrites the existing image file instead of failing if it already exists
# This rebuilds the initramfs for the currently running kernel version
# The output lists included modules and reports the final image size
# A successful run ends with "Creating image file" and the path to the new image
Fedora's package manager rebuilds the initramfs automatically when you install or remove kernel packages. If you are just doing a standard update, dnf upgrade --refresh is sufficient. The --refresh flag forces dnf to check for newer metadata, which is the normal weekly maintenance command. You do not need to run dracut after a routine update.
You only need to run dracut manually when you modify configuration files that affect the boot environment, install proprietary drivers like NVIDIA, or recover from a broken state. Trust the package manager for routine updates. Run dracut only when configuration changes require it.
Rebuild for a specific kernel version
Sometimes you need to rebuild the initramfs for a kernel that is not currently running. This happens when you install a new kernel but the build fails, or when you need to fix an image before rebooting into it. You must specify the target image path and the kernel version string.
Here is how to regenerate the initramfs for a specific kernel version.
sudo dracut --force /boot/initramfs-5.14.0-428.fc38.x86_64.img 5.14.0-428.fc38.x86_64
# Specify the full path to the target image file in /boot
# Provide the kernel version string as the second argument
# This is useful when you need to fix an initramfs for a kernel that is not currently running
# Ensure the kernel modules directory exists at /lib/modules/<version>
Check the kernel version string carefully. The version must match a directory in /lib/modules/. If the modules are missing, dracut will fail with a fatal error. Install the matching kernel package if the modules are absent.
Check available space in /boot before running the command. A full partition will cause dracut to abort with a write error. Old kernel images accumulate over time and can fill the partition. Remove unused kernels with dnf remove to free space.
Verify the image contents
Rebuilding the image is not enough. You must verify that the required drivers are actually packed inside. If the driver is missing, the boot will still fail. Use lsinitrd to inspect the contents of the initramfs archive.
Here is how to check whether a specific driver is included in the regenerated image.
lsinitrd /boot/initramfs-$(uname -r).img | grep -i nvidia
# lsinitrd lists the contents of the initramfs archive
# Use grep to search for specific modules or drivers you expect to see
# This confirms the driver is actually packed inside the image
# An empty result means the driver is missing and the boot will likely fail
Check the file timestamp and size as well. The timestamp should match the time you ran dracut. The file size should be non-zero and typically between 50MB and 150MB. A size of zero indicates the build failed silently or was interrupted.
Reboot to test. The initramfs is only useful when the system boots.
Common pitfalls and error messages
dracut fails for specific reasons. The error message tells you exactly what is wrong. Read the output before guessing.
If you see this error, the kernel modules are missing for the target version.
dracut: FATAL: Could not find kernel /lib/modules/5.14.0-xxx.fc38.x86_64
Install the matching kernel package. The modules directory must exist. Run dnf install kernel-5.14.0-xxx.fc38.x86_64 to restore the modules.
If you see this error, the /boot partition is full.
dracut: FATAL: No space left on device
Clean up old kernels. Run dnf remove to remove unused kernel packages. Check free space with df -h /boot. Ensure at least 200MB is free.
If you see this error, SELinux is preventing dracut from writing the image.
dracut: FATAL: Permission denied
Check SELinux denials in journalctl -t setroubleshoot. The one-line summary explains the denial. Restore file contexts with restorecon -Rv /boot if the labels are incorrect. Do not disable SELinux. Fix the context.
Config files in /etc/dracut.conf.d/ override defaults. Edit files in /etc/. Never edit files in /usr/lib/dracut.conf.d/. Files in /usr/lib/ ship with the package and get overwritten on update. Changes in /etc/ persist.
Check the error message. dracut tells you exactly what is missing.
Recovery from a Live USB
If the system will not boot and you cannot run dracut from the installed system, you must use a Live USB. Boot from the media, mount the root filesystem, enter a chroot, and rebuild the image.
Here is how to regenerate the initramfs from a Live USB environment.
sudo mount /dev/mapper/fedora-root /mnt
# Mount the root filesystem to /mnt to access the system files
# Replace fedora-root with your actual root device name
sudo mount /dev/sda1 /mnt/boot
# Mount /boot separately if it is a distinct partition
# Adjust the device name to match your /boot partition
sudo chroot /mnt
# Enter the chroot environment to run commands as if booted into the installed system
# This gives you access to the installed kernel and modules
dracut --force
# Rebuild the initramfs from within the chroot to ensure correct paths
# Run this as root inside the chroot
exit
# Exit the chroot to return to the Live USB environment
# Unmount the filesystems and reboot
Verify the mount points before entering the chroot. If /boot is not mounted, dracut cannot write the image. If the root device is encrypted, unlock it with cryptsetup before mounting.
Backup /boot before major changes. A corrupted initramfs locks you out.
When to use dracut versus other tools
Use dracut --force when you modified /etc/dracut.conf or added a custom kernel module.
Use dnf upgrade --refresh when you are performing routine system updates and want the package manager to handle the initramfs.
Use dracut -f --kver <version> when you need to repair an initramfs for a kernel that is not currently running.
Use lsinitrd when you need to verify that a specific driver is included in the image before rebooting.
Stay on the default configuration if your hardware is standard and you are not using LVM, LUKS, or proprietary drivers.