diff options
author | Eric Hameleers <alien@slackware.com> | 2024-07-26 08:51:11 +0200 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2024-07-26 08:51:11 +0200 |
commit | 5c9ce246ad793d5de8083d7eee020d0bc4b8bae6 (patch) | |
tree | cad7694d9b0f0d0d1bc2786c0a2808d9aa10edb1 | |
parent | 2348899dbe24ac0251119c4cee0a425235fbcb79 (diff) | |
download | liveslak-5c9ce246ad793d5de8083d7eee020d0bc4b8bae6.tar.gz liveslak-5c9ce246ad793d5de8083d7eee020d0bc4b8bae6.tar.xz |
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'.
-rwxr-xr-x | make_slackware_live.sh | 13 |
1 files changed, 12 insertions, 1 deletions
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: |