Thursday, 29 October 2015

Re: xenial: Watch out for boot failures due to /etc/mtab file

Oliver Grawert [2015-10-29 15:36 +0100]:
> i have been wondering for years why does it have to exist at all, if it
> is only a symlink anyway, why cant apps/services not directly
> use /proc/self/mounts ? could we perhaps get completely rid of mtab and
> all the pain it brings along ? (i know this would be a huge project
> indeed, but it seems a lot cleaner as an end-result)

That would indeed be nice, but this is rather deeply entrenched API.
As it stands, as long as glibc still defines _PATH_MOUNTED as
/etc/mtab, tons of software gets compiled with this path. So I hope
that gets fixed,
and in a few years when software gets rebuilt we might indeed be able
to drop it completely.

But there's also still a lot of stuff which hardcodes /etc/mtab: (most of it
should be noise, but there's some actual hits)

So, yay for the legacy of many decades of a Unix misdesign :-/

Our own plumbing stuff should be fairly okay now. util-linux 2.27.1
will disregard /etc/mtab completely, systemd doesn't care, udisks etc.
also don't. But the world is bigger than that.


Martin Pitt |
Ubuntu Developer ( | Debian Developer (

ubuntu-devel mailing list
Modify settings or unsubscribe at: