rhboot / efibootmgr

efibootmgr development tree
GNU General Public License v2.0
522 stars 100 forks source link

Unable to delete bootloaders with invalid numbers (Boot000d_BbsIndex) #208

Closed Betonhaus closed 6 months ago

Betonhaus commented 6 months ago

Computer is a ThinkServer TS430 running Debian 12 when attempting to move OS to a NVMe drive in a PCIe slot adapter three invalid efi boot entries were added, identified with a lowercase letter followed by "BbsIndex". these boot entries are listed in system boot options with an identical name to '#0', but selecting them will not boot the system and using a recovery disk is required to create and set a new valid entry. attempting to delete the invalid entries using -b d -B will delete one of the valid entries instead

$ efibootmgr
** Warning ** : Boot000d is not UEFI Spec compliant (lowercase hex in name)
** Warning ** : Boot000e is not UEFI Spec compliant (lowercase hex in name)
** Warning ** : Boot000f is not UEFI Spec compliant (lowercase hex in name)
** Warning ** : please recreate these using efibootmgr to remove this warning.
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,000D,000B,000E,000F,0001
Boot0000* debian
Boot0001* Windows Boot Manager
Boot000B* UEFI: Built-in EFI Shell 
Boot000D  PLDS DVD-RW DH16ACSH
Boot000E  WDC WDS100T2G0A-00JH30
Boot000F  SanDisk
Boot000d_BbsIndex* 
Boot000e_BbsIndex* 
Boot000f_BbsIndex* 
$ efibootmgr -v
** Warning ** : Boot000d is not UEFI Spec compliant (lowercase hex in name)
** Warning ** : Boot000e is not UEFI Spec compliant (lowercase hex in name)
** Warning ** : Boot000f is not UEFI Spec compliant (lowercase hex in name)
** Warning ** : please recreate these using efibootmgr to remove this warning.
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,000D,000B,000E,000F,0001
Boot0000* debian    HD(1,MBR,0x9b99d299,0x800,0x76800)/File(\EFI\debian\shimx64.efi)
Boot0001* Windows Boot Manager  VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...t................
Boot000B* UEFI: Built-in EFI Shell  VenMedia(5023b95c-db26-429b-a648-bd47664c8012)AMBO
Boot000D  PLDS DVD-RW DH16ACSH  BBS(CDROM,,0x0)AMBO
Boot000E  WDC WDS100T2G0A-00JH30    BBS(HD,,0x0)AMBO
Boot000F  SanDisk   BBS(HD,,0x0)AMBO
Boot000d_BbsIndex* Could not parse device path: No such file or directory

The entries as listed in /sys/firmware/efi/efivars:

-rw-r--r-- 1 root   root    122 May  7 12:58  Boot0000-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root   root     90 May  7 12:58  Boot000B-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rwxrwxrwx 1 beto   beto      6 May  7 12:58  Boot000d_BbsIndex-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root   root    169 May  7 12:58  Boot000E-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root   root      6 May  7 12:58  Boot000e_BbsIndex-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root   root    117 May  7 12:58  Boot000F-8be4df61-93ca-11d2-aa0d-00e098032b8c
-rw-r--r-- 1 root   root      6 May  7 12:58  Boot000f_BbsIndex-8be4df61-93ca-11d2-aa0d-00e098032b8c

(I had attempted to delete the entries manually with no success, but I was able to change ownership and permissions)

Betonhaus commented 6 months ago

Oh I see, this is something I should be using efivar for.