diff --git a/grml-live b/grml-live index 02cf2e8a..cc1dbfb7 100755 --- a/grml-live +++ b/grml-live @@ -327,6 +327,7 @@ copy_addon_file() { msg="Missing addon file: \"$1\"" ewarn "$msg" ; eend 1 log "copy_addon_file: $msg" + return 1 } # replace placeholders in template files with actual information @@ -1193,34 +1194,39 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] || [ "$ARCH" = arm64 ] ; then copy_addon_file ipxe.efi /usr/lib/ipxe addons copy_addon_file pci.ids /usr/share/misc addons - # memtest86+ <=5.01-3.1 - copy_addon_file memtest86+.bin /boot addons - # make memtest filename FAT16/8.3 compatible - if [ -r "${BUILD_OUTPUT}/boot/addons/memtest86+.bin" ] ; then - mv "${BUILD_OUTPUT}/boot/addons/memtest86+.bin" \ - "${BUILD_OUTPUT}/boot/addons/memtest" - fi - # memtest86+ >=6.00-1 - copy_addon_file memtest86+x32.bin /boot addons - copy_addon_file memtest86+x32.efi /boot addons - copy_addon_file memtest86+x64.bin /boot addons - copy_addon_file memtest86+x64.efi /boot addons + if [[ "$ARCH" == "amd64" ]] ; then + copy_addon_file memtest86+x64.efi /boot addons + elif [[ "$ARCH" == "i386" ]] ; then + copy_addon_file memtest86+ia32.efi /boot addons + fi # provide memtest86+ >=6.00-1 files as "memtest" file # for BIOS boot in isolinux/syslinux if ! [ -r "${BUILD_OUTPUT}/boot/addons/memtest" ] ; then if [[ "$ARCH" == "amd64" ]] ; then - copy_addon_file memtest86+x64.bin /boot addons + copy_addon_file memtest86+x64.bin /boot addons && + # make memtest filename FAT16/8.3 compatible mv "${BUILD_OUTPUT}/boot/addons/memtest86+x64.bin" \ "${BUILD_OUTPUT}/boot/addons/memtest" elif [[ "$ARCH" == "i386" ]] ; then - copy_addon_file memtest86+x32.bin /boot addons - mv "${BUILD_OUTPUT}/boot/addons/memtest86+x32.bin" \ + copy_addon_file memtest86+ia32.bin /boot addons && + # make memtest filename FAT16/8.3 compatible + mv "${BUILD_OUTPUT}/boot/addons/memtest86+ia32.bin" \ "${BUILD_OUTPUT}/boot/addons/memtest" fi fi + # fallback: if we still don't have /boot/addons/memtest available, we + # might have an older memtest86+ version (<=5.01-3.1) which ships + # file "memtest86+.bin" instead + if ! [ -r "${BUILD_OUTPUT}/boot/addons/memtest" ] ; then + copy_addon_file memtest86+.bin /boot addons && + # make memtest filename FAT16/8.3 compatible + mv "${BUILD_OUTPUT}/boot/addons/memtest86+.bin" \ + "${BUILD_OUTPUT}/boot/addons/memtest" + fi + # since syslinux(-common) v3:6.03~pre1+dfsg-4 the files are in a # different directory :( if [ -d "${CHROOT_OUTPUT}/usr/lib/syslinux/modules/bios/" ] ; then diff --git a/templates/boot/grub/addons.cfg b/templates/boot/grub/addons.cfg index e0a3d265..a96c7808 100644 --- a/templates/boot/grub/addons.cfg +++ b/templates/boot/grub/addons.cfg @@ -14,9 +14,9 @@ if [ "${grub_platform}" == "efi" ] ; then } fi else # assume i386 - if test -e /boot/addons/memtest86+x32.efi ; then - menuentry "Memory test (memtest86+x32.efi)" { - linuxefi /boot/addons/memtest86+x32.efi + if test -e /boot/addons/memtest86+ia32.efi ; then + menuentry "Memory test (memtest86+ia32.efi)" { + linuxefi /boot/addons/memtest86+ia32.efi } fi fi @@ -39,10 +39,10 @@ if [ "${grub_platform}" != "efi" ] ; then } fi else # assume i386 - if test -e /boot/addons/memtest86+x32.bin ; then - menuentry "Memory test (memtest86+x32.bin)" { + if test -e /boot/addons/memtest86+ia32.bin ; then + menuentry "Memory test (memtest86+ia32.bin)" { insmod linux16 - linux16 /boot/addons/memtest86+x32.bin + linux16 /boot/addons/memtest86+ia32.bin } elif test -e /boot/addons/memtest ; then # fallback to old memtest menuentry "Memory test (memtest86+)" {