Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have four 512 MB RAM modules in one server. The fourth RAM is showing error for only one bit when I use memtest86+ to test the RAMs. Even when I swap the RAM in fourth slot with some other RAM I still get error in RAM in fourth slot at exact same location. So I wanted to block one particular address (or 4kb page, if necessary) of RAM from being used by server. Server is having fedora 11 and is used for test purposes only. It is not hosting any user application. Any idea on how I can block certain portion of RAM from being used? or on what is causing error to come at particular byte irrespective of RAM module installed.

share|improve this question
up vote 6 down vote accepted

I have recently found out that there is a kernel parameter (to provide at boot, in grub config for example)


You can supply it many times to lock out parts of the memory.



locks out megabytes from 217 to 219

share|improve this answer
Really nice find. More details of other usages of memmap kernel parameter are listed at – Saurabh Barjatiya Nov 2 '10 at 7:09
Is there any way to do this for Windows? Or a third-party program similar to "malloc" to which you can specify a memory area to occupy? – Mark C Apr 9 '12 at 15:55
You would have to use it before the system starts to load to be sure it doesn't fail. I don't expect this to be possible with windows unless you set up a linux kvm host and put windows in a virtual machine – naugtur Apr 11 '12 at 16:19

There used to be the "BadMEM" patch for Linux, however it would take a bit of effort to upgrade it to a current keernel.

share|improve this answer
I would have to learn about linux device drivers and kernel modules so that I can upgrade the patch to make it compatible with todays smp kernels. But thanks for the link. I know where to begin now. – Saurabh Barjatiya Jul 11 '09 at 13:21

That sounds like a possible bad slot on the motherboard as your testing showed. I have never seen a way around this besides just not using that slot. To my knowledge, there is no easy answer. I suppose some software could be created, but like nik said, that would be more of an SO question.

share|improve this answer
If the system is still under maintenance then call the vendor and have them replace the board. – mrdenny Jul 12 '09 at 17:45

I don't think you can lock-out specific parts of a RAM address range.
It is owned by the virtual memory management of your OS.

However, this is an interesting application -- to lock out dynamic memory address ranges from the OS. If there is such a technique available (for any OS), I am interested in knowing it.

If it is not available, that sounds like an interesting project to try.
But, that would be a stackoverflow question.

share|improve this answer

You could write a kernel extension which, when loaded, would just allocate this page and then do nothing else.

Alas I don't know how to do this. When I used to work on IBMs VM system this was built in, but that doesn't help of course.

share|improve this answer

As Trogy said, that could be a motherboard defect, or even a CPU defect (though somewhat unlikely in this precise case).

share|improve this answer
I would still count on a board/slot defect since replacing modules across still shows slot affinity. I do not see how a CPU defect can manifest in this way. – nik Jul 11 '09 at 8:27
In this precise way, it can't, you're right. But some memory errors are CPU related (usually it's a cache defect). – wazoox Jul 12 '09 at 7:16

I had this same problem, but found the available answers confusing and incomplete, so I put together a step-by-step guide, assuming as little background as I could.

  1. Run Memtest86+ in “Badram” output (preferably from a bootable external medium). When Memtest86+ starts, type:
  2. “c” (“configuration”), then
  3. “4” (“Error Report Mode”), then
  4. “3” (“Bad RAM Patterns”), then
  5. “0” (“Continue”).
  6. Copy the output that follows any lines beginning with “badram=”.
  7. Open a terminal (command line).
  8. Change to the directory where the “grub” file is located. For example, “cd /etc/default”.
  9. With “root” privileges, use a text editor to open the “grub” file (If you are not signed in as “root,” use “sudo.” You will be asked for the “root” password.): “sudo nano grub” (This example changes the user to “root” and opens the file “grub” with the “nano” text editor.).
  10. Find the section describing memtest.
  11. Uncomment the last line (Delete the special character at the beginning of the line, such as “#,” “>,” or “!”). This makes it active (For example,“#GRUB_BADRAM=” becomes “GRUB_BADRAM=”.).
  12. Replace the example addresses (following “GRUB_BADRAM=”) with the “badram=” output that you copied from Memtest86+ (for example, “0x98f548a0,0xfffffffc”).
  13. Save (or “write out”) your changes.
  14. In the terminal (command line) update the “grub.cfg” file, by typing “sudo update-grub”.
  15. Reboot.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.