From ade5566174310e6de0fe656c45f6b82283ad31bb Mon Sep 17 00:00:00 2001 From: rickpeters Date: Tue, 29 Sep 2026 18:13:16 +0200 Subject: [PATCH] feat: B1 check: booted through the loader's own EFI boot entry (BootCurrent, a real partition), after every reboot in the boot loader test --- scripts/vmprogress.sh | 2 +- share/bootloader-test/boot-check.sh | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/vmprogress.sh b/scripts/vmprogress.sh index c5f651f..da9e151 100755 --- a/scripts/vmprogress.sh +++ b/scripts/vmprogress.sh @@ -6,7 +6,7 @@ # changes (checked every 30 s), "ALLDONE" and exits once every started job has its summary line. # Expected counts: the last complete run of each (AGENTS.md "State"); update them when checks are added. set -uo pipefail -declare -A expect=([limine]=41 [systemd-boot]=40 [grub]=40 [cli]=55 [menu]=36 [hw]=70 [installer]=4 [toggles]=42) +declare -A expect=([limine]=43 [systemd-boot]=42 [grub]=42 [cli]=55 [menu]=36 [hw]=70 [installer]=4 [toggles]=42) once=false; jobs=() for a in "$@"; do [[ "$a" == --once ]] && once=true || jobs+=("$a"); done [[ ${#jobs[@]} -gt 0 ]] || jobs=(limine systemd-boot grub cli menu hw installer toggles) diff --git a/share/bootloader-test/boot-check.sh b/share/bootloader-test/boot-check.sh index c4b6636..e9ab73d 100755 --- a/share/bootloader-test/boot-check.sh +++ b/share/bootloader-test/boot-check.sh @@ -7,3 +7,13 @@ compgen -G "/usr/lib/modules/$k/updates/dkms/steamify-fremont-poweroff.ko*" >/de sudo dmesg | grep -q "steamify_fremont_poweroff" && pass "power-off fix loaded at boot" || fail "power-off fix not loaded" lsmod | grep -q '^leds_valve' && pass "leds_valve loaded" || fail "leds_valve not loaded" [[ -z "$(systemctl --failed --no-legend)" ]] && pass "no failed units" || { fail "failed units:"; systemctl --failed --no-legend; } +# B1: booted through the loader's own EFI boot entry, not the firmware's automatic disk entry (the +# fallback path \EFI\BOOT\BOOTX64.EFI) and not an entry without a partition (HD(0,GPT,0000...)). +cur=$(sudo efibootmgr | sed -n 's/^BootCurrent: //p') +entry=$(sudo efibootmgr -v | grep -a "^Boot$cur") +if [[ -n "$cur" && "$entry" != *auto_created_boot_option* && "$entry" =~ HD\(([0-9]+),GPT,([0-9a-fA-F-]+) \ + && "${BASH_REMATCH[1]}" != 0 && "${BASH_REMATCH[2]}" != 00000000-0000-* ]]; then + pass "booted through its own EFI entry: $(cut -f1 <<< "$entry" | cut -c1-60)" +else + fail "not booted through its own EFI entry (BootCurrent $cur: $(cut -c1-120 <<< "$entry"))" +fi