Things grow tedious quickly when playing with a massive tool like mount. With different filesystem types and different settings for each filesystem, mount stood the test of time. I wonder how mount knows which default settings when mounting a filesystem. Aside from the fact the udisksd daemon automatically mounts fielsystems, how does mount determine the appropriate settings when mounting a filesystem without options like the following:
# mount /dev/sdc /media/usb_drive What we're particularly interested at is the long options of mount such as (ro, rw, noexec, exec, nodev,...). As seen above, the command doesn't list any long options:
$ mount | grep /dev/sdc /dev/sdc on /media/usb_drive type ext4 (rw,relatime,data=ordered) You can see some options were used by default for the ext4 filesystem when mounting /dev/sdc: (rw,relatime,data=ordered). Though, there's no entry for /dev/sdc in fstab. Notice that the filesystem lives on the whole usb drive not on a partition. The above command looks like as if we ran this command:
# mount /dev/sdc /media/usb_drive -o rw,relatime,data=ordered What is the mechanism that mount uses to determine the appropriate default mounting options?