technology and zen of life

“A heisenbug (named after the Heisenberg Uncertainty Principle) is a computer bug that disappears or alters its characteristics when an attempt is made to study it.”

nofail and nobootwait mount options in fstab prevent boot problems

Problem description: You (re)boot your computer, e.g. a headless server. The boot process can halt or exit to rescue mode when an external disk is unavailable or when an internal but non-critical disk is out of order.

  • mountall tries to automount all entries from fstab that have the defaults or auto mount options. It will halt the boot process if such entries cannot be mounted, except when the mount option nobootwait is given.
  • fsck tries to do a filesystem check on all entries from fstab that have the sixth field set to 1 or 2. Non-critical drives typically have this field set to 2. It will halt the boot process if such filesystems cannot be checked, except when the mount option nofail is given.

A possible disadvantage of nobootwait is that, if the disk is actually present, it will do the filecheck in the background and continue booting. That might be exactly what you want for e.g. external drives, but if other services depend on the drive, then those services can fail.

Another disadvantage of nobootwait is the fact that it is not supported by all Linux distributions. For example, using Scientific Linux (RHEL) 6.4, I cannot mount a partition that has the nobootwait set in fstab.

According to the fsck man page, this is what nofail does:

fsck normally does not check whether the device actually exists before calling a file system specific checker. Therefore non-existing devices may cause the system to enter file system repair mode during boot if the filesystem specific checker returns a fatal error. The /etc/fstab mount option nofail may be used to have fsck skip non-existing devices. fsck also skips non-existing devices that have the special file system type auto

Ubuntu has a bug listed: “mountall ignores nofail mount option”. That makes sense, as mountall has not implemented nofail. It uses nobootwait. The bug reporters argue that both mountall and fsck should make use of the nofail option, and I agree with them.

So, if you want to be on the safe side, you

  • should use both nobootwait and nofail.
  • should test this with a manual umount followed by a mount.
  • should have no services depending on non-critial disks.

Below an example from my own SE 6.4 server using only the nofail option, because mounting with the nobootwait option present gives an error.

LABEL=Series  /mnt/filer/Series  xfs  auto,nofail,nodev,noexec,nouser,noatime  0  2


About Evert Mouw

Interested in kinda everything, studied political science, now studying medical informatics. MCSE, Linux enthousiast, and believing that technology is the path to enlightenment 😉 Best RTS game ever is Warhammer Soulstorm (IMHO). Other hobbies include hiking, kayaking, reading and when I have time, trying to have an ant colony in an artificial nest (formicarium).

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

3 Responses

  1. […] for each storage pool drive partition in fstab we can add the options ‘nofail‘ and &#821….  This setting enables the server to boot even when one or more storage pool disks are removed or dead. For an example here is a fstab entry for a storage pool drive. […]

  2. […] nofail and nobootwait mount options in fstab prevent boot problems […]


The views expressed on this blog are personal. We do not claim to be a representative voice of the views of any organisation whatsoever. We are not responsible for the content present on the blogs to which we have linked.Views expressed are solely that of the author and does not reflect a collective opinion of contributors.
%d bloggers like this: