What is the noauto mount flag for?
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.
ACK_stoverflow
Updated on September 18, 2022Comments
-
ACK_stoverflow over 1 year
Entries in
fstab
exist ONLY to specify things to mount at system boot or manually withmount -a
, right? But I was reading up on thenoauto
mount flag, which apparently makes corresponding fstab entries NOT auto mounted.So why would you ever put an entry in
fstab
withnoauto
? What purpose would it serve?My guess is that I'm wrong about
fstab
's only purpose being to provide arguments tomount -a
. -
ACK_stoverflow over 8 yearsI 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 forfstab
quickly shows the answer as well. Thanks for clarifying! -
Melab almost 7 years
In fact, fstab is used to provide rules by which devices are mounted, whether at boot time or not.
Such as? -
MariusMatutiae almost 7 years@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.