How do I list all options a file system is mounted with?

Both mount and cat /proc/mounts do not give me all the options I specified in the 'options' field in /etc/fstab.

For example, this is in my /etc/fstab:

# <file system>                                 <mount point>   <type>  <options>                                       <dump>  <pass>
UUID=1afaad96-8aa3-4283-95a4-20510e5b3fbb      /               ext4    rw,async,exec,nouser,suid,errors=remount-ro     0       1

But the output of mount just gives me this (mount -v doesn't work either):

/dev/sda6 on / type ext4 (rw)

And `cat /proc/mounts:

rootfs / rootfs rw 0 0

How can I check with what options my file systems are mounted?


The problem is that you are not understanding what "rootfs" means.

If you cat /proc/mounts, or filter the output with grep or awk, you do indeed get a list of all them mounts and the options as indicated by @steeldriver.

The first line, rootfs / rootfs rw 0 0 is not your root partition, it is used by the kernel.

What is rootfs?

Rootfs is a special instance of ramfs (or tmpfs, if that's enabled), which is always present in 2.6 systems. You can't unmount rootfs for approximately the same reason you can't kill the init process; rather than having special code to check for and handle an empty list, it's smaller and simpler for the kernel to just make sure certain lists can't become empty.

Most systems just mount another filesystem over rootfs and ignore it. The amount of space an empty instance of ramfs takes up is tiny.

If CONFIG_TMPFS is enabled, rootfs will use tmpfs instead of ramfs by default. To force ramfs, add "rootfstype=ramfs" to the kernel command line.

See https://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt

Look closer at the output, or filter the results with grep or awk

grep '/dev' /proc/mounts

The /proc/mounts file should indeed contain the options (including default options for each filesystem), however the rootfs entry that you picked out is just a ramfs over which the actual root block device gets mounted - there should be another entry for the real device e.g.

$ mount | grep ' / '
/dev/mapper/t60p-root on / type ext4 (rw,errors=remount-ro)

$ grep ' / ' /proc/mounts
rootfs / rootfs rw 0 0
/dev/mapper/t60p-root / ext4 rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered 0 0