From: Goffredo Baroncelli Date: Tue, 18 Jan 2022 18:32:35 +0000 (+0100) Subject: bootctl: ignore the bootloader boot entries X-Git-Tag: v251-rc1~504^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9914d89b5162a7cd47ecb15e679b944d87fdf1e4;p=thirdparty%2Fsystemd.git bootctl: ignore the bootloader boot entries When bootctl lists the boot entries, considers also the ones returned by systemd-boot (via the efi LoaderEntries variable), created at boot time. Unfortunately this list may became incorrect if (e.g.) the user remove a kernel package. This patch changes this behaviour, so bootctl ignores some the boot entries returned by systemd-boot. In any case, bootctl still considers the 'auto-xxx' boot entries listed below: Boot entrie name Title ----------------------------- ------------------------------ auto-osx macOS boot loader auto-windows Windows Boot Manager auto-efi-shell EFI Shell auto-efi-default EFI Default Loader auto-reboot-to-firmware-setup Reboot Into Firmware Interface The other entries that systemd-boot synthetizes (e.g. the ones loaded from /efi/loader/entries/) can be synthetized by bootctl too, so no information is lost. Signed-off-by: Goffredo Baroncelli --- diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c index 1bcb4d16899..c3c72e314c5 100644 --- a/src/boot/bootctl.c +++ b/src/boot/bootctl.c @@ -1603,7 +1603,7 @@ static int verb_list(int argc, char *argv[], void *userdata) { else if (r < 0) log_warning_errno(r, "Failed to determine entries reported by boot loader, ignoring: %m"); else - (void) boot_entries_augment_from_loader(&config, efi_entries, false); + (void) boot_entries_augment_from_loader(&config, efi_entries, true); if (config.n_entries == 0) log_info("No boot loader entries found.");