The Arch Wiki on fstab specifies the options of / to be defaults,noatime, but on my installation the default fstab is created with the options of rw,relatime. The Arch Wiki covers the atime issues. What I am curious about is the defaults option. The man page for mount says:
defaults
Use the default options: rw, suid, dev, exec, auto, nouser, and async.
Note that the real set of all default mount options depends on kernel and filesystem type. See the beginning of this section for more details.
Are the default options used only if the defaults option is provided or are they used in all cases? Do I need defaults in my fstab?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
You only need defaults if the field would otherwise be empty.
You can leave out the options field altogether if it’s empty, unless the 5th or 6th fields are present. Field 5 is the dump frequency, rarely used nowadays. Field 6 fsck order, should be 1 for /, 2 for other filesystems mounted on boot and 0 otherwise. Fields 5 and 6 can be omitted if their value is 0, except that field 5 needs to be present if field 6 is.
Thus defaults is necessary in
/dev/foo /foo somefs defaults 0 1
(though you can use some other option like rw or ro instead)
But it can be omitted when you specify another option.
eg: The mounts below have the same effect.
/dev/foo /foo somefs ro 0 1 /dev/foo /foo somefs defaults,ro 0 1
But these also have the same effect.
/dev/foo /foo somefs defaults 0 0 /dev/foo /foo somefs
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0