01 December 2026

Fixing the "You are in emergency mode" error after reinstalling Linux because the /etc/fstab UUID is wrong

On a dual boot setup, after installing the operating system or after wiping the partition that contained grub and installing a fresh copy of it, there's a filesystem mount configuration problem where a UUID in fstab does not match (fstab is the filesystem table which determines how storage devices, disk partitions, and remote network file systems are automatically and permanently mounted into the system). Linux's boot repair tool cannot fix this error, so it has to be fixed manually.  

I feel they should've created a tool to fix this automatically or at least assist the user by automatically displaying relevant information.

The emergency mode error

So the error that you'll first see is:

A start job is running for /dev/disk/by-uuid/<the UUID> (48s / 1min 30s)

Then you'll likely see:

[ TIME ] Timed out waiting for device /dev/disk/by-uuid/<the UUID>

[DEPEND] Dependency failed for File System Check on /dev/disk/by-uuid/<the UUID>

[DEPEND] Dependency failed for/boot/efi.

[DEPEND] Dependency failed for Local File Systems.

[DEPEND] Dependency failed for Clean up any mess left by 0dns-up.

[FAILED] Failed to start Set Up Additional Binary Formats.

And eventually:

You are in emergency mode. After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, "systemctl default" or "exit" to boot into default mode. Press Enter for maintenance (or press Control-D to continue):

So at this stage you are supposed to press Enter and you'll be shown a terminal. Now type:

lsblk -f

(in case you need to remount the root filesystem read-write you'll need to type `mount -o remount,rw /` but most likely this won't be necessary).

You'll see the actual UUID of the partition that contains your bootloader. It'll be eight characters long with a hyphen in between. So the UUID looks like "AB8A-CD34". Write down which UUID is that of the partition /boot/efi. The problem happens because this actual UUID is what should be present in /etc/fstab, but it isn't present. So you need to remove the wrong UUID from fstab and replace it with the actual UUID. That's all.

Take a backup of fstab and then open fstab using Nano editor:

cp /etc/fstab /etc/fstab.backup 

nano /etc/fstab

UUID in fstab incorrect (I've smudged it out)

Here you'll likely see that the eight character long UUID of the `/boot/efi` partition is not the same as what you wrote down from the output of `lsblk -f`. So simply delete the `/boot/efi` UUID mentioned in fstab and type the UUID that you wrote down. 

Press Ctrl+O to save, confirm the file to write to if necessary by pressing Enter and press Ctrl+X to exit Nano editor.

Final checks

Then type:

mount /boot/efi

It should not show any errors. Then type:

ls /boot/efi

It should show you something like "EFI".

Then type:

mount -a

If there are no errors, the fstab problem is fixed, and you can reboot. Everything should work fine now.  

 

Additional diagnostic commands

There are also other commands that can be useful:

  • findmnt: Shows currently mounted filesystems and where they are mounted, helping you see whether the expected boot/EFI partition is actually mounted.
  • findmnt --verify: Checks `/etc/fstab` for syntactic and configuration problems and verifies that its filesystem specifications can be resolved.
  • blkid: Displays filesystem metadata, including the UUID and filesystem type of detected block devices. It's useful for finding the UUID that should be in `fstab`.
  • mount | grep efi: Shows currently mounted filesystems whose mount information contains `efi`, typically to check whether the EFI System Partition is mounted at `/boot/efi`.
  • ls -la /boot/efi: Lists the contents of the EFI mount point, helping confirm whether the EFI partition is mounted there and whether its expected files/directories are present.
  • ls -la /boot: Lists the contents of `/boot`, allowing you to inspect kernels, initramfs files, and potentially the EFI mount point.
  • systemctl --failed: Lists systemd units that have failed during boot, helping identify the unit responsible for the emergency-mode failure.
  • systemctl status local-fs.target: Shows the status and recent log information for the systemd target responsible for bringing local filesystems, including `fstab` mounts, online.
  • systemctl --failed journalctl -xb: Lists failed systemd units.
  • journalctl -xb: Displays the current boot's journal with extra boot/system context, which can reveal why a mount failed.
  • lsblk -f: Lists block devices along with filesystem type, label, UUID, and mount point, making it particularly useful for comparing the actual partition UUID with the UUID specified in `/etc/fstab`.
  • cat /etc/fstab: Prints the filesystem table used during boot, so you can inspect which UUIDs and mount points Linux is configured to use. 

 

My other writeups about fstab fixes: