Skip to main content
68 votes

What is /etc/mtab in Linux?

% file /etc/mtab /etc/mtab: symbolic link to ../proc/self/mounts % file /proc/mounts /proc/mounts: symbolic link to self/mounts % /etc/mtab is a compatibility mechanism. Decades ago, Unix did not ...
JdeBP's user avatar
  • 69.5k
50 votes
Accepted

How does _netdev mount option in /etc/fstab work?

From man systemd.mount for version 231 of systemd: Mount units referring to local and network file systems are distinguished by their file system type specification. In some cases this ...
Piotr Dobrogost's user avatar
47 votes
Accepted

What is UUID, PARTUUID and PTUUID?

UUID is a filesystem-level UUID, which is retrieved from the filesystem metadata inside the partition. It can only be read if the filesystem type is known and readable. PARTUUID is a partition-table-...
telcoM's user avatar
  • 101k
40 votes

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

Since this old question has a high Google rating, I'll mention that since "nobootwait" doesn't work with systemd, the correct method is to set a short timeout of, say, 9 seconds with "x-...
Dave Rove's user avatar
  • 1,335
34 votes
Accepted

How to force OS reload of fstab?

I suspect this is caused by systemd’s conversion of /etc/fstab; traditional mount doesn’t remember the contents of /etc/fstab. To refresh systemd’s view of the world, including changes to /etc/fstab, ...
Stephen Kitt's user avatar
27 votes
Accepted

Cannot boot because missing external disk

Using the nofail mount option will ignore missing drives during boot. See man pages fstab(5) and mount(8). nofail Do not report errors for this device if it does not exist. So your fstab line should ...
etskinner's user avatar
  • 615
26 votes

How to force OS reload of fstab?

To elaborate the answer from @Stephen Kitt: for example I have this entry in /etc/fstab: vnetsvr-home:/etc/skel /etc/skel nfs4 sec=krb5p,noauto,x-systemd.automount,x-systemd.idle-timeout=10min ...
Ingo's user avatar
  • 646
23 votes

fstab mount options for umask, fmask, dmask for ntfs with noexec

The x flag is necessary for directories, in order to access their contents. With just the r flag on a directory, you can get a directory listing, but cannot access the files and subdirectories ...
telcoM's user avatar
  • 101k
23 votes

How does the Linux command "mount -a" work?

It skips ones already mounted. https://github.com/karelzak/util-linux/blob/master/sys-utils/mount.c#L185-L193 while (mnt_context_next_mount(cxt, itr, &fs, &mntrc, &ignored) == 0) { ...
steve's user avatar
  • 22.1k
22 votes
Accepted

Is there any reason to move away from fstab on a systemd system?

From man systemd.mount itself: fstab Mount units may either be configured via unit files, or via /etc/fstab (see fstab(5) for details). Mounts listed in /etc/fstab will be converted into native units ...
sourcejedi's user avatar
  • 51.1k
22 votes
Accepted

/etc/fstab: meaning of "nofail" if "noauto" is already specified

Just for the record: For an external USB disk which is usually not connected at startup, I have an fstab entry /dev/disk/by-label/data /data xfs noauto,user,noatime 0 0 When booting there is no ...
ridgy's user avatar
  • 841
20 votes
Accepted

Why do I have "errors=remount-ro" option in my ext4 partition in my Linux?

It is perfectly valid for ext4, and is defined in the ext4 manpage: errors={continue|remount-ro|panic} Define the behavior when an error is encountered. (Either ignore errors ...
Stephen Kitt's user avatar
20 votes
Accepted

Drive mounted with flags different from /etc/fstab - not respecting suid, dev, or exec

You must put the exec, suid and dev options after the user option, because user implies noexec, nosuid and nodev. See mount man page for details: user Allow an ordinary user to mount the filesystem....
Vojtech Trefny's user avatar
19 votes
Accepted

What 'sw' means in the fstab swap entry for 'mount options' column

From the fstab manual on my system: The fourth field, fs_mntops, describes the mount options associated with the filesystem. It is formatted as a comma separated list of options. It contains at ...
Kusalananda's user avatar
  • 339k
18 votes
Accepted

'exec' option ignored in fstab for sshfs, need to specify to 'mount' on command-line?

The exec option is not being ignored - it's being overwritten by an implicit noexec associated with the subsequent user option. This behavior is alluded to in man mount: user Allow an ordinary ...
steeldriver's user avatar
  • 81.9k
17 votes
Accepted

Why swap space doesn't get filesystem check at boot time?

At boot time, swap doesn’t contain any data which would need to be recovered, so there’s no point in writing a tool to repair swap. If a swap partition or file is corrupted in such a way that swapon ...
Stephen Kitt's user avatar
17 votes
Accepted

What is swap priority and why does it matter

man 2 swapon describes priorities thus: Each swap area has a priority, either high or low. The default priority is low. Within the low-priority areas, newer areas are even lower priority than older ...
Stephen Kitt's user avatar
16 votes

Difference between 'sync' and 'async' mount options

Words of caution: using the 'async' mount option might not be the best idea if you have a mount that is constantly being written to (ex. valuable logs, security camera recordings, etc.) and you are ...
Andreas Mikael Bank's user avatar
16 votes

fstab entry for swap file

There is no UUID for a file. Simply enter it as: /swapfile none swap defaults 0 0 Since it's directly on the root filesystem, there's no worry about the mounting order.
Julie Pelletier's user avatar
16 votes

What 'sw' means in the fstab swap entry for 'mount options' column

For Linux, at least, based on a look at the net, this appears to be an example of "cargo culting", which means including code or words in this case for ritualistic or superstitions reasons, ...
Faheem Mitha's user avatar
  • 35.4k
16 votes
Accepted

/etc/fstab fails to bind mount on boot, but running mount -a works correctly

If you are using systemd, mounts are done in parallel (by dynamically converting the fstab entries into mount units), line ordering is not preserved as would be expected from pre-systemd experience. ...
A.B's user avatar
  • 37.2k
15 votes

mount error 13 = Permission denied

I ran into this problem and the issue turned out to be not formatting the values in my credentials file correctly. I tried: username=DOMAIN\mylogin password=<password> domain=FULLY.QUALIFIED....
Mark Salisbury's user avatar
15 votes

How can I have a filesystem mounted during user login?

Latecomer here. It may be a little counterintuitive, but I use the service (rather than mount) systemd user unit and it works for me. I had to add the user and noauto options to /etc/fstab entry. ...
byly's user avatar
  • 151
15 votes
Accepted

"Permission denied" with ffmpeg (via snap) on external drive

So after a lot of digging I figured the issue is with snap package manager. Apparently by default, snap can't access the media directory so we need to manually fix this. Check if ffmpeg has access to ...
Pithikos's user avatar
  • 3,334
14 votes

What is /etc/mtab in Linux?

According to man mount: The programs mount and umount traditionally maintained a list of currently mounted filesystems in the file /etc/mtab. This real mtab file is still supported, but on current ...
Christopher's user avatar
14 votes

How to make an fstab entry for sshfs on non-standard SSH port and using ssh key

The entry in /etc/fstab you're looking for is: Using the ,port=PORTNUMBER and ,IdentityFile=/root.ssh/id_rsa options: sshfs#USER@IP-ADDRESS:/export/inbox /mnt/inbox fuse.sshfs delay_connect,...
somethingSomething's user avatar
13 votes

mount -a does not work, but mounting manually works

I see you have the noauto flag set. This means "don't mount with the -a flag" From man 5 fstab noauto do not mount when "mount -a" is given (e.g., at boot time)
Stephen Harris's user avatar
12 votes

UUID of a drive that won't show up in /dev/disk/by-uuid or blkid

I have found that file -s can give the UUID for a partition in a case where blkid will not: sudo file -s /dev/sda1 /dev/sda1: Linux rev 1.0 ext2 filesystem data (mounted or unclean), UUID=ef55765f-...
mwfearnley's user avatar
  • 1,126
12 votes
Accepted

Why is there a `proc` mount in fstab

Historically, /proc wasn’t automatically mounted, which is why some systems still list it in /etc/fstab. Nowadays systemd takes care of mounting a number of “API file systems” including /proc, so any ...
Stephen Kitt's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible