Opened 9 years ago

Last modified 9 years ago

#1092 new task

Current status for /etc/mtab

Reported by: William Harrington Owned by: clfs-commits@…
Priority: trivial Milestone: CLFS Standard 3.1.0
Component: BOOK Version: CLFS Standard GIT
Keywords: Cc: berzerkula@…, jonathan@…, chris@…, cross-lfs@…

Description (last modified by William Harrington)

/etc/mtab is no longer being referenced in Util-linux-2.27.1, Systemd-228, and future GLIBC releases.

So far it has been appropriate to have /etc/mtab as a link to /proc/self/mounts.

We should be able to remove the creation of mtab altogether in the future.

Refer to the following for more information:

https://github.com/systemd/systemd/issues/1495

https://sourceware.org/bugzilla/show_bug.cgi?id=19108

https://sourceware.org/ml/libc-alpha/2015-11/msg00418.html

https://github.com/karelzak/util-linux/commit/02501746

https://github.com/systemd/systemd/blob/v228/NEWS

https://github.com/systemd/systemd/blob/v228/README

Change History (5)

comment:1 by William Harrington, 9 years ago

Description: modified (diff)

comment:2 by William Harrington, 9 years ago

Description: modified (diff)

comment:3 by chris@…, 9 years ago

I'm currently running a system without /etc/mtab, with only a couple differences.

Before configure on Glibc:

sed -i 's@/etc/mtab@/proc/mounts@' sysdeps/unix/sysv/linux/paths.h

After make on systemd:

sed -i '/mtab/d' tmpfiles.d/etc.conf

Haven't tried every testsuite, but the system does build and run without problems. I assume the change to Glibc should be unneeded once the next version is released. The change to systemd isn't really necessary, as it just prevents it from automatically creating an /etc/mtab link.

comment:4 by chris@…, 9 years ago

The only changes we would really need to the book would be:

  1. Add this command to the instructions for Glibc, both in cross-tools and final-system:
    sed -i 's@/etc/mtab@/proc/mounts@' sysdeps/unix/sysv/linux/paths.h
    
  2. Remove the create of /etc/mtab from the Essential Symlinks page in the Boot and Chroot sections.

Disabling the creation of /etc/mtab in tmpfiles.d/etc.conf is optional - we could just go ahead and allow systemd to continue to create it, just in case something might use it.

comment:5 by chris@…, 9 years ago

The change to Glibc is still needed for the latest version - 2.23.

Note: See TracTickets for help on using tickets.