thelinuxvault blog

Installation of Memtest+ RAM Memory Test Tool on Red Hat 7 Linux

Random Access Memory (RAM) is a critical component of any computer system, responsible for temporarily storing data that the CPU needs to access quickly. Faulty RAM can lead to system crashes, data corruption, application errors, or even unbootable systems. To diagnose such issues, Memtest86+ (often shortened to "Memtest+") is a widely used, open-source tool designed to stress-test and detect errors in RAM.

This blog provides a step-by-step guide to installing and using Memtest+ on Red Hat Enterprise Linux (RHEL) 7. Whether you suspect RAM issues or want to validate new hardware, this guide will help you set up Memtest+ and interpret its results effectively.

2026-02

Table of Contents#

  1. Prerequisites
  2. Installation Methods
  3. Running Memtest+
  4. Interpreting Test Results
  5. Troubleshooting Common Issues
  6. Conclusion
  7. References

Prerequisites#

Before starting, ensure your system meets the following requirements:

  • A running Red Hat 7-based system (RHEL 7, CentOS 7, or Scientific Linux 7).
  • Root or sudo privileges to execute administrative commands.
  • Internet access (for downloading packages or source code).
  • Basic familiarity with the Linux command line and GRUB2 bootloader (used by RHEL 7).

Installation Methods#

Memtest+ is not included in Red Hat’s default repositories, so we’ll cover two reliable installation methods: via the EPEL repository (simplest) and compiling from source (for advanced users).

The Extra Packages for Enterprise Linux (EPEL) repository provides additional open-source packages for RHEL-based systems, including Memtest86+.

Step 1: Enable the EPEL Repository#

EPEL is not pre-installed on RHEL 7. Install it using the official EPEL RPM:

sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Verify EPEL is enabled:

sudo yum repolist | grep epel

You should see output similar to:

epel/x86_64                  Extra Packages for Enterprise Linux 7 - x86_64  13,733

Step 2: Install Memtest86+ via YUM#

Once EPEL is enabled, install Memtest+ using yum:

sudo yum install memtest86+ -y

The package will automatically:

  • Download the Memtest+ binary (memtest86+.bin).
  • Place it in the /boot directory (required for boot-time access).
  • Add a GRUB2 menu entry for Memtest+ (so it appears during system boot).

Method 2: Compile from Source Code#

If you prefer to use the latest version or cannot access EPEL, compile Memtest+ from source.

Step 1: Install Development Tools#

Compiling requires tools like gcc and make. Install the "Development Tools" group:

sudo yum groupinstall "Development Tools" -y

Step 2: Download Memtest+ Source Code#

Visit the Memtest86+ official site to find the latest source code. As of 2024, the latest stable version is 6.20. Download it using wget:

wget https://www.memtest.org/downloads/memtest86+-6.20.tar.gz

Step 3: Extract and Compile#

Extract the tarball and navigate to the source directory:

tar xzf memtest86+-6.20.tar.gz
cd memtest86+-6.20

Compile the binary. Memtest+ uses a simple Makefile:

make

This generates the memtest86+.bin binary in the current directory.

Step 4: Install the Binary to /boot#

Move the compiled binary to /boot (required for GRUB2 to detect it):

sudo cp memtest86+.bin /boot/

Step 5: Manually Add GRUB2 Menu Entry#

Unlike the EPEL package, compiling from source does not auto-add a GRUB entry. To manually add it:

  1. Edit the GRUB2 configuration template:

    sudo vi /etc/default/grub
  2. Add the following line at the end of the file (adjust MENUENTRY name if desired):

    GRUB_DISABLE_OS_PROBER=false  # Ensures GRUB scans for other bootable files
  3. Regenerate the GRUB2 configuration to include Memtest+:

    sudo grub2-mkconfig -o /boot/grub2/grub.cfg

GRUB2 will now detect memtest86+.bin in /boot and add a menu entry.

Running Memtest+#

Memtest+ runs before the OS boots (it cannot run within a live Linux session). Here’s how to launch it:

Step 1: Reboot the System#

Restart your RHEL 7 machine:

sudo reboot

Step 2: Select Memtest+ from the GRUB2 Menu#

During boot, the GRUB2 menu will appear (usually for 5 seconds by default). Use the arrow keys to select "Memtest86+" (or similar, depending on your GRUB entry name) and press Enter.

Step 3: Run the Test#

Memtest+ will start automatically. It runs a series of RAM tests (e.g., address testing, pattern testing) in loops ("passes").

  • Recommended: Let it run for at least 2 full passes (more if you suspect issues). A full pass can take 30 minutes to several hours, depending on RAM size and speed.
  • Abort: Press Esc to stop the test and reboot.

Interpreting Test Results#

Memtest+ displays results in real time. Here’s what to look for:

No Errors Detected#

If the test completes multiple passes with "0 errors", your RAM is likely healthy.

Errors Detected#

If errors appear (e.g., Test 4: Address test, walking ones ... Error at address 0x12345678), this indicates faulty RAM.

  • Action: Replace the faulty RAM module(s). If multiple modules are installed, test them individually to isolate the defective one.

Key Notes#

  • Errors are not fixable via software—they indicate physical RAM defects.
  • Intermittent errors (e.g., errors in later passes) still signal instability.

Troubleshooting Common Issues#

Memtest+ Not Showing in GRUB2 Menu#

  • Cause: GRUB2 failed to detect memtest86+.bin or the menu entry was not added.
  • Fix:
    1. Verify memtest86+.bin exists in /boot:
      ls -l /boot/memtest86+.bin
    2. Regenerate GRUB2 config:
      sudo grub2-mkconfig -o /boot/grub2/grub.cfg

Installation via EPEL Fails#

  • Cause: EPEL repository not enabled or outdated.
  • Fix:
    1. Reinstall EPEL:
      sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    2. Clear yum cache and retry:
      sudo yum clean all && sudo yum install memtest86+ -y

Compilation Errors (Source Method)#

  • Cause: Missing development tools or incompatible source code.
  • Fix:
    1. Ensure "Development Tools" are installed:
      sudo yum groupinstall "Development Tools" -y
    2. Use the latest stable source code from Memtest86+official website.

Conclusion#

Memtest+ is a powerful tool to diagnose RAM issues on Red Hat 7 Linux. By following this guide, you can install it via EPEL (simplest) or source, run comprehensive tests, and interpret results to ensure your system’s stability. Regular RAM testing is critical for preventing crashes and data loss—especially after hardware upgrades or system instability.

References#