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
  • 71.9k
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-...
telcoM's user avatar
  • 114k
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-...
Dave Rove's user avatar
  • 1,435
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, ...
Stephen Kitt's user avatar
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 ...
Ingo's user avatar
  • 726
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 --...
Stephan Henningsen's user avatar
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 ...
telcoM's user avatar
  • 114k
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 ...
sourcejedi's user avatar
  • 53.5k
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) { ...
steve's user avatar
  • 22.3k
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

'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
  • 83.8k
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 ...
Stephen Kitt's user avatar
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. ...
A.B's user avatar
  • 39.5k
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,...
somethingSomething's user avatar
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
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
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,404
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.
Nils's user avatar
  • 18.6k
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
  • 16.3k
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
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 ...
Artem S. Tashkinov's user avatar
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 ...
Stephen Kitt's user avatar
12 votes

NFS: mount.nfs: Protocol not supported

I'm getting this error on Fedora 31. It turns out the drive is already mounted...
Swiss Frank's user avatar
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 ...
A_helpless_student's user avatar
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 ...
Vojtech Trefny's user avatar
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 ...
GAD3R's user avatar
  • 69.9k
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 ...
Rui F Ribeiro's user avatar
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, ...
bitinerant's user avatar
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/...
Biswapriyo's user avatar

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