From b7c2ef90e937a3e6265f94246c70a2f8f2767ef2 Mon Sep 17 00:00:00 2001 From: Xiaoqiang Xiong Date: Thu, 17 Jul 2025 08:15:22 +0800 Subject: [PATCH] feat(install.d):according to the changes of https://github.com/systemd/systemd/pull/37897, When --entry-type=type2 is used (for UKI), will not remove normal kernel IMAGE. Signed-off-by: Xiaoqiang Xiong --- install.d/50-dracut.install | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install.d/50-dracut.install b/install.d/50-dracut.install index 441414ac32..dcbe2c51af 100755 --- a/install.d/50-dracut.install +++ b/install.d/50-dracut.install @@ -109,6 +109,11 @@ case "$COMMAND" in ;; remove) + if [[ "$KERNEL_INSTALL_BOOT_ENTRY_TYPE" == "type2" ]]; then + [[ "${KERNEL_INSTALL_VERBOSE:-0}" -gt 0 ]] && \ + echo "Not removing UKI image (type2); handled by systemd's 90-uki-copy.install" + exit 0 + fi rm -f -- "$BOOT_DIR_ABS/$IMAGE" ret=$? ;;