From f32c6d37a4e5849b40498786e186b73f5411de7b Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Mon, 13 Feb 2023 21:23:18 -0600 Subject: [PATCH] build-rootfs: Avoid spurious boot errors The *ldconfig.service* fails because `/etc` is not writable and thus `/etc/ld.so.cache` cannot be generated. The files specified in the `provision.d` *tmpfiles.d(5)* configuration are unnecessary, and many of them cannot be created at runtime because the root filesystem is immutable. --- build-rootfs.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-rootfs.sh b/build-rootfs.sh index 8d00c76..8c1ca98 100755 --- a/build-rootfs.sh +++ b/build-rootfs.sh @@ -65,7 +65,10 @@ if [ -f /mnt/gentoo/etc/udev/hwdb.bin ]; then mv /mnt/gentoo/etc/udev/hwdb.bin /mnt/gentoo/usr/lib/udev/ fi +rm -f /mnt/gentoo/lib/tmpfiles.d/provision.conf + systemctl preset-all --root=/mnt/gentoo +rm -f /mnt/gentoo/lib/systemd/system/sysinit.target.wants/ldconfig.service systemd-sysusers --root=/mnt/gentoo if grep -q '^root:.*/bin/bash$' /mnt/gentoo/etc/passwd; then