Skip to content

Instantly share code, notes, and snippets.

@porteusconf
Created February 14, 2021 15:34
Show Gist options
  • Save porteusconf/e31c2413cbff2c82f39f6f2f810d7730 to your computer and use it in GitHub Desktop.
Save porteusconf/e31c2413cbff2c82f39f6f2f810d7730 to your computer and use it in GitHub Desktop.
put memtest on boot-drive (in boot/EFI/memtest) and add to uefi boot menu (may need to disable secure UEFI boot)
# wget memtest86-usb.zip
unzip memtest86-usb.zip
#
testdisk memtest85-usb.img
mkdir /tmp/memtest
# use testdisk or similar to extract files in /EFI/BOOT/ on partition 1 to /tmp/memtest/
$ tree /tmp/memtest/
/tmp/memtest/
└── EFI
└── BOOT
├── Benchmark
├── blacklist.cfg
├── BOOTAA64.efi
├── BOOTIA32.efi
├── BOOTX64.efi
├── mt86.png
└── unifont.bin
mkdir /boot/efi/EFI/memtest/
# ls /boot/efi/EFI
Boot debian memtest Microsoft sparky
mv /tmp/memtest/EFI/BOOT/* /boot/efi/EFI/memtest/
# ls -l /boot/efi/EFI/memtest/
total 6001
drwx------ 2 root root 1024 Feb 14 03:16 Benchmark
-rwx------ 1 root root 4771 Feb 14 02:45 blacklist.cfg
-rwx------ 1 root root 1098096 Feb 14 02:45 BOOTAA64.efi
-rwx------ 1 root root 1208752 Feb 14 02:45 BOOTIA32.efi
-rwx------ 1 root root 1317616 Feb 14 02:45 BOOTX64.efi
-rwx------ 1 root root 6823 Feb 14 02:45 mt86.png
-rwx------ 1 root root 2355408 Feb 14 02:45 unifont.bin
efibootmgr --create --disk /dev/sda --part 2 --loader /EFI/memtest/BOOTX64.efi --label "memtest"
### need lower memtest menu-item down the list if it is first menu-item (can do in bios->Startup)
# reboot and hit F12 to get to UEFI boot menu, then choose memtest
@porteusconf
Copy link
Author

porteusconf commented Feb 14, 2021

ToDo: flesh-out into actual shell script and add quickstart instructions.

@porteusconf
Copy link
Author

And/Or, on UEFI pcs, you can use refind boot manager that will automatically add menu-item to run memtest per https://wiki.archlinux.org/index.php/rEFInd#Memtest86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment