From 67d0d44d05e6e66b3d4c4af6f74a833a5a869139 Mon Sep 17 00:00:00 2001 From: jbtrystram Date: Thu, 18 Jul 2024 12:45:16 +0200 Subject: [PATCH] overlay/05core: Disable composeFS for the liveISO in the composeFS path, ostree-prepare-root want to mount /etc/ and /var as writeable, which cannot in the live iso environnement. Overriding the kernel command line to disable composeFS in that case. See https://github.com/ostreedev/ostree/issues/1921 And https://github.com/coreos/fedora-coreos-config/pull/3009#issuecomment-2235923719 --- .../usr/lib/dracut/modules.d/35coreos-live/ostree-cmdline.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-live/ostree-cmdline.sh b/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-live/ostree-cmdline.sh index c42f99db96..8d4d7914c8 100755 --- a/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-live/ostree-cmdline.sh +++ b/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-live/ostree-cmdline.sh @@ -11,7 +11,10 @@ set -euo pipefail case "${1:-unset}" in start) treepath="$(echo /sysroot/ostree/boot.1/*/*/0)" - echo "$(cat /proc/cmdline) ostree=${treepath#/sysroot}" > /tmp/cmdline + # ostree-prepare-root requires /etc and /var to be writeable for composeFS + # which cannot happen in the live ISO. Disable composeFS there + # https://github.com/coreos/fedora-coreos-config/pull/3009#issuecomment-2235923719 + echo "$(cat /proc/cmdline) ostree=${treepath#/sysroot} ostree.prepare-root.composefs=0" > /tmp/cmdline mount --bind /tmp/cmdline /proc/cmdline ;; stop)