Michael D. Setzer II via users composed on 2023-01-16 01:50 (UTC+1000):
Backed up the /etc/grub.d/20_memtest86+ and replaced it with this...
# !/bin/sh exec tail -n +3 $0 # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. menuentry 'Memtest Legacy' { echo 'Loading memtest 6.01 for BIOS BOOT SYSTEM' linux /memtest.leg } menuentry 'Memtest UEFI' { echo 'Loading memtest 6.01 for UEFI BOOT SYSTEM' linux /memtest.uefi }
Put the memtest files copied from the memtest.org's grub's iso file. leg for /boot an uefi from /EFI/BOOT. both have name memtest, so renamed them to match. put them in /boot directory and used grub2-mkconfig to create grub.cfg. Seems to work, but one needs to select the correct one. Sure a more complex setup could be done. Only have one UEFI machine, so don't know if it would work with all setups.
To update my machines created a file. 57636 Jan 16 00:24 memtest6.01.xz that contains
416 Jan 16 00:24 20_memtest86+ 1071 Jan 16 00:13 Memtest6.01-Readme
144344 Dec 30 17:00 memtest.leg 144384 Dec 30 17:00 memtest.uefi 294 Jan 16 00:23 setupmemtest6.01.sh
I've been using memtest86, not memtest86+, on UEFI using chainload instead of linux, via the following stanza:
menuentry "memtest86 8.3 EFI" { search --no-floppy --label --set=root ZM2P01ESP chainloader /mt83x64.efi }
# ls -n /boot/efi/*efi -rwxr-xr-x 1 0 0 1243032 Nov 22 2019 /boot/efi/mt83x64.efi