Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • @user253751 Probably for backwards compatibility, people might have code that depends on this behavior. Commented Apr 11, 2021 at 14:27
  • @user253751 "Why is this still a thing in modern Linux?" - It probably varies by distribution; on my system (Debian 10), /etc/mtab is a symlink to /proc/self/mounts, so mount shows all mounts. Commented Apr 11, 2021 at 16:10
  • I checked /proc/mounts but I did not see /dev/sda2 listed for / but I did see rootfs listed for /. and mtab is a separate file which also does not list /dev/sda2. fstab DOES list /dev/sda2 as explained in my question. Commented Apr 11, 2021 at 17:41
  • @Garo: I had a bunch of stuff break when they switched /etc/mtab -> /proc/mounts. Turned out that old stuff assumed that when /etc/mtab couldn't be opened for writing that / was still readonly and /etc/mtab was untrustworthy. Commented Apr 11, 2021 at 18:27
  • @Joshua I wouldn't say "untrustworthy". It's trustworthy to show you all the mounts that wanted to be listed there. :-) Commented Apr 11, 2021 at 21:50