From: Jörg Sommer Date: Thu, 16 Jul 2026 20:06:47 +0000 (+0200) Subject: base-files: Install /etc/mtab in a systemd-friendly way X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6660edebe2ad83b6d20f9ccc6f0d68698b3ca757;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git base-files: Install /etc/mtab in a systemd-friendly way The old mtab pointed to /proc/mounts which itself is a symlink. Systemd therefore tries to replace it with a symlink to /proc/self/mounts, but fails on a read-only rootfs: systemd-tmpfiles: symlink(../proc/self/mounts, /etc/mtab) failed: Read-only file system Signed-off-by: Jörg Sommer Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb index 0cd6600782..332c094eee 100644 --- a/meta/recipes-core/base-files/base-files_3.0.14.bb +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb @@ -102,7 +102,8 @@ do_install () { install -m 0644 ${S}/host.conf ${D}${sysconfdir}/host.conf install -m 0644 ${S}/motd ${D}${sysconfdir}/motd - ln -sf /proc/mounts ${D}${sysconfdir}/mtab + # systemd likes to have a relative link + ln -sf --relative ${D}/proc/self/mounts ${D}${sysconfdir}/mtab # deal with hostname if [ "${hostname}" ]; then