Open slowpeek opened 1 year ago
Fedora 39 shimx64.efi shows the same inconsistent behavior. Reproduces for me with a single BOOTX64.CSV file containing multiple lines.
# iconv -f UCS-2LE -t UTF-8 < /boot/efi/EFI/fedora/BOOTX64.CSV
shimx64.efi,Fedora, ,Comment
shimx64.efi,6.5.5-300.fc39.x86_64,\EFI\Linux\10b06d03691b48b4935411f9bbc77a2a-6.5.5-300.fc39.x86_64.efi ,Comment
The problem
Assume the fallback creates boot entries (in such order) A, B. B would end up the top one in the bootorder. If the fallback decides not to reboot (no tpm or
FB_NO_REBOOT
is set), it would start A (intry_start_first_option()
"first" means the first one created). But every subsequent reboot it would be B because of the bootorder.How it should be: the fallback should start B. So with subsequent reboots the selected boot entry is the same.
Details
I use a virtualbox machine (efi enabled, secureboot disabled) running debian sid with shim 15.7 binaries extracted from ubuntu 22.04 shim-signed 1.51.3+15.7-0ubuntu1 package.
EFI/ layout:
efi binaries above are all the same, just copies
BOOTX64.CSV only differs in boot entry name. For example, alpha/BOOTX64.CSV
grub.cfg is a stock one created as
grub-install --removable
with a small change to pass the dir name to the main config. For example, alpha/grub.cfgmain grub config, /boot/grub/grub.cfg, is modified to append
$flavor
value to the kernel cmdline like this:After wiping out existing boot entries with
efibootmgr
, I reboot and keep hitting Esc to enter the firmware and start EFI/xtra/fbx64.efi.The fallback does its part, the system boots and
And bootorder
Now I reboot and
With the fallback it booted into "tau", but on subsequent reboots I get "beta". It is confusing from the user point.
Fallback log
The log is obtained with
mokutil --set-fallback-verbosity true
and a file attached to the machine's com port.