67
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 ...
45
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 ...
44
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-...
35
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-...
32
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, ...
31
votes
How to edit /etc/fstab when system boots to read only file system?
The way you have tried the mount command still uses the information from /etc/fstab.
Try the following version and it should work independent of the contents of /etc/fstab:
sudo mount -o remount,rw /...
30
votes
What is the difference between 'nobootwait' and 'nofail' in fstab?
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 ...
29
votes
Accepted
What are all the spaces in the /etc/fstab for?
The number of spaces is a way to cosmetically separate the columns/fields. It has no meaning other than that. I.e. no the amount of white space between columns does not matter.
The space between ...
26
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 ...
23
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 ...
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) {
...
21
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 ...
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 ...
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....
19
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 ...
18
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 ...
17
votes
What are all the spaces in the /etc/fstab for?
The spaces or tabs delimit the fields. Use as few or as many as suits. If you find fstab a little unreadable try using column to prettify it.
17
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 ...
17
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 ...
16
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 ...
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....
15
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 ...
15
votes
fstab entry for swap space
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.
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 ...
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 ...
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,...
14
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 ...
13
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". The evidence I've see suggests that this option isn't actually necessary or meaningful, but you need ...
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)
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
fstab × 818mount × 367
linux × 134
automounting × 72
debian × 64
ubuntu × 62
systemd × 59
boot × 55
filesystems × 49
partition × 48
permissions × 40
cifs × 40
nfs × 36
arch-linux × 32
centos × 27
swap × 27
samba × 26
rhel × 25
sshfs × 25
ext4 × 21
ntfs × 21
fsck × 21
uuid × 20
tmpfs × 19
bind-mount × 18