From b686f6049f9447a5abe8691729fba20cf8f10f07 Mon Sep 17 00:00:00 2001 From: Nippy Date: Sat, 26 Sep 2026 09:50:02 +0200 Subject: calamares fix --- .../etc/calamares/modules/calamares-fix-bootentry.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'raveos-calamares-theme/etc/calamares/modules') diff --git a/raveos-calamares-theme/etc/calamares/modules/calamares-fix-bootentry.sh b/raveos-calamares-theme/etc/calamares/modules/calamares-fix-bootentry.sh index a462bc9..f49e1d0 100644 --- a/raveos-calamares-theme/etc/calamares/modules/calamares-fix-bootentry.sh +++ b/raveos-calamares-theme/etc/calamares/modules/calamares-fix-bootentry.sh @@ -11,9 +11,12 @@ ENTRYDIR="/boot/loader/entries" # chroot/mount-namespace context that detection can silently come back # empty, producing a loader entry with no "root=" in its options line # (system then drops to an emergency shell on boot: "Failed to mount '' -# on real root"). By this point in the install sequence /etc/fstab is -# already correctly generated, so use it as the authoritative source and -# patch any entry that is missing root=. +# on real root"). On btrfs it can also come back in findmnt's bracket form +# ("/dev/vda2[/@]"), which blkid cannot resolve -- that produces a +# syntactically present but unusable root= (emergency shell: "Failed to +# mount '/dev/vda2[/@]' on real root"). By this point in the install +# sequence /etc/fstab is already correctly generated, so use it as the +# authoritative source and patch both the missing and malformed cases. ROOT_UUID="$(findmnt -no UUID / || true)" if [ -z "${ROOT_UUID}" ]; then @@ -31,6 +34,11 @@ for f in "${ENTRYDIR}"/*.conf; do [ -f "$f" ] || continue if grep -qE '^options[[:space:]].*\broot=' "$f"; then + if grep -qE 'root=[^[:space:]]*\[' "$f"; then + echo ">>> [fix-bootentry] Fixing malformed (findmnt-style) root= in: $f" + sed -i -E "s#root=[^[:space:]]*\[[^]]*\]#root=UUID=${ROOT_UUID}#" "$f" + continue + fi echo ">>> [fix-bootentry] Already has root=, skipping: $f" continue fi -- cgit v1.3