memtest86+ PXE boot

https://www.memtest.org/archives

apt-get install -y pxelinux
 
#URL=http://www.memtest.org/download/5.01/memtest86+-5.01.bin
URL=https://www.memtest.org/download/v6.00b1/mt86plus_6.00b1_64.iso.zip
 
wget -q ${URL} -P /tmp/
 
unzip  /tmp/mt86plus_6.00b1_64.grub.iso.zip -d /tmp/
dd if=/tmp/mt86plus_64.iso of=/dev/sdb
 
mkdir /var/lib/tftpboot/memtest
mv /tmp/memtest86+-*.bin /var/lib/tftpboot/memtest
cd /var/lib/tftpboot/memtest
ln -s memtest86+-*.bin memtest86+
 
echo "confiure tftpboot..." 
mkdir -p /var/lib/tftpboot/pxelinux.cfg
cat <<EOF>   /var/lib/tftpboot/pxelinux.cfg/memtest86+.conf
LABEL linux
   MENU LABEL memtest86+
   KERNEL /memtest/memtest86+
EOF
 
echo "MENU INCLUDE pxelinux.cfg/memtest86+.conf" >> /var/lib/tftpboot/pxelinux.cfg/default