Home » Troubleshooting: Linux Boot Failure due to Incorrect Configuration in /etc/fstab
Systems & Servers

Troubleshooting: Linux Boot Failure due to Incorrect Configuration in /etc/fstab

✨ Quick Answer

Modifying the /etc/fstab file to mount secondary hard drives or swap partitions (SWAP) is common, but a single typo, an extra space, or a non-existent disk UUID will cause your Linux distribution to fail to boot, sending you directly to a black screen displaying the error message Welcome to emergency mode!.

Quick Diagnostics

Cause
Incorrect syntax or invalid UUID in /etc/fstab file
Solution
Boot into rescue mode and fix broken entry in /etc/fstab
Cause
Unavailable partition at boot preventing system startup
Solution
Add nofail option to secondary partition in /etc/fstab

Modifying the /etc/fstab file to mount secondary hard drives or swap partitions (SWAP) is common, but a single typo, an extra space, or a non-existent disk UUID will cause your Linux distribution to fail to boot, sending you directly to a black screen displaying the error message Welcome to emergency mode!.

Step-by-Step Solution

  1. 1

    Step 1: Gain write access

    In emergency mode, the file system is typically locked in "Read-Only" mode, meaning you won't be able to save any corrections. Execute this command to unlock it:

    BASH
    mount -o remount,rw /
    
  2. 2

    Step 2: Edit the file with caution

    Open the configuration file using the console's built-in text editor:

    BASH
    nano /etc/fstab
    
  3. 3

    Step 3: Comment out or repair the corrupt line

    Find the last line you added (the one for the new disk or SWAP). If you are not sure what the syntax error is, insert a hash symbol # at the beginning of that entire line. This tells Linux to ignore that instruction during boot:

    PLAINTEXT
    # /swapfile none swap sw 0 0
    

    Save the changes by pressing Ctrl + O, press Enter, and exit with Ctrl + X.

  4. 4

    Step 4: Test and reboot

    Before rebooting blindly, tell the system to check if the syntax of the fstab file is correct:

    BASH
    findmnt --verify
    

    If the terminal does not output red error lines, you can perform a clean reboot to return to your desktop environment:

    BASH
    reboot
    

Prevention Advice

Recommended security practices:

  • When adding secondary disks in /etc/fstab, always use the nofail property in the parameters (e.g., defaults,nofail). This way, if the external disk is disconnected or fails, Linux will bypass mounting it and boot normally instead of crashing into emergency mode.
Author • Web Designer & App Creator

Rodolfo Castro

Web designer, app developer, and founder of SoporteCero. Specializing in UI/UX architecture, digital products, and modern web environments. Every tutorial and guide on SoporteCero is thoroughly tested and verified in our technical lab to ensure reliable, up-to-date solutions.