Skip to content

Commit

Permalink
fix(install.d): do not create initramfs if the supplied image is UKI
Browse files Browse the repository at this point in the history
When the supplied kernel image is a UKI, there's no point in creating
initramfs as the UKI has it built-in already. This is the situation when
dracut.install is called for a distro shipped UKI.

Note, KERNEL_INSTALL_IMAGE_TYPE == "uki" is different from
KERNEL_INSTALL_LAYOUT == "uki", the later can be used to create UKI upon
installing a standard kernel image.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
  • Loading branch information
vittyvk authored and LaszloGombos committed Oct 28, 2023
1 parent bee1c48 commit b2af8c8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions install.d/50-dracut.install
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ if ! [[ ${KERNEL_INSTALL_MACHINE_ID-x} ]]; then
exit 0
fi

# Do not attempt to create initramfs if the supplied image is already a UKI
if [[ "$KERNEL_INSTALL_IMAGE_TYPE" = "uki" ]]; then
exit 0
fi

# Mismatching the install layout and the --uefi/--no-uefi opts just creates a mess.
if [[ $KERNEL_INSTALL_LAYOUT == "uki" && -n $KERNEL_INSTALL_STAGING_AREA ]]; then
BOOT_DIR_ABS="$KERNEL_INSTALL_STAGING_AREA"
Expand Down

0 comments on commit b2af8c8

Please sign in to comment.