From 5c9ce246ad793d5de8083d7eee020d0bc4b8bae6 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Fri, 26 Jul 2024 08:51:11 +0200 Subject: Deal with the new Grub-compatible kernel image naming convention Old naming convention was to have 'vmlinuz-generic-$VERSION'. New naming convention to be compatible with the way Grub searches for kernel images is 'vmlinuz-$VERSION-generic'. --- make_slackware_live.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'make_slackware_live.sh') diff --git a/make_slackware_live.sh b/make_slackware_live.sh index 6ac1175..6e84ea5 100755 --- a/make_slackware_live.sh +++ b/make_slackware_live.sh @@ -1742,6 +1742,13 @@ for SPS in ${SL_SERIES} ; do cleanup exit 1 else + # Do we use old style (vmlinuz-generic-$KGEN) or new style + # (vmlinuz-$KGEN-generic) kernel image name? + if [ -f ${INSTDIR}/boot/vmlinuz-${KGEN}-generic ]; then + KIMGNAME_STYLE="NEW" + else + KIMGNAME_STYLE="OLD" + fi # Move the content of the /boot directory out of the minimal system, # this will be joined again using overlay: rm -rf ${LIVE_BOOT}/boot @@ -3523,7 +3530,11 @@ umount -R ${LIVE_ROOTDIR} || true # Note to self: syslinux does not 'see' files unless they are DOS 8.3 names? rm -rf ${LIVE_STAGING}/boot mkdir -p ${LIVE_STAGING}/boot -cp -a ${LIVE_BOOT}/boot/vmlinuz-generic*-$KGEN ${LIVE_STAGING}/boot/generic +if [ "${KIMGNAME_STYLE}" = "OLD" ]; then + cp -a ${LIVE_BOOT}/boot/vmlinuz-generic*-${KGEN} ${LIVE_STAGING}/boot/generic +else + cp -a ${LIVE_BOOT}/boot/vmlinuz-${KGEN}-generic ${LIVE_STAGING}/boot/generic +fi mv ${LIVE_BOOT}/boot/initrd_${KVER}.img ${LIVE_STAGING}/boot/initrd.img # Squash the boot directory into its own module: -- cgit v1.2.3-79-gdb01