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?
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.
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.
^Triage: closed by submitter request.