15

Entries in fstab exist ONLY to specify things to mount at system boot or manually with mount -a, right? But I was reading up on the noauto mount flag, which apparently makes corresponding fstab entries NOT auto mounted.

So why would you ever put an entry in fstab with noauto? What purpose would it serve?

My guess is that I'm wrong about fstab's only purpose being to provide arguments to mount -a.

22

A noauto entry in fstab is one which, for different reasons, you do not want to have mounted automatically, at boot and with the mount -a command. It is mounted by specifying the device or the mount point explicitly, like in

   sudo mount /dev/sdb1

or

   sudo mount /home/MyName/MyMountPoint

The cases in which you do not necessarily wish a device to be mounted at boot are numerous,for instance when we are talking about a network device, which may or may not be available at boot time (you could be on a laptop, and away from home). Or it might be an encrypted device, for which you have to provide a password, and you want to have to do that only when you truly need that. And so on.

In fact, fstab is used to provide rules by which devices are mounted, whether at boot time or not.

  • I was not aware that mount had a usage that did not include both the block device and the mountpoint. Guess I should just RTFM - man mount and search for fstab quickly shows the answer as well. Thanks for clarifying! – ACK_stoverflow Feb 10 '16 at 18:01
  • In fact, fstab is used to provide rules by which devices are mounted, whether at boot time or not. Such as? – Melab May 19 '17 at 16:25
  • @Melab credentials for mounts requiring username and password, auto or noauto, the type of filesystem of the mount, whether it is readonly or not, what to do in case of errors. – MariusMatutiae May 19 '17 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.