Filter phantom entries when rewriting EFI BootOrder (#94)
The Limine registration helper rebuilds the UEFI BootOrder from the pre-state read, but passes every entry through verbatim. Some firmware (listed in the BootOrder but with no matching BootXXXX variable) causes efibootmgr --bootorder to fail with exit status 8, aborting the whole install at the bootloader step. Only carry forward entries that still exist as boot variables.
This commit is contained in:
1 file changed
+7
-1
@@ -437,7 +437,13 @@ def _register_limine_efi_entry(
|
|||||||
raise RuntimeError("efibootmgr --create reported success but no Limine entry found")
|
raise RuntimeError("efibootmgr --create reported success but no Limine entry found")
|
||||||
limine_num = new_limine[0]
|
limine_num = new_limine[0]
|
||||||
|
|
||||||
keep = [num for num in pre_state["order"] if num not in stale_limine and num != limine_num]
|
keep = [
|
||||||
|
num
|
||||||
|
for num in pre_state["order"]
|
||||||
|
if num not in stale_limine
|
||||||
|
and num != limine_num
|
||||||
|
and num in pre_state["entries"]
|
||||||
|
]
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
["efibootmgr", "--bootorder", ",".join([limine_num, *keep])],
|
["efibootmgr", "--bootorder", ",".join([limine_num, *keep])],
|
||||||
check=True, capture_output=True,
|
check=True, capture_output=True,
|
||||||
|
|||||||
Reference in new issue
Block a user