you can download it from the memtest86 website[1]. Then, after unzipping it you'll end up with a file named memtest86-usb.img (among others). With fdisk -l memtest86-usb.img you should get something like
Code:
...
Units: sectors of 1 * 512 = 512 bytes
...
Device Start End Sectors Size Type
memtest86-usb.img1 2048 512000 509953 249M Microsoft basi
memtest86-usb.img2 514048 1023966 509919 249M EFI System
Now you can mount it with mount -o loop,offset=263192576 memtest86-usb.img /mnt/tmp, the offset has to be sector_size*start_sector (here 512*514048=263192576). Then copy /mnt/tmp/EFI/BOOT/BOOTX64.efi to /boot/efi/EFI/BOOT/memtest/memtest.efi. Lastly create /boot/efi/loader/entries/memtest.conf with
Code:
title Memtest86
efi EFI/memtest/memtest.efi
After rebooting you should be able to select "Memtest86" in your boot menu.
As an alternative you could also just put memtest on a usb drive.