Bug#1111584: efibootmgr: -a -b fails on bootnums with leading zeros
Control: retitle 1111584 efibootmgr: -b fails on all bootnums except the
last
Control: severity 1111584 important
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
>
>
From 3eac27c5fccf93d2d6e634d6fe2a76d06708ec6e Mon Sep 17 00:00:00 2001
From: kmicki <1463619+kmicki@users.noreply.github.com>
Date: Tue, 15 Nov 2022 14:37:25 +0100
Subject: [PATCH] Update efibootmgr.c
get_entry: return entry if it was found before reaching the end of the list
Signed-off-by: kmicki <1463619+kmicki@users.noreply.github.com>
---
src/efibootmgr.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/efibootmgr.c b/src/efibootmgr.c
index b980bcd..4b15d6d 100644
--- a/src/efibootmgr.c
+++ b/src/efibootmgr.c
@@ -1192,6 +1192,7 @@ get_entry(list_t *entries, uint16_t num)
entry = NULL;
continue;
}
+ return entry;
}
return entry;
--
2.47.2
Reply to: