Bug#862992: systemd: avoid attempt to re-create /etc/mtab by systemd-tmpfiles-setup.service

Cyril Brulebois kibi at debian.org
Mon May 29 20:23:28 BST 2017


Michael Biebl <biebl at debian.org> (2017-05-29):
> I think if you use debian-installer to install the system, it will
> also create /etc/mtab (as an absolute symlink to /proc/mounts). The
> debian.conf tmpfiles config will "correct" that on first boot to make
> it a relative symlink.

As I said, finish-install (which runs at the very last stage of d-i) has
this script:
| #! /bin/sh
| 
| # some things inside d-i will make an /etc/mtab file, but it shouldn't
| # be there in the installed system. Systemd will be desperately unhappy.
| if [ -f /target/etc/mtab ]; then
|     ln -sf /proc/self/mounts /target/etc/mtab
| fi

so until all d-i components are checked/modified not to rely on or toy
with /target's /etc/mtab, this code could be made to remove the
file/link entirely when the installation is finalized.

> I guess you mean stretch, but yeah, we had this fixup rule for two
> release cycles (via debian-fixup.service in jessie and via the
> tmpfiles snippet in stretch). Maybe it's time to drop that in buster.
> Should we get d-i (and FAI) updated to drop the creation of /etc/mtab
> as well then?

d-i only gets that file into place because some of its components need
it (or used to need it). It's technically easy to modify the code above
to drop /target/etc/mtab instead of converting from a static file to a
symlink.

That being said, changing this so late in the release cycle makes me a
bit uneasy. :/


KiBi.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20170529/be7e1f94/attachment-0002.sig>


More information about the Pkg-systemd-maintainers mailing list