On a clean Ubuntu 11.04 (Natty Narwhal) installation, I used just a single partition for everything. The line that got added in the fstab file is this
UUID=xxx / ext4 errors=remount-ro 0 1
Shouldn't there be a 'defaults' in there?
I've bumped into this while trying to move the home folder to a different partition. I've done it, and everything is working fine. I've added only errors=remount-ro
in the fstab line for /home
.
Now I'm in the process of 'securing' it, and choosing those options more wisely (like adding nodev and nosuid). So, do I need to add 'defaults' or not? Why is it not added?
Which specific options are the 'defaults' anyway in Natty Narwhal?
Do I need to add
UUID=xxx /home ext4 nodev,nosuid,errors=remount-ro 0 2
or
UUID=xxx /home ext4 defaults,nodev,nosuid,error=remount-ro 0 2
or something else?
Also, I've seen that relatime is in the defaults for Natty Narwhal. But are the defaults running if there is no mention of the defaults keyword in fstab and the 'mount' output?
errors=remount-ro
does this translate torw,relatime, errors=remount-ro
orrw,suid,dev,exec,auto,nouser,async,errors=remount-ro
? I was starting to get the impression that if 'defaults' is not explicitly mentioned, it is implied anyway, and it was removed from the fstab default configuration because of redundancy if other options exist. – george_k Aug 01 '11 at 14:20rw,relatime,errors=remount-ro
. When you mount something, you can check its mount options by issuing the commandmount
orcat /proc/mounts
. – arrange Aug 01 '11 at 18:14nodev,nosuid,errors=remount-ro
for /home, thencat /proc/mounts
returnsrw,nosuid,nodev,relatime,errors=remount-ro,barrier=1,data=ordered
as options. If I edit the fstab and add the defaults keyword, so it isdefaults,nodev,nosuid,errors=remount-ro
then after a reboot,cat /proc/mounts
returns exactly the same as the previously. Thedefaults
when added to fstab changes nothing, at least in /proc/mounts. What is going on? – george_k Aug 01 '11 at 19:45man mount
again: Some of these options could be enabled or disabled by default in the system kernel. To check the current setting see the options in /proc/mounts. It's better to list the desired options one by one and check its availability. – arrange Aug 01 '11 at 20:55man 8 mount
says for theerror
attribute available forext2
thatThe default is set in the filesystem superblock, and can be changed using tune2fs(8)
– Antonio Bardazzi Dec 25 '13 at 06:44