gates / gates (push) Successful in 44s
Wrapper layer kernel (stage / reboot / boot / good / revert / cancel / status; R20-R23), the two GRUB generators in the bundle (option C on the one-shot entry), the agent's night step and after-boot judge (host health rule + hub reached, 20 min measured), the signed os_kernel_step (stage only). Red-proofs: felhom.eu audits/kernel-lane-2026-10-07/A/redproof.txt. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
40 lines
2.1 KiB
Bash
40 lines
2.1 KiB
Bash
#!/bin/sh
|
|
# /etc/grub.d/42_felhom_oneshot — the kernel lane's one-shot ENTRIES (R-836, `09` §3 decision 172, `11` §5.11).
|
|
# Installed by the config bundle (felhom-os-apply BUNDLE_FILES), 0755 root. update-grub runs it.
|
|
#
|
|
# One menu entry per installed Proxmox kernel, id `felhom-oneshot-<version>`, booted ONLY when 01_felhom_oneshot found
|
|
# the flag naming it. It is the normal entry plus option C (decision 172): softlockup_panic=1 hardlockup_panic=1
|
|
# hung_task_panic=1 panic=10 — a lockup the kernel can detect becomes a panic, and a panic restarts the box in 10 s into
|
|
# the default (the old kernel). A true dead freeze still needs a person (spike candidate 3 failed on all three boxes).
|
|
# It sorts AFTER 10_linux, so it is never entry 0 and never the default.
|
|
#
|
|
# No vfat ESP at /boot/efi → prints nothing (no flag can name these entries).
|
|
set -e
|
|
prefix="/usr"
|
|
exec_prefix="/usr"
|
|
datarootdir="/usr/share"
|
|
. "$datarootdir/grub/grub-mkconfig_lib"
|
|
esp_uuid=$(findmnt -n -o UUID,FSTYPE /boot/efi 2>/dev/null | awk '$2 == "vfat" { print $1 }')
|
|
[ -n "$esp_uuid" ] || exit 0
|
|
kernels=$(ls /boot/vmlinuz-*-pve 2>/dev/null | sed 's#^/boot/vmlinuz-##' | grep -E '^[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-pve$' || true)
|
|
[ -n "$kernels" ] || exit 0
|
|
case "${GRUB_DEVICE}" in
|
|
/dev/mapper/*|/dev/dm-*|"") root_arg="root=${GRUB_DEVICE}" ;;
|
|
*) if [ -n "${GRUB_DEVICE_UUID}" ]; then root_arg="root=UUID=${GRUB_DEVICE_UUID}"; else root_arg="root=${GRUB_DEVICE}"; fi ;;
|
|
esac
|
|
[ -n "${GRUB_DEVICE}" ] || root_arg="root=$(findmnt -n -o SOURCE /)"
|
|
rel=$(make_system_path_relative_to_its_root /boot)
|
|
prep=$(prepare_grub_to_access_device "$(${grub_probe:-grub-probe} --target=device /boot)" | sed 's/^/ /')
|
|
for k in $kernels; do
|
|
[ -f "/boot/initrd.img-$k" ] || continue
|
|
cat <<EOF
|
|
menuentry 'Felhom one-shot: $k' --class proxmox --id felhom-oneshot-$k {
|
|
insmod gzio
|
|
$prep
|
|
echo 'Loading Linux $k (felhom one-shot) ...'
|
|
linux $rel/vmlinuz-$k $root_arg ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} softlockup_panic=1 hardlockup_panic=1 hung_task_panic=1 panic=10
|
|
initrd $rel/initrd.img-$k
|
|
}
|
|
EOF
|
|
done
|