dcljr Tux's lil' helper
Joined: 20 Aug 2005 Posts: 139 Location: Austin, TX
|
Posted: Tue Sep 23, 2014 9:07 am Post subject: using defaults option in fstab |
|
|
So, as I understand things, the "defaults" option in the fourth field in /etc/fstab entries -- for example:
Code: | /dev/sda2 /boot ext2 defaults 0 2 |
stands for a predetermined set of, well... default options.
Fine... so two questions about this:
- Is there any reason at all to specify "defaults" along with other options?
- Doesn't the exact list of options implied by "defaults" actually depend on the filesystem type?
Regarding question 1:
The x86, amd64, alpha, hppa, and mips versions of the Handbook provide in Chapter 8 a "full /etc/fstab example" containing the line:
Code: | /dev/sda2 /boot ext2 defaults,noatime 0 2 |
Now, if the "defaults" are indeed defaults, they shouldn't need to be referred to explicitly alongside other options. The only time "defaults" should need to be specified is if the options field would otherwise be empty (as in the first code snippet above). IOW, the second fstab entry above actually need only say:
Code: | /dev/sda2 /boot ext2 noatime 0 2 |
Right? These two lines are completely equivalent?
Regarding question 2:
Both fstab(5) and mount(8) explain that "defaults" stands for:
Code: | rw, suid, dev, exec, auto, nouser, and async |
But then in the various "Mount options for ..." sections farther down in mount(8), lots of options are described as "the default" for the respective filesystems. (For example, the "nocheck" option for ext2 filesystems. -- And even in the "FILESYSTEM INDEPENDENT MOUNT OPTIONS" section, "diratime" is described as "the default", even though that option wasn't listed among the options implied by "defaults".)
So the actual list of options implied by "defaults" technically depends on the filesystem type. Right? |
|