Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 813261 - binary memtest* for non-EFI system
Summary: binary memtest* for non-EFI system
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ben Kohler
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-15 22:36 UTC by Thomas Capricelli
Modified: 2021-09-24 16:10 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Capricelli 2021-09-15 22:36:30 UTC
sys-apps/memtest86-bin will only install a "UEFI" something. Even if it installs a file in /etc/grub.d, grub will ignore it on non-uefi systems.

This ticket is for requesting the same kind of ebuild for non-uefi systems.


Rationale:
There's no memtest86 working on almost all my computers. Not only recent ones (ddr4/uefi), but also old ones : both sys-apps/memtest86 and sys-apps/memtest86+ will either not start (black or blue empty screen), crash (start then the computer reboot), or misbehave (report tons of wrong errors).
Apparently this is due to some bad interaction with recent gcc, and there are plenty of related bugs in bgo. But whatever.


I did this by hand, and this works:
* download the binary from http://memtest.org/#downiso
* install in /boot/memtest86+-5.31b.bin
* add a file /etc/grub.d/39_memtest86+_orzel with content as specified at the end
* restart grub-mkconfig

Basically, i would like sys-apps/memtest86-bin to automatize this.



content of /etc/grub.d/39_memtest86+_orzel:
--------------------
#!/bin/sh

. /usr/share/grub/grub-mkconfig_lib

memtest=/boot/memtest86+-5.31b.bin

if [ -f "${memtest}" ]; then
        gettext_printf "Found memtest86+ image: %s\n" "${memtest}" >&2

        device="$("${grub_probe}" --target=device "${memtest}")"
        path="$(make_system_path_relative_to_its_root "${memtest}")"
        cat <<EOF
menuentry 'Memtest86+' {
EOF
        prepare_grub_to_access_device "${device}" | grub_add_tab
        cat <<EOF
        linux16 "${path}"
}
EOF
fi
--------------------


Reproducible: Always
Comment 1 Ben Kohler gentoo-dev 2021-09-16 11:33:11 UTC
From https://www.memtest86.com/download.htm :

"IMPORTANT: MemTest86 V9 images support only UEFI boot. On machines that don't support UEFI, MemTest86 will not boot. Please download the older V4 BIOS release of MemTest86 instead."

This v4 release is available already as sys-apps/memtest86.

The memtest86+ binary you mention is a completely different memtest implementation, currently packaged as sys-apps/memtest86+.  You should open bugs against that package, to fix the current source builds and/or optionally use the prebuilt one from upstream.
Comment 2 Thomas Capricelli 2021-09-17 16:07:23 UTC
(In reply to Ben Kohler from comment #1)

> The memtest86+ binary you mention is a completely different memtest
> implementation, currently packaged as sys-apps/memtest86+.  You should open
> bugs against that package, to fix the current source builds and/or
> optionally use the prebuilt one from upstream.

Err, the non-bin package you mention has been broken for years on gentoo, hence the need for a binary version. (?)
Comment 3 Ben Kohler gentoo-dev 2021-09-17 16:14:47 UTC
I understand that, but this binary YOU have linked would not be part of my memtest86-bin package.  It would either be part of the existing sys-apps/memtest86+ package or a new sys-apps/memtest86+-bin.

My memtest86-bin package is for the Passmark non-free Memtest86 (from Memtest86.com).
Comment 4 Thomas Capricelli 2021-09-17 16:23:39 UTC
I see, indeed.
Actually i want anything official that allows me to test my ram.
Comment 5 Ben Kohler gentoo-dev 2021-09-17 16:30:01 UTC
Well I did close a bug on memtest86+ for runtime breakage with gcc >=8 so that may already work for you now.  Can you try sys-apps/memtest86+-5.31b-r1 ?

I can look into adding a binary flag on memtest86+ as well.
Comment 6 Thomas Capricelli 2021-09-24 16:10:49 UTC
I did some tests with sys-apps/memtest86+-5.31b-r1 and indeed, it works. No more need for the binary then. Thanks !