Skip to content

fix(dracut-rescue): use entry token instead of machine-id for path construction - #2444

Draft
mxsb wants to merge 5 commits into
dracut-ng:mainfrom
mxsb:fix/rescue-install-uki-entry-token
Draft

fix(dracut-rescue): use entry token instead of machine-id for path construction#2444
mxsb wants to merge 5 commits into
dracut-ng:mainfrom
mxsb:fix/rescue-install-uki-entry-token

Conversation

@mxsb

@mxsb mxsb commented May 15, 2026

Copy link
Copy Markdown

51-dracut-rescue.install hardcodes $MACHINE_ID for boot directory and loader entry paths. When kernel-install is configured with a non-machine-id entry token (e.g. via bootctl --entry-token=os-id), the paths diverge from the actual boot directory layout, breaking rescue image creation.

Use $KERNEL_INSTALL_ENTRY_TOKEN (exported by kernel-install since systemd 253) with a fallback to $MACHINE_ID for path construction. Rescue image filenames and BLS content fields keep using $MACHINE_ID as an identifier.

Fixes: #2443

Checklist

  • I have tested it locally
  • I have reviewed and updated any documentation if relevant
  • I am providing new code and test(s) for it

…nstruction

51-dracut-rescue.install hardcodes $MACHINE_ID for boot directory and
loader entry paths. When kernel-install is configured with a
non-machine-id entry token (e.g. via bootctl --entry-token=os-id),
the paths diverge from the actual boot directory layout, breaking
rescue image creation.

Use $KERNEL_INSTALL_ENTRY_TOKEN (exported by kernel-install since
systemd 253) with a fallback to $MACHINE_ID for path construction.
Rescue image filenames and BLS content fields keep using $MACHINE_ID
as an identifier.

Add a test variant to TEST-43 that runs kernel-install with a custom
entry token and verifies the rescue initrd is placed correctly.

Fixes: dracut-ng#2443
@mxsb
mxsb requested a review from a team as a code owner May 15, 2026 10:06
@github-actions github-actions Bot added test Issues related to testing kernel-install labels May 15, 2026

@bdrung bdrung left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rebase your changes instead of merging main into it?

Comment on lines 99 to 100
KERNEL="vmlinuz-0-rescue-${MACHINE_ID}"
INITRD="initramfs-0-rescue-${MACHINE_ID}.img"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about KERNEL and INITRD?

@devkontrol

devkontrol commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

@devkontrol devkontrol added the stale communication is stuck label Aug 10, 2026
@devkontrol
devkontrol marked this pull request as draft August 10, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kernel-install stale communication is stuck test Issues related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

51-dracut-rescue.install builds broken paths with non-machine-id entry tokens

3 participants