fix(dracut): use entry token instead of machine-id for output path detection - #2446
Draft
mxsb wants to merge 7 commits into
Draft
fix(dracut): use entry token instead of machine-id for output path detection#2446mxsb wants to merge 7 commits into
mxsb wants to merge 7 commits into
Conversation
…tection dracut.sh hardcodes $MACHINE_ID for output path detection when no explicit output file is given. When the system is configured with a non-machine-id entry token (e.g. via bootctl --entry-token=os-id), directory checks fail because the actual directories use the entry token, not the 32-char machine-id hex string. Resolve the entry token from $KERNEL_INSTALL_ENTRY_TOKEN, /etc/kernel/entry-token, or fall back to $MACHINE_ID. Use it for all BLS directory lookups, mountpoint fallbacks, and the UKI output filename. Update man pages and --help text to document the new <ENTRY_TOKEN> resolution chain. Add tests to TEST-43 verifying outfile path detection with a custom entry token file and env var precedence. Fixes: dracut-ng#2445
shfmt requires no quotes around parameter expansion inside [[ ]].
Collaborator
|
@mxsb - Can you rebase your changes instead of merging main into it? |
devkontrol
marked this pull request as draft
August 10, 2026 14:00
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.
dracut.shhardcodes$MACHINE_IDfor output path detection when no explicit output file is given. When the system is configured with a non-machine-id entry token (e.g. viabootctl --entry-token=os-id), directory checks fail because the actual directories use the entry token, not the 32-char machine-id hex string.Resolve the entry token from
$KERNEL_INSTALL_ENTRY_TOKEN,/etc/kernel/entry-token, or fall back to$MACHINE_ID. Use it for all BLS directory lookups, mountpoint fallbacks, and the UKI output filename.Same class of bug as #2443 / #2444, but in the core dracut command rather than the rescue install hook.
Fixes: #2445
Checklist