menu: Stop the persistent EFI variables overriding default_entry - #653
Open
wehrwolfmann wants to merge 1 commit into
Open
wehrwolfmann wants to merge 1 commit into
wehrwolfmann wants to merge 1 commit into
Conversation
Signed-off-by: Wehrwolfmann <256216494+wehrwolfmann@users.noreply.github.com> Assisted-by: Claude:claude-opus-5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #652.
On a dual-boot box
default_entrystopped preselecting Windows: whatever wasbooted last came up instead, so the machine booted Linux on the timeout.
The selection in
_menuis a chain ofif (!has_entry)steps.LoaderEntryOneShotsetshas_entryonce it resolves an entry. Thedefault_entryblock right below it setsselected_entryand leaveshas_entryalone - not in the index branch, not in the path branch. So thenext two blocks still see it false:
remember_last_entryreadsLimineLastBootedEntryand overwrites the selection, andbli_get_default_entryshadows it the same way. A numericdefault_entrygoes through the same block, so switching to an index does not help either.
CONFIG.md documents the opposite, so this is a code bug and not a doc one:
The patch sets
has_entryin both branches, the wayLoaderEntryOneShotalready does. The path branch only sets it once the path resolved, so an
unresolvable
default_entrykeeps falling through as before.Built clean on trunk with
./configure --enable-uefi-x86-64 CC_FOR_TARGET=clang, and again with--enable-biossince the block is notUEFI-only; no new warnings. On the affected machine
remember_last_entry: nobrings the preselection back, which is the workaround the issue describes.