What is the difference between 'nobootwait' and 'nofail' in fstab?

Firstly nofail allows the boot sequence to continue even if the drive fails to mount.

This is what fstab(5) says about nobootwait

The mountall(8) program that mounts filesystem during boot also recog‐ nises additional options that the ordinary mount(8) tool does not. These are: bootwait which can be applied to remote filesystems mounted outside of /usr or /var, without which mountall(8) would not hold up the boot for these; nobootwait which can be applied to non-remote filesystems to explicitly instruct mountall(8) not to hold up the boot for them; optional which causes the entry to be ignored if the filesystem type is not known at boot time; and showthrough which permits a mountpoint to be mounted before its parent mountpoint (this latter should be used carefully, as it can cause boot hangs).

fstab(5) has this to say about nofail

nofail do not report errors for this device if it does not exist.


As mentioned by Stéphane, nobootwait is limited to ubuntu+derivatives.

Nofail will keep trying to mount the drive as cjm pointed out, however, the boot process will continue after the mount reaches timeout. If you don't expect the drive to be there regularly as to warrant the extra 90 seconds or so bootup when it's absent, don't automount it in fstab.

(P.S. I put this as cjm's answer sounds as if the system will ultimately fail to boot).


Since this old question has a high Google rating, I'll mention that since "nobootwait" is no longer valid, the current method is to set a short timeout of, say, 9 seconds with "x-systemd.device-timeout".

e.g.:

/dev/sda2  /mnt/other  auto  defaults,nofail,x-systemd.device-timeout=9  0  2

(Edit: I've increased the timeout from 3s to 9s because it seems that Ubuntu occasionally does a quick filesystem-check on bootup that can last longer than 3s.)

Tags:

Fstab