Skip to content

Commit b2af8c8

Browse files
vittyvkLaszloGombos
authored andcommitted
fix(install.d): do not create initramfs if the supplied image is UKI
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 <[email protected]>
1 parent bee1c48 commit b2af8c8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

install.d/50-dracut.install

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ if ! [[ ${KERNEL_INSTALL_MACHINE_ID-x} ]]; then
1111
exit 0
1212
fi
1313

14+
# Do not attempt to create initramfs if the supplied image is already a UKI
15+
if [[ "$KERNEL_INSTALL_IMAGE_TYPE" = "uki" ]]; then
16+
exit 0
17+
fi
18+
1419
# Mismatching the install layout and the --uefi/--no-uefi opts just creates a mess.
1520
if [[ $KERNEL_INSTALL_LAYOUT == "uki" && -n $KERNEL_INSTALL_STAGING_AREA ]]; then
1621
BOOT_DIR_ABS="$KERNEL_INSTALL_STAGING_AREA"

0 commit comments

Comments
 (0)