Efibootmgr error

has anyone seen something like this?

# efibootmgr 
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0002,0000
Boot0000* Fedora	HD(2,GPT,d7beee94-cfdb-4c29-9c68-59b26b57be57,0x200808,0x82008)/File(\EFI\FEDORA\SHIMX64.EFI)
Boot0002* Windows Boot Manager	HD(2,GPT,d7beee94-cfdb-4c29-9c68-59b26b57be57,0x200808,0x82008)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)0000424f

# efibootmgr -n 0000
BootNext: 0000
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0002,0000
Boot0000* Fedora	HD(2,GPT,d7beee94-cfdb-4c29-9c68-59b26b57be57,0x200808,0x82008)/File(\EFI\FEDORA\SHIMX64.EFI)
Boot0002* Windows Boot Manager	HD(2,GPT,d7beee94-cfdb-4c29-9c68-59b26b57be57,0x200808,0x82008)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)0000424f

# efibootmgr -N
**Boot entry 0001 does not exist**
# 

why does it even matter, that Boot0001 does not exist? Shouldn’t the option -N simply clear the BootNext entry?

I am not sure if that is or is not an actual error. It may only be a message.

What is the purpose of this exercise? It seems that your boot order is set to boot windows by default and not fedora grub.

Interesting that you got a '-v verbose' listing when you specified the '-n'.

Are you sure you haven’t got an alias setup somewhere?

Try:

$ which efibootmgr
/usr/sbin/efibootmgr

and see what you get

EDIT: Corrected typo '-b' to '-n'

I guess it’s an error, because the flag was not removed/cleared. It was still set to 0000. Forgot to show the output of efibootmgr after efibootmgr -N

Does it need a purpose? :smile:
This is a simplified example, I have some other OS on ext. SSDs ( each with it’s own EFI partition, they will appead as Boot0003 etc in the list) and one day I needed to clear the wrong BootNext flag. Yes, in the end, I did overwrite the BootNext with another entry but that’s not the point.

[quote=“stamper, post:3, topic:66307, full:true, username:stamper”]
Interesting that you got a '-v verbose' listing when you specified the '-b'.

I also noticed that, need to check. Running Win right now.
I do get the same error with nobara and the default output is not verbose

Please stay in touch and let me know how you get on. efibootmgr is of great interest to me atm as I am developing a Python app with a Qt GUI as a wrapper to efibootmgr command. It may never evolve, but I would like to capture these kind of anomalies that the man pages and guides don’t mention if I can.

Cheers and good luck.

With -B I think you have to also specify the entry to modify with -b XXXX. I guess -N works in a similar way (not sure, I’ve never used it).

my bad, was a miss type that I have since corrected, should be -n. Unfortunately the reply quotes still have the miss type.

No, no purpose needed, but it would be nice if you were to tell us you were testing and not have us believe this was happening on a production system and these actual errors seen.

When testing/learning many things may be done that would not normally be seen in production. This would benefit those of us reading to know what the environment might be.

Additionally, it helps to see the actual command and the results instead of something you typed that might not be exactly what was seen on the screen. For example the mistype of the -b option, the -v output, etc.

1 Like

It’s my daily driver (NUC11PH) at home and the commands are copy and paste, no editing. No ext. ssd was connected at that time.
There is no -b option in my initial post, only -n and -N in the failed attempt to clear this BootNext flag.

I can’t explain atm why there is the gap ( no Boot0001 ). May have something to do with the system’s UEFI. It has VMD (turned off) and some other stuff.

I’ve browsed the source code briefly, and for some reason efibootmgr is going through the list of boot entries and verifying something.

1 Like

This is why you should not edit earlier posts. It was initially a -b in the initial post but you noted a couple posts above that you edited that. Apparently it was not a copy & paste entry in the initial post.

I have already explained that the -b typo was my mistake. The -b typo is nothing to do with the OP, other than he quoted my bad typo before it was corrected and the correction has not filtered down. It has and always has, meant to be -n.

Why all the hostility, can we not just try to understand and solve this issue?

My error

ok, I’ve fixed that by purging all UEFI entries with efibootmgr and the system recreated them.
I was not able to change that from Intel’s UEFI. I think I know how this missing 0001 entry happened in the first place. Not important for now.

I now have Boot0001 and Boot0002 assigned to Win and Fedora37 on the same disk.
So here are again copy and paste sessions from nobara(f36) and fedora f37. I only added additional NLs to improve read-ability and removed the prompt. to keep Jeff happy :slight_smile:

Boot0003 is the external SSD with nobara. I could also recreate the boot entries with efibootmgr. I forgot to include the option -p 2 in my attempts. First partition is the Win recovery partition.

# cat /etc/redhat-release 
Nobara release 36 (Thirty Six)
# efibootmgr
BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0001,0002,0003
Boot0001* Windows Boot Manager
Boot0002* Fedora
Boot0003* Fedora

# efibootmgr -v
BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0001,0002,0003
Boot0001* Windows Boot Manager	HD(2,GPT,d7beee94-cfdb-4c29-9c68-59b26b57be57,0x200808,0x82008)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)..BO
Boot0002* Fedora	HD(2,GPT,d7beee94-cfdb-4c29-9c68-59b26b57be57,0x200808,0x82008)/File(\EFI\FEDORA\SHIMX64.EFI)..BO
Boot0003* Fedora	HD(1,GPT,fc84ac23-3fa5-486b-b4ff-ce850421409f,0xffff,0x11ffee)/File(\EFI\FEDORA\SHIMX64.EFI)..BO

# efibootmgr -n 2
BootNext: 0002
BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0001,0002,0003
Boot0001* Windows Boot Manager
Boot0002* Fedora
Boot0003* Fedora

# efibootmgr -N
BootCurrent: 0003
Timeout: 1 seconds
BootOrder: 0001,0002,0003
Boot0001* Windows Boot Manager
Boot0002* Fedora
Boot0003* Fedora

# rpm -q efibootmgr
efibootmgr-16-12.fc36.x86_64


# cat /etc/redhat-release 
Fedora release 37 (Thirty Seven)

# which efibootmgr
/usr/sbin/efibootmgr

# rpm -q efibootmgr
efibootmgr-18-2.fc37.x86_64

# efibootmgr -v
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0001,0002,0003
Boot0001* Windows Boot Manager	HD(2,GPT,d7beee94-cfdb-4c29-9c68-59b26b57be57,0x200808,0x82008)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)0000424f
      dp: 04 01 2a 00 02 00 00 00 08 08 20 00 00 00 00 00 08 20 08 00 00 00 00 00 94 ee be d7 db cf 29 4c 9c 68 59 b2 6b 57 be 57 02 02 / 04 04 46 00 5c 00 45 00 46 00 49 00 5c 00 4d 00 49 00 43 00 52 00 4f 00 53 00 4f 00 46 00 54 00 5c 00 42 00 4f 00 4f 00 54 00 5c 00 42 00 4f 00 4f 00 54 00 4d 00 47 00 46 00 57 00 2e 00 45 00 46 00 49 00 00 00 / 7f ff 04 00
    data: 00 00 42 4f
Boot0002* Fedora	HD(2,GPT,d7beee94-cfdb-4c29-9c68-59b26b57be57,0x200808,0x82008)/File(\EFI\FEDORA\SHIMX64.EFI)0000424f
      dp: 04 01 2a 00 02 00 00 00 08 08 20 00 00 00 00 00 08 20 08 00 00 00 00 00 94 ee be d7 db cf 29 4c 9c 68 59 b2 6b 57 be 57 02 02 / 04 04 34 00 5c 00 45 00 46 00 49 00 5c 00 46 00 45 00 44 00 4f 00 52 00 41 00 5c 00 53 00 48 00 49 00 4d 00 58 00 36 00 34 00 2e 00 45 00 46 00 49 00 00 00 / 7f ff 04 00
    data: 00 00 42 4f
Boot0003* Fedora	HD(1,GPT,fc84ac23-3fa5-486b-b4ff-ce850421409f,0xffff,0x11ffee)/File(\EFI\FEDORA\SHIMX64.EFI)0000424f
      dp: 04 01 2a 00 01 00 00 00 ff ff 00 00 00 00 00 00 ee ff 11 00 00 00 00 00 23 ac 84 fc a5 3f 6b 48 b4 ff ce 85 04 21 40 9f 02 02 / 04 04 34 00 5c 00 45 00 46 00 49 00 5c 00 46 00 45 00 44 00 4f 00 52 00 41 00 5c 00 53 00 48 00 49 00 4d 00 58 00 36 00 34 00 2e 00 45 00 46 00 49 00 00 00 / 7f ff 04 00
    data: 00 00 42 4f

# efibootmgr 
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0001,0002,0003
Boot0001* Windows Boot Manager	HD(2,GPT,d7beee94-cfdb-4c29-9c68-59b26b57be57,0x200808,0x82008)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)0000424f
Boot0002* Fedora	HD(2,GPT,d7beee94-cfdb-4c29-9c68-59b26b57be57,0x200808,0x82008)/File(\EFI\FEDORA\SHIMX64.EFI)0000424f
Boot0003* Fedora	HD(1,GPT,fc84ac23-3fa5-486b-b4ff-ce850421409f,0xffff,0x11ffee)/File(\EFI\FEDORA\SHIMX64.EFI)0000424f

# efibootmgr -n 3
BootNext: 0003
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0001,0002,0003
Boot0001* Windows Boot Manager	HD(2,GPT,d7beee94-cfdb-4c29-9c68-59b26b57be57,0x200808,0x82008)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)0000424f
Boot0002* Fedora	HD(2,GPT,d7beee94-cfdb-4c29-9c68-59b26b57be57,0x200808,0x82008)/File(\EFI\FEDORA\SHIMX64.EFI)0000424f
Boot0003* Fedora	HD(1,GPT,fc84ac23-3fa5-486b-b4ff-ce850421409f,0xffff,0x11ffee)/File(\EFI\FEDORA\SHIMX64.EFI)0000424f

# efibootmgr -N
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0001,0002,0003
Boot0001* Windows Boot Manager	HD(2,GPT,d7beee94-cfdb-4c29-9c68-59b26b57be57,0x200808,0x82008)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)0000424f
Boot0002* Fedora	HD(2,GPT,d7beee94-cfdb-4c29-9c68-59b26b57be57,0x200808,0x82008)/File(\EFI\FEDORA\SHIMX64.EFI)0000424f
Boot0003* Fedora	HD(1,GPT,fc84ac23-3fa5-486b-b4ff-ce850421409f,0xffff,0x11ffee)/File(\EFI\FEDORA\SHIMX64.EFI)0000424f

so the output format has changed in F37, -v now shows the raw data.
Nevertheless, I would consider this a bug in efibootmgr.

1 Like

Yep, seems the default output has changed from v16 to v18 as per this changelog

https://github.com/rhboot/efibootmgr/commit/8ec3e9dedb3cb62f19847794012420b90f475398

yes, and I think this is a good change, because with the older version I always included -v option.

1 Like

Shame they couldn’t introduce a '-b' option for '-b' Basic output [JOKES]

I’M JOKING

Although maybe a -h for human readable.

Anyway, I also welcome the change (I am still using v16). Also glad this seems to be resolved. Shame you had to delete everything and let the Firmware rebuild it. I’m also surprised to see it didn’t generate a ‘0000’ Boot. But who knows what the Firmware is doing.

Edit, thinking about it, you have probably removed ‘0000’ from the boot order from within the Firmware and if it was included, would probably be ‘UEFI:CD/DVD Drive’ or ‘UEFI:Removable Device’ or ‘UEFI:Network Device’ or similar.

1 Like

Yes indeed. The offending code is (“src/efibootmgr.c”)

 if (opts.delete_bootnext) {
                if (!is_current_entry(opts.delete_bootnext))
                        errorx(17, "Boot entry %04X does not exist",
                                opts.delete_bootnext);

where the value if opts.delete_bootnext is 1.

1 Like

I agree that UEFI bios’s seem to do unpredictable things. If someone really wanted to make a mod to efibootmgr they might add a -s switch for (sanity) to eliminate all dups and rewrite the numbering starting at 0000 without leaving any gaps.

my machine (which does not have windows installed) shows the following, which is a mess:
efibootmgr
BootCurrent: 0004
Timeout: 1 seconds
BootOrder: 0004,000A,0003,0002,0006,0001,0000
Boot0000* rEFInd Boot Manager VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)0000
Boot0001* Fedora HD(1,GPT,536e3d21-1d16-4e98-a8dd-5c862e7c0cf0,0x800,0x12c000)/File(\EFI\FEDORA\SHIMX64.EFI)
Boot0002* Hard Drive BBS(HD,0x0)0000474f00004…00030003700310033003400380020004a00200020002000200000007fff04000000424f
Boot0003* CD/DVD Drive BBS(CDROM,0x0)0000474f0000…fff04000000424f
Boot0004* rEFInd Boot Manager HD(1,GPT,536e3d21-1d16-4e98-a8dd-5c862e7c0cf0,0x800,0x12c000)/File(\EFI\REFIND\REFIND_X64.EFI)
Boot0006* USB BBS(USB,0x0)0000474f00004e4fb50000000…4000000424f
Boot000A* Fedora HD(1,GPT,536e3d21-1d16-4e98-a8dd-5c862e7c0cf0,0x800,0x12c000)/File(\EFI\FEDORA\SHIM.EFI)0000424f