Execute memtest86+ on a Ubuntu 16 system
I'm desperately trying to get memtest86+ to work on my fresh Ubuntu 16 LTS install.
I'm aware that there already are questions related to Ubuntu + memtest on this site, but none of the associated solutions work for me:
- Memtest86+ fails to launch
- Memtest86+ options are missing in Grub menu
I started with the creation of a bootable USB flash drive using the auto-installer from their official website. But although the bios menu shows the flash drive in the possible bootable devices, the computer seems not to recognize it and bypasses it, prompting Ubuntu.
Since the auto-installer is only windows-compatible, does the resulting USB stick only work on Windows? Seems really unlikely to me since the OS is not yet started at the stage when this fails.
By searching a bit on the internet, I realized memtest86+ was always installed on all recent Ubuntu distributions. However I can't get it to launch properly.
The memtest options did not show up on the Grub menu. I tried to use grub-customizer, a software proposed in this question. I managed to add the memtest options to the grub menu but I must have done those incorrectly: when selected, the computer just reboots silently.
I also tried to launch manually the memtest bin file in any way I know to no avail. I notably tried to start it from the grub command line but I don't know how this can be done.
The following is the configuration I use in grub-customizer for my main memtest entry:
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 6f124093-a471-4959-8a59-b03c11ad2634
else
search --no-floppy --fs-uuid --set=root 6f124093-a471-4959-8a59-b03c11ad2634
fi
linux16 /boot/memtest86+.bin
It is identical to the one found in the referenced question save for the weird final numbers at the end of the search
command - those were generated automatically by the software when choosing an entry template, I decided to leave those as-is.
I don't think memtest was installed improperly since it was shipped natively with Ubuntu. So to me it's really a question of how to use it.
Any help appreciated.
Solution 1:
So, it appears memtest86+ was not the way to go for UEFI systems. What you want is memtest86, without the +.
- memtest86+ is available on this website. For reasons I can't explain, you can't make a bootable USB device out of its windows installer, that works on UEFI.
- memtest86 is available on this website. Creating an USB device bootable on UEFI is possible with this version.
It was just a matter of turning to the right version of this software. Thanks to @Terrance for putting me on the right track with the UEFI / BIOS distinction.
Solution 2:
I know this is an old post, but it still comes up in searches, so I'm going to give a solution.
Most distros supply memtest86+. It is not compatible with UEFI, because UEFI does not support 16 bit . However, PassMark Memtest86 (ver. 5 or later) supports UEFI.
First, obtain the memtest files. Download the USB boot image. http://memtest86.com/download.htm Next, extract the files from the image. I burned the image to a flash drive to facilitate installing on multiple computers.
Second, install memtest86. I made a 500MB partition at the end of my HDD, and formatted to FAT32. Then copied all files from flash drive to this partition. Note: it is possible to install to your EFI directory, but files need to be renamed to avoid overwriting existing boot files.
Third, configure grub2-efi menu entry. There are many ways to add an entry, but the safest way that survives update-grub follows. Using root privileges create file /etc/grub.d/39_memtest, and set it executable. (Note: changing the number in the file name changes the position it appears in the grub menu. DO NOT make it lower than 6 to insure that header and theme run first)
Next make the contents of the file:
#!/bin/sh
echo "Adding Memtest86" >&2
exec tail -n +3 $0
menuentry "Memtest86" {
chainloader (hdx,y)/efi/boot/bootx64.efi
}
EOF
*Replace (hdx,y) with your appropriate HDD and partition information.
Then run update-grub You should now have a menu entry that boots into Memtest86