34

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.

2 Answers 2

38

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.

3
  • 1
    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! Commented Feb 10, 2016 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
    Commented May 19, 2017 at 16:25
  • 1
    @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. Commented May 19, 2017 at 17:21
0
UUID=C68E30678E3051E3  /mnt/ntfs1  ntfs-3g noauto,uid=1000,gid=1000,umask=0022  0  0

For a usb ssd or usb key formated with ntfs, if the usb device is not connected when the computer start or reboot, the reboot will wait because it would mount the ntfs device but it is not present. So, the boot will take a long time... with the noauto option during the boot the device is not mounted. When you are in the windows (I use kununtu), the device will be mounted automatically and when you open the file manager a message like the /mnt/ntfs1 is not mounted will appear. Just click on the device on the left and the ntfs device will be mounted and you will see your files there.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .