MemTest86+ preinstalled but doesn't apear in grub menu and I'm unable to boot inito it

garuda-inxi
System:
Kernel: 6.4.1-zen2-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.1.1
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=0695ce0f-1d70-4dc0-890c-d7417dca7b86 rw rootflags=subvol=@
rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=7
systemd.unified_cgroup_hierarchy=1 ibt=off
Desktop: KDE Plasma v: 5.27.6 tk: Qt v: 5.15.10 wm: kwin_x11 vt: 2
dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop System: Gigabyte product: Z170X-Designare v: N/A
serial: <superuser required>
Mobo: Gigabyte model: Z170X-Designare-CF v: x.x
serial: <superuser required> UEFI: American Megatrends v: F23g
date: 03/09/2018
CPU:
Info: model: Intel Core i5-6600K bits: 64 type: MCP arch: Skylake-S
gen: core 6 level: v3 note: check built: 2015 process: Intel 14nm family: 6
model-id: 0x5E (94) stepping: 3 microcode: 0xF0
Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 256 KiB
desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB L3: 6 MiB
desc: 1x6 MiB
Speed (MHz): avg: 3500 min/max: 800/3900 scaling: driver: intel_pstate
governor: powersave cores: 1: 3500 2: 3500 3: 3500 4: 3500 bogomips: 27999
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities: <filter>
Graphics:
Device-1: Intel HD Graphics 530 vendor: Gigabyte driver: i915 v: kernel
arch: Gen-9 process: Intel 14n built: 2015-16 ports: active: HDMI-A-3
empty: DP-1, DP-2, HDMI-A-1, HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:1912
class-ID: 0300
Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.2
compositor: kwin_x11 driver: X: loaded: modesetting
alternate: fbdev,intel,vesa dri: iris gpu: i915 display-ID: :0 screens: 1
Screen-1: 0 s-res: 1440x900 s-dpi: 96 s-size: 381x238mm (15.00x9.37")
s-diag: 449mm (17.69")
Monitor-1: HDMI-A-3 mapped: HDMI-3 model: LG (GoldStar) L192WS
serial: <filter> built: 2007 res: 1440x900 dpi: 89 gamma: 1.2
size: 410x256mm (16.14x10.08") diag: 483mm (19") ratio: 16:10 modes:
max: 1440x900 min: 720x400
API: OpenGL v: 4.6 Mesa 23.1.3 renderer: Mesa Intel HD Graphics 530 (SKL
GT2) direct-render: Yes
Audio:
Device-1: Intel 100 Series/C230 Series Family HD Audio vendor: Gigabyte
driver: snd_hda_intel v: kernel alternate: snd_soc_avs bus-ID: 00:1f.3
chip-ID: 8086:a170 class-ID: 0403
Device-2: Corsair VOID PRO USB Gaming Headset
driver: hid-generic,snd-usb-audio,usbhid type: USB rev: 2.0 speed: 12 Mb/s
lanes: 1 mode: 1.1 bus-ID: 1-5:4 chip-ID: 1b1c:0a17 class-ID: 0300
serial: <filter>
API: ALSA v: k6.4.1-zen2-1-zen status: kernel-api with: aoss
type: oss-emulator tools: N/A
Server-1: PipeWire v: 0.3.72 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
Device-1: Intel Ethernet I219-V vendor: Gigabyte driver: e1000e v: kernel
port: N/A bus-ID: 00:1f.6 chip-ID: 8086:15b8 class-ID: 0200
IF: enp0s31f6 state: up speed: 1000 Mbps duplex: full mac: <filter>
Device-2: Intel I211 Gigabit Network vendor: Gigabyte driver: igb
v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: e000 bus-ID: 05:00.0
chip-ID: 8086:1539 class-ID: 0200
IF: enp5s0 state: down mac: <filter>
Drives:
Local Storage: total: 5.69 TiB used: 536.79 GiB (9.2%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital
model: WD20EZRZ-00Z5HB0 size: 1.82 TiB block-size: physical: 4096 B
logical: 512 B speed: 6.0 Gb/s tech: HDD rpm: 5400 serial: <filter>
fw-rev: 0A80 scheme: GPT
ID-2: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST4000DM004-2CV104
size: 3.64 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
tech: HDD rpm: 5425 serial: <filter> fw-rev: 0001 scheme: GPT
ID-3: /dev/sdc maj-min: 8:32 vendor: Samsung model: SSD 860 EVO M.2 250GB
size: 232.89 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
tech: SSD serial: <filter> fw-rev: 2B6Q scheme: GPT
Partition:
ID-1: / raw-size: 232.59 GiB size: 232.59 GiB (100.00%)
used: 119.53 GiB (51.4%) fs: btrfs dev: /dev/sdc2 maj-min: 8:34
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 4.2 MiB (1.4%) fs: vfat dev: /dev/sdc1 maj-min: 8:33
ID-3: /home raw-size: 232.59 GiB size: 232.59 GiB (100.00%)
used: 119.53 GiB (51.4%) fs: btrfs dev: /dev/sdc2 maj-min: 8:34
ID-4: /var/log raw-size: 232.59 GiB size: 232.59 GiB (100.00%)
used: 119.53 GiB (51.4%) fs: btrfs dev: /dev/sdc2 maj-min: 8:34
ID-5: /var/tmp raw-size: 232.59 GiB size: 232.59 GiB (100.00%)
used: 119.53 GiB (51.4%) fs: btrfs dev: /dev/sdc2 maj-min: 8:34
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 15.51 GiB used: 0 KiB (0.0%) priority: 100
dev: /dev/zram0
Sensors:
System Temperatures: cpu: 30.0 C mobo: 24.0 C
Fan Speeds (RPM): cpu: 0 fan-1: 601 fan-3: 358 fan-4: 472 fan-5: 0
Power: 12v: N/A 5v: N/A 3.3v: 3.36 vbat: 3.12
Info:
Processes: 240 Uptime: 11m wakeups: 0 Memory: available: 15.51 GiB
used: 3.51 GiB (22.6%) Init: systemd v: 253 default: graphical
tool: systemctl Compilers: gcc: 13.1.1 clang: 15.0.7 Packages: pm: pacman
pkgs: 2047 libs: 576 tools: octopi,pamac,paru Shell: fish v: 3.6.1
running-in: konsole inxi: 3.3.27
Garuda (2.6.16-1):
System install date:     2023-05-23
Last full system update: 2023-07-07
Is partially upgraded:   No
Relevant software:       snapper NetworkManager dracut
Windows dual boot:       Probably (Run as root to verify)
Failed units:

I wanted to test my ram and was surprised to find that MemTest86+ is already preinstalled!

Weirdly though I don't see it in the grub menu?

When I check /etc/grub/ i can see it has a entry as /etc/grub/60_memtest86+

#!/usr/bin/env bash
########################################################
# This script generates a memtest86+ entry on grub.cfg #
# if memtest is installed on the system.               #
########################################################

prefix="/usr"
exec_prefix="${prefix}"

datarootdir="/usr/share"
datadir="${datarootdir}"

. "${datadir}/grub/grub-mkconfig_lib"

MEMTEST86_IMAGE="/boot/memtest86+/memtest.bin"
CLASS="--class memtest86 --class gnu --class tool"

if [ -e "${MEMTEST86_IMAGE}" ] && is_path_readable_by_grub "${MEMTEST86_IMAGE}" ; then
    ## image exists, create menu entry
    echo "Found memtest86+ image: ${MEMTEST86_IMAGE}" >&2
    _GRUB_MEMTEST_HINTS_STRING="$(${grub_probe} --target=hints_string ${MEMTEST86_IMAGE})"
    _GRUB_MEMTEST_FS_UUID="$(${grub_probe} --target=fs_uuid ${MEMTEST86_IMAGE})"
    _GRUB_MEMTEST_REL_PATH="$(make_system_path_relative_to_its_root ${MEMTEST86_IMAGE})"
    cat << EOF
if [ "\${grub_platform}" == "pc" ]; then
    menuentry "Memory Tester (memtest86+)" ${CLASS} {
        search --fs-uuid --no-floppy --set=root ${_GRUB_MEMTEST_HINTS_STRING} ${_GRUB_MEMTEST_FS_UUID}
        linux16 ${_GRUB_MEMTEST_REL_PATH} ${GRUB_CMDLINE_MEMTEST86}
    }
fi
EOF
fi

Also when I run sudo update-grub I can clearly see it being loaded:

...
Found memtest86+ image: /boot/memtest86+/memtest.bin
...

But when I'm in the grub menu it's not there and if I try to set it as the default in the Boot Settings, it tries to boot in to MemTest86+ but breaks with error: sparse file not allowed

You have an EFI system.
Make sure you have installed

memtest86+-efi

3 Likes

Figured it out!

Turns out MemTest86+ is preinstalled in a bunch of distros, but is the old version. Weirdy, MemTest86 is newer than MemTest86+.
MemTest86+ is actually newer. But the version that comes preinstalled isn’t compatible with UEFI systems.

So it’s just a matter of installing the correct efi packages.

For people searching for this it’s pretty straight forward on Garuda, pick your favorite!

MemTest86+

Install memtest86+-efi via octopi or sudo -S memtest86+-efi

It should install with the grub module: /etc/grub.d/60_memtest86+-efi

Just also run sudo update-grub after the install.

MemTest86

  1. Install memtest86-efi via octopi or sudo -S memtest86-efi
  2. Run sudo memtest86-efi --install
  3. It’ll ask for the ESP partition, and mount point and the install location.

    For me the autoconfig was correct but double check to make sure it is for you

  4. Pick the 3rd option: Add a boot entry for GRUB2 menu. (this will install and add an entry for you)

After it is done you should see a entry under /etc/grub.d/86_memtest ☜(゚ヮ゚☜)

4 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.