#1111584 efibootmgr: -a -b fails on bootnums with leading zeros

Package:
efibootmgr
Source:
efibootmgr
Description:
Interact with the EFI Boot Manager
Submitter:
Maximilian Rumi
Date:
2026-05-09 21:13:01 UTC
Severity:
normal
Tags:
#1111584#5
Date:
2025-08-19 18:02:47 UTC
From:
To:
Dear Maintainer,

The following command fails even though Boot0001 is valid:
$ efibootmgr -a -b 0001
efibootmgr: Boot entry 1 not found
Could not set active state for Boot0001: No such file or directory

This is caused by the leading zeros in the boot entry.
This breaks our automation for setting boot entries.
There exists an issue and an unreleased fix upstream:
https://github.com/rhboot/efibootmgr/issues/186
https://github.com/rhboot/efibootmgr/commit/3eac27c5fccf93d2d6e634d6fe2a76d06708ec6e

Regards
Maximilian Rumi

#1111584#10
Date:
2025-08-28 13:25:36 UTC
From:
To:
The bug is not related to leading zeros, but effects all bootnums except
the last.
I have attached the mentioned commit as a patch.

I have rolled out the patch in our local setup and it fixed the issue.

Regards,
Maximilian Rumi

On Tue, 19 Aug 2025 20:02:47 +0200 Maximilian Rumi  <problems@cip.cs.fau.de> wrote:

 > Package: efibootmgr
 > Version: 18-2
 > Severity: normal
 > Tags: upstream
 >
 > Dear Maintainer,
 >
 > The following command fails even though Boot0001 is valid:
 > $ efibootmgr -a -b 0001
 > efibootmgr: Boot entry 1 not found
 > Could not set active state for Boot0001: No such file or directory
 >
 > This is caused by the leading zeros in the boot entry.
 > This breaks our automation for setting boot entries.
 > There exists an issue and an unreleased fix upstream:
 > https://github.com/rhboot/efibootmgr/issues/186
 >
https://github.com/rhboot/efibootmgr/commit/3eac27c5fccf93d2d6e634d6fe2a76d06708ec6e
 >
 > Regards
 > Maximilian Rumi
 >
 > -- System Information:
 > Debian Release: 13.0
 > APT prefers stable-updates
 > APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500,
'stable')
 > Architecture: amd64 (x86_64)
 > Foreign Architectures: i386
 >
 > Kernel: Linux 6.12.41-1-cip-amd64 (SMP w/8 CPU threads)
 > Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
 > Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE not set
 > Shell: /bin/sh linked to /usr/bin/dash
 > Init: systemd (via /run/systemd/system)
 >
 > Versions of packages efibootmgr depends on:
 > ii libc6 2.41-12
 > ii libefiboot1t64 38-3.1+b1
 > ii libefivar1t64 38-3.1+b1
 > ii libpopt0 1.19+dfsg-2
 >
 > efibootmgr recommends no packages.
 >
 > efibootmgr suggests no packages.
 >
 > -- no debconf information
 >
 >

#1111584#17
Date:
2026-05-09 21:03:58 UTC
From:
To:
Hello,

Message #10 already contains the correct upstream fix for this issue: commit `3eac27c5fccf93d2d6e634d6fe2a76d06708ec6e`, which makes `get_entry()` return immediately after finding the requested boot entry.

This still affects Debian 13/trixie `efibootmgr` 18-2. The failure mode is that `--active`/`--inactive` can fail for any boot entry that is not the final item in the internal list:

`efibootmgr: Boot entry N not found
Could not set active state for BootXXXX: No such file or directory
`
I have attached a debdiff that prepares a minimal stable update as `18-2+deb13u1` for `trixie`. It adds only a quilt patch backporting the one-line upstream fix and a changelog entry closing this bug.

I built the source package and verified that the generated source extracts cleanly, applies the patch, and has the expected version/distribution:

`Version: 18-2+deb13u1
Distribution: trixie
`
Please consider uploading this to `trixie-proposed-updates` for inclusion in the next Debian 13 point release.