From 742b77e1d2e3c01f1bdd9733dea1ffa2b780cfd3 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Tue, 30 Apr 2024 11:41:02 +0200 Subject: [PATCH] mkosi: Make sure we create an image without /var/log/journal This allows journald to create the directory itself with the right chattr settings on first boot. --- mkosi.images/system/mkosi.postinst.chroot | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mkosi.images/system/mkosi.postinst.chroot b/mkosi.images/system/mkosi.postinst.chroot index 43978316fcd..f2b0ba09c2d 100755 --- a/mkosi.images/system/mkosi.postinst.chroot +++ b/mkosi.images/system/mkosi.postinst.chroot @@ -68,3 +68,7 @@ rm -f /etc/resolv.conf for f in "$BUILDROOT"/usr/share/*.verity.sig; do jq --join-output '.rootHash' "$f" >"${f%.verity.sig}.roothash" done + +# We want /var/log/journal to be created on first boot so it can be created with the right chattr settings by +# systemd-journald. +rm -r "$BUILDROOT/var/log/journal"