From 64bb56e58bbe89db4974383cf6cb1af34f40b75e Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Sat, 14 Aug 2021 13:06:37 +0200 Subject: [PATCH] sd-boot: Allow automatic entries to be default --- man/loader.conf.xml | 39 ++++++++++++++++++++++++++++++++++++++- src/boot/efi/boot.c | 5 +---- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/man/loader.conf.xml b/man/loader.conf.xml index 4c0355800cd..ffbd897a1fd 100644 --- a/man/loader.conf.xml +++ b/man/loader.conf.xml @@ -58,7 +58,44 @@ A glob pattern to select the default entry. The default entry may be changed in the boot menu itself, in which case the name of the selected entry will be stored as an EFI variable, overriding this option. - + + + + Automatically detected entries will use the following names: + + + + + + + Name + Description + + + + + auto-efi-default + EFI Default Loader + + + auto-efi-shell + EFI Shell + + + auto-osx + macOS + + + auto-reboot-to-firmware-setup + Reboot Into Firmware Interface + + + auto-windows + Windows Boot Manager + + + +
diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c index 56cd4a489de..474a7e7d3f5 100644 --- a/src/boot/efi/boot.c +++ b/src/boot/efi/boot.c @@ -1590,8 +1590,7 @@ static VOID config_default_entry_select(Config *config) { /* * The EFI variable to select the default boot entry overrides the * configured pattern. The variable can be set and cleared by pressing - * the 'd' key in the loader selection menu, the entry is marked with - * an '*'. + * the 'd' key in the loader selection menu. */ err = efivar_get(LOADER_GUID, L"LoaderEntryDefault", &entry_default); if (!EFI_ERROR(err)) { @@ -1615,8 +1614,6 @@ static VOID config_default_entry_select(Config *config) { if (config->entry_default_pattern) { i = config->entry_count; while (i--) { - if (config->entries[i]->no_autoselect) - continue; if (MetaiMatch(config->entries[i]->id, config->entry_default_pattern)) { config->idx_default = i; return; -- 2.47.3