48

Downloaded the Ubuntu 16.04.2 .iso install disk and flashed it onto a USB stick.

Booting on the USB stick, there is no memtest86+ option (along with "Try Ubuntu").

Is there a way to add it to the install options?

(it's for a UEFI boot PC running normally Windows, its owner does not want to install Ubuntu. "memtest86+" is completely free (unlike "memtest86"), but is quite old, and does not offer a UEFI boot - this is why having it within the Ubuntu options makes things easier)

Evan Carroll
  • 7,743
Déjà vu
  • 1,119
  • 1
    unlike "memtest86". The PRO version is not free. But you want "MemTest86 v7 Free Edition" ... and that one is (as it says in the name) – Rinzwind May 23 '17 at 07:00
  • 2
    Note: one of the error messages I see when I run sudo update-grub is Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting. That's the Google search that brought me to this question. – Gabriel Staples Jun 03 '23 at 21:02
  • @Rinzwind Not the same program. The one with "+" is open source, no "pro" version. – Alkanshel Sep 30 '23 at 22:26

6 Answers6

45

Memtest86+

Edit 1: {

Memtest86+ version 6 (and newer) can be downloaded as a standalone zip file, which contains an iso file. This iso file can be cloned directly into a USB drive to make a bootable memtest86+ system and it works both in UEFI mode and the old BIOS mode alias legacy mode.

www.memtest.org

}

Edit 2: {Ubuntu 23.04 (Lunar Lobster) has memtest86+ version 6 now. Thanks to TomásFox for this update.}


Older versions of Memtest86+ do not work in UEFI mode because they are 16-bit programs. But if you can boot the computer in BIOS (CSM, legacy) mode, they work.

See: Where is the memtest option on the Ubuntu 64-bit live CD?.

Memtest86

There is another version, the 'original' but now not FOSS version memtest86, and it works in UEFI mode. There is a commercial version and a free version (no cost, but not open source code).

See: www.memtest86.com/download.htm.

Adding newest freeware memtest86 to UEFI Grub2

Here is a great tutorial on how to add the freeware memtest86 to UEFI Grub2. It's especially useful if you are working on a remote machine, and inserting a physical usb is out of the question.

See this Ubuntu oriented tutorial.

See this example of doing this on a remote server, but based on the above tutorial.

sudodus
  • 47,864
  • Thanks, used the free memtest86, but it doesn't have options available, like using multi-cores. So the 86+ is more appealing, will try to install this one later on, on a live support. – Déjà vu May 23 '17 at 07:27
  • @ringø, You might find it convenient to [extract and] clone memtest86+ from this compressed image file, http://phillw.net/isos/linux-tools/compressed-images/dd_memtest-plus-5.01_33M.img.xz – sudodus May 23 '17 at 07:33
  • 2
    Linux can do memtest https://unix.stackexchange.com/a/439769/105120 – user1133275 Jan 04 '21 at 20:04
  • @user1133275, Thanks for this link. It works for me according to a command line in a comment by Steven Kitt (at that link). :-) – sudodus Jan 05 '21 at 14:12
  • 1
    Ubuntu 23.04 (Lunar Lobster) now has memtest86+ version 6.

    I already had Ubuntu installed, so I temporarily changed the repo sources to Lunar and then just updated memtest86+. Can't remember if I run update-grub, but now I have memtest in the boot entries and it works just fine.

    – Tomás Fox Jan 24 '23 at 14:48
  • 1
    @TomásFox, Thanks for this heads up :-) – sudodus Jan 24 '23 at 16:52
  • @TomásFox So, how do I run it from the install iso? I have the 24.10 install media on an USB stick, but can't see any option to run it, neither in the grub menu nor in the efi menu. Inspecting grub.cfg shows that the option will only show if not in efi mode, but running file on the bundled memtest86+64.bin says it's version 7... – Andreas Nov 22 '24 at 03:09
  • @Andreas, I am not sure if the Ubuntu iso files are modified to let you use Memtest in UEFI mode. Try booting the computer into the Ubuntu install media in BIOS mode alias CSM alias legacy mode or get a stand-alone Memtest86+ version 6 (or newer) zip file and make a boot USB drive from it and boot in UEFI mode. – sudodus Nov 22 '24 at 10:30
  • @sudodus Thanks. Yeah it appears they're not. I've not yet come across how to select legacy boot on a MacBook that supports it, when it sees an ESP. I was hoping to use a combined stick, but they'll have to be discrete as you say. – Andreas Nov 22 '24 at 20:51
14

PCMemTest (Ubuntu 22.04)

Use PCMemTest. Since Ubuntu 22.04 the PCMemTest is available from the Ubuntu repository. PCMemTest is a fork of MemTest86+ and it works fine on UEFI too. As it is part of Ubuntu it is the easiest to install:

sudo apt install pcmemtest

And in the next boot it should appear in the grub boot menu (just like you used memtest86+ before).

Memtest86+ (Ubuntu 23.04 and above)

sudo apt install memtest86+

The memtest86+ version 6 and above supports UEFI. (And this is actually based on the above mentioned pcmemtest code.)

redseven
  • 842
  • 1
    You can also download the package from https://packages.ubuntu.com/lunar/amd64/memtest86+/download Then install with dpkg -i file – develCuy Aug 19 '23 at 16:06
7

Is there a way to add it to the install options?

No.

Best alternative: create a live boot memtest usb/dvd. You can create it from Linux, Mac or Windows (basically they provide an installer for all three but the software itself is identical).

For UEFI you need the MemTest86 v7 Free Edition version (link below downloads that one). Instructions for the USB version (there is also a DVD version and a floppy disk version at the links above):

Create a bootable USB Flash drive:

  • Download the Linux/Mac MemTest86 USB image.
  • UN-tar the package (tar xvzf MemTest86-*-usb.tar.gz). An image file and a
  • README file will be created in the current directory. Follow instructions in the README to write the USB flash disk.

Pretty generic.

Rinzwind
  • 310,127
  • 1
    Thanks, used the free memtest86, but it doesn't have options available, like using multi-cores. So the 86+ is more appealing, will try to install this one later on, on a live support. – Déjà vu May 23 '17 at 07:26
  • 3
    memtest86 v5+ does have multicore but it is unstable. You can use it but it crashes more often than it finishes – Rinzwind May 23 '17 at 08:00
2

Memtest86 works in UEFI mode. It has a free variant but is not open-souce.

Download the iso from https://www.memtest86.com/tech_booting-cd-dvd.html

Burn it to usb drive (I used etcher).

Now restart your machine and boot from the usb drive.

P.S.

Diagnosing RAM with tools most of the time does not work. I ran Memtest86 for 5/6 hours. It reported that the RAMs do not have any issues. Then I took out the RAMs i doubted and the system started running smoothly.

Just keep one RAM and remove others. Then run your machine for a while and check if there is any issue or not (remember, the issues can be very subtle, for example keyboard does not work for 1-5 seconds every once in a while). If there is no issue then it is a good RAM. Then check ram 2,3...n.

Again if you find a faulty RAM, then maybe the RAM is not fault but the slot where it is attached to is.

Please note that all RAMs and slots can be good but if there is a miss match (bus speed or brand or the ram) then it can cause issues too. So, you have to make sure that combinations also work. For example, use same brand and same bus speed RAMs together and test the machine for a while (remember, the issues can be very subtle). Then attach another brand / bus speed RAM and test for a while. Then maybe enable XMP and test for a while.

So, hopefully now you understand why it is better to diagnose RAMs physically than with tools.

2

I want to try to answer this question from the perspective of Why doesn't the memtest86+ package add a boot entry to my GRUB bootloader?

This has been tracked in an Ubuntu bug since 2011. For certain versions of the package, adding the boot entry was disabled due to a Debian bug report that the grub-efi bootloader did not have backwards compatibility with linux16 or older BIOS-loaded programs, which Memtest86+ was at the time. It was quoted that Memtest86+ did not support EFI at the time, so the update-grub script was modified to exit if EFI booting was detected. This disablement patch was added to Ubuntu Quantal 12.10.

It wouldn't be until around the end of 2022 that it's reported Memtest86+ v6 was released with EFI support (or around Ubuntu 22.10 Kinetic Kudu's release). As of the latest update on 2022-11-07, it's reported that a fix is released. This correlates with the upstream Debian repository, which added boot entry disablement on December 20 2021 (a warning message was added the next day.) This is included in package 5.31, the latest backported to Focal Fossa 20.04 which ends Standard support as of May 2025. As of March 25 2022, the 16-bit check was removed and support appeared to be officially added for EFI. This is in 6.0.20220422, backported to Jammy Jellyfish 22.04.

gcode
  • 497
1

According to this discussion it can't run in UEFI mode because it's a 16-bit program.
If available, booting the live USB (or DVD) in Legacy/CSM (AKA "BIOS mode") should bring the memtest86+ option you want to the live menu.

  • Thanks, used the free memtest86, but it doesn't have options available, like using multi-cores. So the 86+ is more appealing, will try to install this one later on, on a live support. – Déjà vu May 23 '17 at 07:29