PXEBoot Addon Memtest86

SyBad RAM is one of the most frustrating computer problems to have as symptoms are often random and hard to pin down. MemTest86 can help diagnose faulty RAM (or rule it out as a cause of system instability). As such it is often used by system builders, PC repair stores, overlockers & PC manufacturers. These instructions will allow you to add this functionality to your PXEBoot environment

Step 1: Basic Details

Memtest86 is available for information at this site.

Step 2: Download image : BIOS

Download the most current image and place it in the PXE BIOS boot image environment:

# mkdir -p /srv/tftp/images/memtest
# cd /srv/tftp/images/memtest
# wget https://www.memtest86.com/downloads/memtest86-4.3.7-iso.tar.gz
# tar -xvzf memtest86-4.3.7-iso.tar.gz

< CLEANUP >
# rm memtest86-4.3.7-iso.tar.gz
# rm README

Step 2: Download image : EFI

Download the most current image and place it in the PXE EFI boot image environment:

# mkdir -p /srv/tftp/images/memtest/download
# cd /srv/tftp/images/memtest/download
# curl -O https://www.memtest86.com/downloads/memtest86-usb.zip
# unzip memtest86-usb.zip
# losetup -fP memtest86-usb.img
# mkdir temp
# mount /dev/loop0p1 /srv/tftp/images/memtest/download/s
# cp /srv/tftp/images/memtest/download/EFI/BOOT/BOOTX64.efi /srv/tftp/images/memtest

< CLEANUP >

# umount /srv/tftp/images/memtest/download/s
# rmdir /srv/tftp/images/memtest/download/s
# losetup -d /dev/loop0
# rm -Rf /srv/tftp/images/memtest/download

Step 3: Configure X86 Netboot

Configure the /srv/tftp/boot-screens/menu.cfg  and add a rescue section:

....
include boot-screens/memtest.cfg
....

Create the rescue installer menu/srv/tftp/boot-screens/memtest.cfg

label memtest
        menu label ^memtest86
        kernel images/memdisk
        append iso initrd=images/memtest/Memtest86-4.3.7.iso

Step 4: Configure EFI Netboot

Create the rescue installer menu in /srv/tftp/grub/grub.cfg

menuentry 'memtest86' --class memtest {
   chainloader images/memtest/BOOTX64.efi
}