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 ...
55
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-...
47
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-...
44
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 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 ...
28
votes
Swapfile Swapon invalid argument
If you're using btrfs it's important that you create your swapfile without copy-on-write.
Since btrfs version 6.1, a swapfile can be created correctly with this command:
btrfs filesystem mkswapfile --...
27
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 within ...
24
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 ...
24
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) {
...
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
'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 ...
19
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 ...
17
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.
...
17
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,...
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 ...
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 ...
16
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 ...
15
votes
Remount all filesystems in fstab with new options
Have you tried the remount option?
mount -o remount -a
Should re-mount with the changed mount-options of your fstab.
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 ...
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)
13
votes
Accepted
Swapfile Swapon invalid argument
Please try replacing
fallocate -l 4G /home/.swap/swapfile
with
dd if=/dev/zero of=/home/.swap/swapfile bs=1M count=4096
Quoting from swapon(8):
Files with holes
The swap file implementation in the ...
13
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 ...
12
votes
NFS: mount.nfs: Protocol not supported
I'm getting this error on Fedora 31. It turns out the drive is already mounted...
12
votes
Swapfile Swapon invalid argument
Quite old question but I just ran into the same problem an nothing that was discussed here worked for me, but i found this in the btrfs filesystem manpage :
mkswapfile [-s size] file
Create a ...
12
votes
Accepted
Consistent auto-mount of external hard-drive
Don't use /dev/sdb1 which is not a unique identifier (sdb1 will always be assigned to the first partition on second disk you plug in and during boot the order will be random with multiple plugged in ...
12
votes
Disabling Swap on Debian Permanently
It is activated by systemd. See man systemd-fstab-generator and man systemd.swap.
Archlinux wiki: Activation by systemd
systemd activates swap partitions based on two different mechanisms. Both are ...
11
votes
Accepted
Debian server, auto-mount Samba share
You are hiting a known systemd "feature"; on top of it, the system might be trying to mount the remote SAMBA share before networking is operational.
Modify your fstab to to add to the mounting ...
11
votes
Accepted
Why is /tmp mounted with permissions 0755 when fstab has 1777?
This was part of my initial configuration (because / is mounted read-only):
sudo rm -rf /var/spool && sudo ln -s /tmp /var/spool
Apparently at boot, the system does chmod 755 /var/spool, ...
11
votes
Accepted
What is the correct permission in /etc/fstab to mount NTFS?
As commented by muru from this answer, I have added the fmask and dmask permissions in /etc/fstab and now it shows correct permissions. I have change that line as follows:
UUID=01D158CC7C2A61A0 /mnt/...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
fstab × 865mount × 392
linux × 134
automounting × 75
debian × 68
systemd × 68
ubuntu × 64
boot × 56
filesystems × 52
partition × 49
nfs × 43
cifs × 43
permissions × 42
arch-linux × 35
samba × 29
swap × 27
centos × 26
rhel × 25
sshfs × 25
tmpfs × 22
ext4 × 21
ntfs × 21
fsck × 21
uuid × 20
bind-mount × 19