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 <joerg.sommer@navimatix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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