From 40db3a57aee8449123eb4e77aa235169a52c767a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 10 Nov 2023 11:41:36 +0100 Subject: [PATCH] rename installed kernel to match name used in boot entry clone of https://src.fedoraproject.org/rpms/grub2/c/af4f1536b6e498b88c1b07d00fc047184453839a?branch=rawhide --- 20-zipl-kernel.install | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/20-zipl-kernel.install b/20-zipl-kernel.install index 4fadd1d..5ec4576 100755 --- a/20-zipl-kernel.install +++ b/20-zipl-kernel.install @@ -54,8 +54,13 @@ EOF case "$COMMAND" in add) if [[ "${KERNEL_DIR}" != "/boot" ]]; then + # rename to match the name used in the pseudo-BLS snippet above + rm -f "/boot/vmlinuz-${KERNEL_VERSION}" + cp -aT "${KERNEL_IMAGE}" "/boot/vmlinuz-${KERNEL_VERSION}" + command -v restorecon &>/dev/null && \ + restorecon -R "/boot/vmlinuz-${KERNEL_VERSION}" + for i in \ - "$KERNEL_IMAGE" \ "$KERNEL_DIR"/System.map \ "$KERNEL_DIR"/config \ "$KERNEL_DIR"/zImage.stub