Bug 297234 - efibootmgr(8) doesn't honor the boot order
Summary: efibootmgr(8) doesn't honor the boot order
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 15.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-08-02 17:14 UTC by Emrion
Modified: 2026-08-04 21:49 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emrion 2026-08-02 17:14:38 UTC
efibootmgr(8) doesn't honor the boot order, at least with newly created var.

# efibootmgr -v
Boot to FW : false
BootCurrent: 0001
Timeout    : 1 seconds
BootOrder  : 0001, 0000, 0008, 0009, 0005, 0003, 0002
+Boot0001* Something HD(1,GPT,d5e1471b-9438-11ed-b38a-448a5b598b35,0x28,0x82000)/File(\efi\boot\something.efi)
                        ada1p1:/efi/boot/something.efi /boot/efi//efi/boot/something.efi
 Boot0000* FreeBSD HD(1,GPT,d5e1471b-9438-11ed-b38a-448a5b598b35,0x28,0x82000)/File(\efi\freebsd\loader.efi)
                      ada1p1:/efi/freebsd/loader.efi /boot/efi//efi/freebsd/loader.efi
 Boot0008* UEFI OS HD(1,GPT,d5e1471b-9438-11ed-b38a-448a5b598b35,0x28,0x82000)/File(\EFI\BOOT\BOOTX64.EFI)
                      ada1p1:/EFI/BOOT/BOOTX64.EFI /boot/efi//EFI/BOOT/BOOTX64.EFI
                  
 Boot0009* Hard Drive  BBS(HD,,0x0)
 Boot0005* CD/DVD Drive  BBS(CDROM,,0x0)
 Boot0003* Périphérique inconnue  BBS(0x8,,0x0)
 Boot0002* UEFI: Built-in EFI Shell  VenMedia(5023b95c-db26-429b-a648-bd47664c8012)

# efibootmgr -o 0,8,9,5,3,2,1
Boot to FW : false
BootCurrent: 0001
Timeout    : 1 seconds
BootOrder  : 0000, 0008, 0009, 0005, 0003, 0002, 0001
 Boot0000* FreeBSD
 Boot0008* UEFI OS
 Boot0009* Hard Drive 
 Boot0005* CD/DVD Drive 
 Boot0003* Périphérique inconnue 
 Boot0002* UEFI: Built-in EFI Shell 
+Boot0001* Something
root@FBS-Kikof:/home/Icarus # 
root@FBS-Kikof:/home/Icarus # 

But, when I reboot, Boot0001 is yet the first in boot order, and has started the system. How this can be?
Comment 1 Emrion 2026-08-03 17:33:42 UTC
Never mind, I found out this is very likely a bugged firmware.
For the record: motherboard B75MA-P45, firmware version E7798IMS.

When I enter in the EFI BIOS before to boot (I change nothing), I get as a result one boot var duplicated in BootOrder several times, more than 20 here. 
And now, the EFI firmware seems botched. I can't even boot nor enter in the BIOS settings... Tried a clear CMOS: no effect.

This is a bad day.
Comment 2 Emrion 2026-08-04 19:00:35 UTC
I eventually recover this machine. After removed the CMOS battery with no more result, I unplugged the drive where FreeBSD is. It booted, so I entered in the BIOS settings, modified some of them and poweroff the machine. After that, it booted even with the drive attached.

I had no idea that efibootmgr can damage a system up to this point, even one with a bugged EFI firmware.

The bug may be closed.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2026-08-04 21:49:53 UTC
^Triage: closed by submitter request.