Repository navigation
os/mini: register the firmware boot entry and prove it under OVMF (engine #709) - #1258
Merged
Merged
Conversation
…and test it without a device (engine #709) The installer already created the 1bit OS entry, set BootNext and removed stales, but it only matched entries pointing at the NEW ESP GUID, so the wiped-Ubuntu entry (old ESP GUID, gone from disk) survived; and its efivarfs/boot-entry code had no device-free test. Extract the selection/rollback rules into os/mini/efi-boot.sh: remove ours with the loader missing and entries whose GPT partition no longer exists on any block device, never a foreign entry whose partition still exists; on any failure delete the created entry and restore the original BootOrder minus the provably-stale removals. install.sh sources it, mkimage ships it, tests/os_mini_efi_boot_test.sh exercises it with a fake efibootmgr/sysfs and is registered with ctest. vmtest.sh now accepts the efivarfs init.sh already mounted (its second mount failed EBUSY, so a working install printed SKIP) and asserts the entry points at \EFI\BOOT\BOOTX64.EFI and BootNext names it. Unpark evidence: the running stage tree is a single 7.4.0-rc1-1bit build (CONFIG_EFIVAR_FS=m; 3825 modules incl efivarfs.ko.xz; vermagic 7.4.0-rc1-1bit matches uname; modprobe -S probe resolves); live efivarfs has 100 entries. The old 122-module tree/vermagic mismatch is gone. Assisted-by: DeepSeek Harness
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unparks engine #709 on the installer side, with the kernel rebuild verified from source.
Stage-kernel verdict: the rebuild happened
Measured on strixhalo, not inferred:
uname -r=7.4.0-rc1-1bit;/boot/config-7.4.0-rc1-1bithasCONFIG_EFIVAR_FS=m./lib/modules/7.4.0-rc1-1bit(build link/usr/src/linux-headers-7.4.0-rc1-1bit) carries 3825 modules includingkernel/fs/efivarfs/efivarfs.ko.xz;include/config/kernel.release=7.4.0-rc1-1bit.modprobe -S 7.4.0-rc1-1bit --show-depends efivarfs->insmod .../efivarfs.ko.xz(this is exactlyos/mini/mkimage.sh:154's probe); vermagic7.4.0-rc1-1bit SMP preempt mod_unload modversions, the same as the running kernel./sys/firmware/efi/efivarswith 100 entries.== efivarfs.ko for 7.4.0-rc1-1bit: staged (the installer can write a boot entry).The old failure mode (122-module pruned tree,
perfoptvsperfopt+vermagic) is gone: this is one build.Installer changes
os/mini/efi-boot.shholds the firmware rules;install.shsources it andmkimage.shships it at/bin/efi-boot.sh.BootOrderminus only the provably-stale removals; success still creates1bit OS->\EFI\BOOT\BOOTX64.EFI, puts it first, setsBootNext, prints the resultingBootOrder, and the existing remove-the-stick countdown is unchanged.Tests / evidence
tests/os_mini_efi_boot_test.sh(new, device-free: fake efibootmgr + fake/sys/class/block) covers stale selection, success (entry path/first/BootNext), and rollback;PASS os_mini_efi_boot. Registered as ctestos_mini_efi_boot.os/mini/vmtest.sh):VMTEST PASS, includinginstall boot entry: Boot0009 '1bit OS' is first in BootOrder (0009,0000,...)install boot entry: Boot0009 points at \EFI\BOOT\BOOTX64.EFIinstall boot entry: BootNext is 0009and the guest's own serial log shows the installer step:
Boot0009* 1bit OS -> \EFI\BOOT\BOOTX64.EFI on /dev/nvme0n1, BootNext set.init.shhad already mounted (EBUSY) and printed SKIP for a working install; it now accepts an existing BootOrder variable.0000,000B,0001,0005,0006,0002,000A,000C,000D,000E); no NVRAM write was made on this box because it would touch the live Ubuntu/Boot0000 entry. The OVMF gate is the end-to-end proof.EC_MODULE=skiphere because this box's locally built EC module is unsigned and mkimage refuses unsigned modules; that is an environment property of this host, not a product change.Remains: merge, build the next candidate image, and run one install on real hardware; the stale-old-UUID removal is covered by the unit test (a fresh OVMF varstore has no such entry). No engine/pin changes.