Table of Contents#
- Prerequisites
- Installation Methods
- Running Memtest+
- Interpreting Test Results
- Troubleshooting Common Issues
- Conclusion
- 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
sudoprivileges 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).
Method 1: Install via EPEL Repository (Recommended)#
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.rpmVerify EPEL is enabled:
sudo yum repolist | grep epelYou 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+ -yThe package will automatically:
- Download the Memtest+ binary (
memtest86+.bin). - Place it in the
/bootdirectory (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" -yStep 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.gzStep 3: Extract and Compile#
Extract the tarball and navigate to the source directory:
tar xzf memtest86+-6.20.tar.gz
cd memtest86+-6.20Compile the binary. Memtest+ uses a simple Makefile:
makeThis 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:
-
Edit the GRUB2 configuration template:
sudo vi /etc/default/grub -
Add the following line at the end of the file (adjust
MENUENTRYname if desired):GRUB_DISABLE_OS_PROBER=false # Ensures GRUB scans for other bootable files -
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 rebootStep 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
Escto 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+.binor the menu entry was not added. - Fix:
- Verify
memtest86+.binexists in/boot:ls -l /boot/memtest86+.bin - Regenerate GRUB2 config:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
- Verify
Installation via EPEL Fails#
- Cause: EPEL repository not enabled or outdated.
- Fix:
- Reinstall EPEL:
sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm - Clear yum cache and retry:
sudo yum clean all && sudo yum install memtest86+ -y
- Reinstall EPEL:
Compilation Errors (Source Method)#
- Cause: Missing development tools or incompatible source code.
- Fix:
- Ensure "Development Tools" are installed:
sudo yum groupinstall "Development Tools" -y - Use the latest stable source code from Memtest86+official website.
- Ensure "Development Tools" are installed:
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.