Hot answers tagged

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 ...
JdeBP's user avatar
  • 67.8k
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 ...
Piotr Dobrogost's user avatar
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-...
telcoM's user avatar
  • 90.9k
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-...
Dave Rove's user avatar
  • 1,265
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, ...
Stephen Kitt's user avatar
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 /...
simurg's user avatar
  • 411
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 ...
TNT's user avatar
  • 401
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 ...
0xC0000022L's user avatar
  • 16.4k
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 ...
etskinner's user avatar
  • 605
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 ...
Ingo's user avatar
  • 616
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
  • 21.7k
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 ...
sourcejedi's user avatar
  • 49.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

/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
  • 821
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 ...
Kusalananda's user avatar
  • 327k
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.
steve's user avatar
  • 21.7k
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 ...
telcoM's user avatar
  • 90.9k
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 ...
steeldriver's user avatar
  • 79.7k
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 ...
Stephen Kitt's user avatar
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

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
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.
Julie Pelletier's user avatar
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,254
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
  • 15.7k
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
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 ...
Stephen Kitt's user avatar
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 ...
Faheem Mitha's user avatar
  • 34.8k
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

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