Differences Between nobootwait and nofail in Linux Filesystems

As Linux users, we often need to add or modify storage configurations on our systems. This usually involves working with the /etc/fstab file, which plays a key role in proper server administration. Before diving into the main topic, let’s take a moment to introduce the fstab file and its purpose.

The fstab file.

When we power up our device, the Linux boot process starts. And one of the "steps" (if you will) would be to mount the filesystems. The fstab file stores the filesystems that will be mounted at boot. To avoid manual mounting of the filesystems, we need to specify which filesystems will be mounted at boot. Usually, the different distributions of Linux have by default a fstab file with the necessary filesystems to run Linux, for example, "/" or the root, the /boot filesystem, etc.

Fstab is a plaintext file in a very simple format, but it can also be very confusing at first.

1.1 Image of a default fstab file

In the fstab file we could find six fields which are:

  1. The UUID or device: This is to list which device are we using, but the "modern" linux systems prefer using the UUID. For example we could have the following:
Device: /dev/sda1
UUID:   70ccd6e7-6ae6-44f6-812c-51aab8036d9

The device and the UUID is in practical terms the same, but as we stated before, it will be more common that we see the UUID.

  1. The mount point: This indicates where the filesystem is attached or where are we going to attach the filesystem.

  2. The filesystem type: As the name says it shows the filesystem type. One example in the image would be ext4.

  3. Options: long options for the filesystem for example Nobootwait, nofail, noauto etc.

  4. Backup information (used by the dump command): This is no longer relevant and should always be set to 0.

  5. The filesystem Integrity test order.

To conclude with the this brief introduction to the fstab file, It is worth mentioning that there are other options that we can configure in the server, the most interesting being instead of using one file to mount the filesystems, use, the /etc/fstab.d directory where we would have individual files for our filesystems. The other alternative would be to use systemd units for the filesystems, but this is out of the scope of this article.

Nobootwait

Nobootwait was an option used in Ubuntu and derivatives (during the Upstart era) within /etc/fstab to prevent the boot process from waiting for a filesystem to become available. This was particularly useful for non-critical filesystems on removable or unreliable hardware. If the device was missing, the system would continue booting without hanging.

It is no longer supported in modern Linux distributions. It was removed starting with Ubuntu 16.04 and does not exist in systemd-based systems.

Example of nobootwait option in the fstab file.

NoFail

Nofail is an option used in the Linux /etc/fstab file to indicate that the system should not fail to boot if the specified filesystem cannot be mounted during startup. It prevents the system from entering emergency mode when a mount operation fails.

Unlike nobootwait, it is supported on both RedHat and Ubuntu.

References

Use the Feedback tab to make any comments or ask questions. You can also start a conversation with us.