fix failed to load /etc/fstab

How to Fix “failed to mount /etc/fstab” Error in Linux

Sometimes you may get an error in Linux saying ‘failed to mount /etc/fstab’. In this article, we will learn how to fix this problem. /etc/fstab is an important file that it automatically loaded during system boot. It is read by other programs such as mount, umount, dump and fsck. In this article, we will learn how to fix this error in Linux systems.

fstab file is a configuration file to simplify the process of mounting and unmounting filesystems in Linux. It contains a set of rules that determines how to treat each filesystem, every time it is mounted into your operating system. Otherwise, you will need to manually mount each filesystem, every time you boot your system. fstab allows you to configure rules such that when a filesystem is detected, it is automatically mounted in user’s specified order. So it not only saves work but also avoids errors due to wrong load orders.

How to Fix “failed to mount /etc/fstab” Error in Linux

/etc/fstab file consists of 6 fields:

  • block special device or remote system to be mounted
  • mount point for filesystem
  • filesystem type
  • mount options
  • information for dump tool
  • information for fsck tool.

If you edit /etc/fstab with some erroneous entries and reboot your system, it will go into emergency mode and you will see the error message.

If you login as root, and enter the following command, you will see the main error.

# journalctl -xb

Here are the main causes of errors in fstab file.

  • missing /etc/fstab file
  • wrong specification of filesystem mount options
  • failing mount points or
  • unrecognized characters in the file

The simplest way to fix these problems is to use the original backup of your /etc/fstab file that you had created before making changes to it, and copy it back to the latest /etc/fstab file overwriting it in the process.

If you don’t have a backup of original /etc/fstab file then simply comment out your changes by adding # at the beginning of the line.

How to Avoid Errors in /etc/fstab

A few simple tricks can help you avoid and fix these kind of errors.

First of all, always take a backup of original /etc/fstab file before you make any changes to it.

# cp /etc/fstab /etc/fstab.orig

Next, check the syntax & configuration before saving the file. There are many utilities that allow you to check configuration files for errors, before you apply changes to your system. You can use any of them.

If you still end up getting errors, run the following command to get more information about main error.

# journal -xb

If nothing seems to be working, just go online and download the original /etc/fstab file for your Linux distribution (Ubuntu, Debian, RHEL, etc) and version (Ubuntu 14.04, Fedora 22, etc). Overwrite /etc/fstab file on your system with the downloaded file. That will restore your /etc/fstab file to what it was after system installation.

In this article, we have learnt how to fix ‘failed to load /etc/fstab’ file in Linux.

Also read:

How to Compress Images in Linux
How to Reduce PDF Size in Linux
How to Password Protect PDF in Linux
How to Remove PDF Password in Linux
How to Uninstall NVIDIA Drivers in Ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *