Survive kernel updates on a /boot this small
Some checks failed
build image / build (push) Has been cancelled

A dnf upgrade to 7.1.8 installed the kernel rpm cleanly, then ran /boot out
of space. dracut wrote no initramfs, and because kernel-install stops at the
first failing plugin, 95-c630-devicetree never ran either — leaving a boot
entry with neither an initrd nor a devicetree line, which on this machine can
never boot. dnf reported success and nothing retried.

A kernel costs ~336 MiB here: a 210 MiB hostonly=no initramfs, a 98 MiB
dtb-<kver> directory carrying every board's device tree, plus vmlinuz and
System.map. Three of those cannot fit 1 GiB, so /boot goes to 2 GiB and
installonly_limit drops to 2.

Also fixes the quieter half of the same trap. snd-soc-wsa881x lives outside
the kernel package, so the speakers go silent after any kernel update with
nothing in the logs to explain it. c630-wsa881x rebuilds it and
96-c630-wsa881x.install calls it on each kernel-install add — always exiting
0, since a plugin failure is precisely what caused the damage above.

grub.cfg gains the next_entry one-shot block that has been carried by hand all
along, so testing a kernel costs a power cycle rather than a rescue.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011XgGF5wfxLDAybVnNz6eNQ
This commit is contained in:
2026-08-14 16:17:52 +03:00
parent b5c5218b81
commit 477d43aacd
7 changed files with 231 additions and 1 deletions

View File

@@ -365,6 +365,23 @@ if [ -s \$prefix/grubenv ]; then
load_env
fi
# One-shot boot selection. Booting a test kernel on this machine means either
# catching a 5-second menu on a laptop that may not have its display up yet, or
# making the test kernel the permanent default and hoping it boots — which has
# already cost one recovery via rd.break. Instead:
#
# sudo grub2-editenv /boot/grub2/grubenv set next_entry=c630-<kver>
#
# takes effect for exactly one boot and then reverts, so a kernel that hangs
# costs a power cycle rather than a rescue. Entry ids are the BLS file names in
# /boot/loader/entries without the .conf.
if [ "\$next_entry" ] ; then
set default="\$next_entry"
set next_entry=
save_env next_entry
set boot_once=true
fi
blscfg
EOF
: > "$ROOTFS/boot/grub2/grubenv"