When /boot/efi Mounts Fail After a Kernel Update: A Quick initramfs Fix

Why /boot/efi Fails After a Kernel Upgrade

When you pull a new kernel into the system, the initramfs gets rebuilt and the bootloader is updated. On UEFI machines that keep the EFI system partition in its own /boot/efi, the kernel mounts that partition right after booting to read EFI variables and the boot‑loader configuration. A mis‑configured /etc/fstab, a missing vfat module, or a stale initramfs can bite you early, dropping you into an emergency shell before the kernel even gets a chance to run. You’ll usually see something like:

/boot/efi: mount failed: No such file or directory

or a similar error in the early boot logs. The kernel itself is fine; it’s the initramfs that’s missing something.

Below is a practical, step‑by‑step walk‑through to spot and fix the problem, plus a quick dive into why it happens and how to keep it from re‑occurring.


1. Spotting the Problem

The first thing I do is confirm that the failure happens during the initramfs stage and not later. Boot into the emergency shell (you’ll usually see emergency@hostname:~# or root@hostname:~#) and run:

journalctl -b -1 | grep -i efi

Typical output:

[  0.123456] EFI: EFI variables not available
[  0.123457] EFI: Failed to mount /boot/efi: No such file or directory

If the error shows up in the previous boot (-1), the system was already stuck before the new kernel started. If it appears in the current boot, the initramfs is trying to mount /boot/efi but can’t find the device.

Next, check the device node:

lsblk -f | grep efi

You should see something like:

sda1   vfat   /boot/efi

If the partition is missing, the kernel may have been updated to a newer version that removed the vfat module from the initramfs. If the partition exists but the mount still fails, the initramfs might be missing the vfat module or the efivarfs filesystem.


2. Quick Fix: Rebuild the Initramfs with the Correct Modules

The most common remedy is to rebuild the initramfs for the current kernel, making sure vfat and efivarfs are included. On Debian‑based systems:

# Identify the current kernel
uname -r
# Example: 6.6.0-26-generic

# Rebuild initramfs
sudo update-initramfs -c -k $(uname -r)

On Red Hat‑based distributions:

sudo dracut -f -v $(uname -r)

On Arch Linux:

sudo mkinitcpio -P

Then reboot:

sudo reboot

If the mount now succeeds, you’ve just fixed a stale or incomplete initramfs.


3. Why the Initramfs Missed the Module

3.1. Kernel‑Specific Module Selection

When a new kernel is installed, the initramfs builder scans the kernel tree for modules that are needed by the initrd. If the vfat module is built as a built‑in instead of a module, the builder will not add it to the initramfs. Some distributions ship vfat as a module, but if you compile a custom kernel with CONFIG_VFAT_FS=m, the module will be missing unless you explicitly add it.

3.2. UEFI Variable Access

UEFI firmware stores boot variables in a special filesystem (efivarfs). The initramfs must mount this filesystem to read the boot loader configuration. If the efivarfs module is missing or the initramfs is built without CONFIG_EFI_VARS,


See also