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
fstabto search for a non-existent drive. - Missing External USB or Network Mounts: Secondary storage drives or NFS/Samba network shares configured without the
nofailmount 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.
ext3instead ofext4), or invalid comma placement in mount options. - File System Inconsistencies (Dirty Filesystems): Unclean system shutdowns marking partitions as dirty, requiring an
fsckfile 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.
- At the emergency prompt, press Enter (or enter your root/sudo password) to access the maintenance shell.
- Remount the root filesystem in read-write mode:
mount -o remount,rw / - 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.
- In the maintenance shell, query the systemd boot log:
journalctl -xb | grep -i "failed to mount" - Look for the line identifying which mount point failed (e.g.
Failed to mount /mnt/storageorTimed out waiting for device /dev/disk/by-uuid/...). - 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.
- Display the true UUIDs of all connected block devices:
blkid - Open the filesystem table in the nano editor:
nano /etc/fstab - Compare the UUID strings in
fstabagainst the output ofblkid. - If an entry points to an old, non-existent UUID, replace it with the accurate UUID from
blkid. - If the entry belongs to a removable USB drive or secondary non-boot drive that is currently disconnected, add
nofailto its options column:
(TheUUID=xxxx-xxxx /mnt/backup ext4 defaults,nofail 0 2nofailflag instructs Ubuntu to continue booting smoothly even if the drive is disconnected). - 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.
- Execute a dry-run mount of all filesystems:
mount -a - If
mount -areturns cleanly without printing any error messages, your/etc/fstabsyntax is completely valid. - Reboot your system normally:
systemctl reboot - Ubuntu will now boot smoothly into your standard desktop or multi-user login target.