How to Fix ‘Failed to Mount /etc/fstab’ at Boot in Ubuntu

Powering on your Ubuntu server or desktop only to be abruptly dropped into systemd Emergency Mode or Maintenance Mode with the red error banner: “Failed to mount /etc/fstab” or “Dependency failed for Local File Systems” halts the system boot pipeline. When this failure occurs, Ubuntu displays “Press Enter for maintenance (or press Control-D to continue)” and mounts the root filesystem as read-only. In the Linux boot architecture, systemd parses the static filesystem table in /etc/fstab to automatically mount root, swap, EFI, and secondary storage partitions. When an external drive is disconnected, a partition UUID changes following a reformat, or a syntax typo is introduced into fstab, systemd aborts the boot process to prevent data corruption. This guide explains how to repair broken fstab entries and restore standard boot in Ubuntu.

Primary Factors Behind /etc/fstab Boot Failures

Because systemd enforces strict dependency trees, any invalid line in the filesystem table will stall startup:

  • Changed or Missing Partition UUIDs: Formatting a secondary partition or replacing a drive changes its Universally Unique Identifier (UUID), causing fstab to search for a non-existent drive.
  • Missing External USB or Network Mounts: Secondary storage drives or NFS/Samba network shares configured without the nofail mount option, causing systemd to wait indefinitely when the network or drive is absent.
  • Syntax Errors or Typographical Mistakes: Missing fields (fstab requires exactly 6 columns per line), incorrect filesystem types (e.g. ext3 instead of ext4), or invalid comma placement in mount options.
  • File System Inconsistencies (Dirty Filesystems): Unclean system shutdowns marking partitions as dirty, requiring an fsck file system integrity scan before mounting.

Method 1: Enter Emergency Maintenance Mode and Remount as Read-Write

Emergency mode mounts your system drive as read-only. You must remount it as read-write before editing configuration files.

  1. At the emergency prompt, press Enter (or enter your root/sudo password) to access the maintenance shell.
  2. Remount the root filesystem in read-write mode:
    mount -o remount,rw /
  3. Verify that the root drive accepts write operations by creating a temporary file:
    touch /test && rm /test

Method 2: Check Systemd Journal Logs for the Failing Mount

Systemd logs the exact line number and device path that failed mounting.

  1. In the maintenance shell, query the systemd boot log:
    journalctl -xb | grep -i "failed to mount"
  2. Look for the line identifying which mount point failed (e.g. Failed to mount /mnt/storage or Timed out waiting for device /dev/disk/by-uuid/...).
  3. Note the failing mount path.

Method 3: Verify Partition UUIDs Using blkid

Compare the actual hardware UUIDs reported by the kernel against the strings configured in /etc/fstab.

  1. Display the true UUIDs of all connected block devices:
    blkid
  2. Open the filesystem table in the nano editor:
    nano /etc/fstab
  3. Compare the UUID strings in fstab against the output of blkid.
  4. If an entry points to an old, non-existent UUID, replace it with the accurate UUID from blkid.
  5. If the entry belongs to a removable USB drive or secondary non-boot drive that is currently disconnected, add nofail to its options column:
    UUID=xxxx-xxxx  /mnt/backup  ext4  defaults,nofail  0  2
    (The nofail flag instructs Ubuntu to continue booting smoothly even if the drive is disconnected).
  6. Save changes (Ctrl + O, Enter) and exit nano (Ctrl + X).

Method 4: Test fstab Mounts Before Rebooting

Always validate your edited fstab file in the shell before rebooting to ensure zero syntax errors remain.

  1. Execute a dry-run mount of all filesystems:
    mount -a
  2. If mount -a returns cleanly without printing any error messages, your /etc/fstab syntax is completely valid.
  3. Reboot your system normally:
    systemctl reboot
  4. Ubuntu will now boot smoothly into your standard desktop or multi-user login target.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.