Describe the bug
install.d/51-dracut-rescue.install hardcodes $MACHINE_ID for path construction (lines 88, 90, 96). When kernel-install is configured with a non-machine-id entry token (e.g. bootctl install --entry-token=os-id → fedora), the paths diverge from what kernel-install actually creates.
Specifically, BOOT_DIR is set to /${MACHINE_ID}/0-rescue and LOADER_ENTRY to …/${MACHINE_ID}-0-rescue.conf, but the actual boot directory tree uses the entry token (e.g. fedora/). The suffix-strip BOOT_ROOT=${BOOT_DIR_ABS%"$BOOT_DIR"} also fails because $BOOT_DIR_ABS doesn't end with /${MACHINE_ID}/….
$KERNEL_INSTALL_ENTRY_TOKEN has been exported by kernel-install since systemd 253 but is not used by this script.
Distribution used
Fedora 43
Dracut version
107 (also reproducible on current main)
Init system
systemd (systemd-boot + UKI layout)
To Reproduce
# /etc/kernel/install.conf:
layout=uki
initrd_generator=dracut
uki_generator=ukify
# Set entry token to os-id:
bootctl install --entry-token=os-id # writes "fedora" to /etc/kernel/entry-token
# Then:
kernel-install add-all
# → 51-dracut-rescue.install fails building incorrect paths
Expected behavior
The script should use $KERNEL_INSTALL_ENTRY_TOKEN (falling back to $MACHINE_ID) for path construction, matching how kernel-install organizes the boot directory.
Additional context
Workaround: ln -sf /dev/null /etc/kernel/install.d/51-dracut-rescue.install
Describe the bug
install.d/51-dracut-rescue.installhardcodes$MACHINE_IDfor path construction (lines 88, 90, 96). Whenkernel-installis configured with a non-machine-id entry token (e.g.bootctl install --entry-token=os-id→fedora), the paths diverge from whatkernel-installactually creates.Specifically,
BOOT_DIRis set to/${MACHINE_ID}/0-rescueandLOADER_ENTRYto…/${MACHINE_ID}-0-rescue.conf, but the actual boot directory tree uses the entry token (e.g.fedora/). The suffix-stripBOOT_ROOT=${BOOT_DIR_ABS%"$BOOT_DIR"}also fails because$BOOT_DIR_ABSdoesn't end with/${MACHINE_ID}/….$KERNEL_INSTALL_ENTRY_TOKENhas been exported bykernel-installsince systemd 253 but is not used by this script.Distribution used
Fedora 43
Dracut version
107 (also reproducible on current main)
Init system
systemd (systemd-boot + UKI layout)
To Reproduce
Expected behavior
The script should use
$KERNEL_INSTALL_ENTRY_TOKEN(falling back to$MACHINE_ID) for path construction, matching howkernel-installorganizes the boot directory.Additional context
Workaround:
ln -sf /dev/null /etc/kernel/install.d/51-dracut-rescue.install