# in-kernel memtest?

## Sadako

I've recently discovered that my ram seems to have developed a fault, memtest+ throws up errors in every test, roughly from 2043 to 2048 MB, so the last few MB of one of the 2GB ram modules.

Both memtest and mprime ran fine on the hardware before, with no bios changes, and the results are the same with the most conservative settings possible.

Simply returning the ram isn't actually all the simple atm, so I need a way to have linux reserve the bad ram, which I know is at least possible...

Okay, so I try enabling the in-kernel memtest implementation, which can do this automatically, but it just freezes early on boot, after the "unpacking kernel" stage, and even if I leave it for about 3 hours it's the same, this is with one pass of memtest with a 2.6.33 kernel.

I tried with a vanilla 2.6.8.10 kernel too, and got an "early panic" with memtest=1, but without declaring memtest it booted fine...

So, has anyone here successfully used the in-kernel memtest, and if so do you have any notion on what's going wrong here or any ideas on getting it working?

Anyone know another way to get what I need?

Thanks.

edit: actually, anyone know if the in-kernel implementation is based on memtest 3.5, or memtest 4.0 aka memetest+?

I know 3.5 has some issues with more recent hardware.

Also, does it have graphical output like standalone memtest, or at least give you some indication that it's actually running?

----------

## aCOSwt

 *Hopeless wrote:*   

> Anyone know another way to get what I need?

 

Sorry Hopeless ! Amongst your questions, I just know an answer to this one only...   :Smile: 

http://rick.vanrein.org/linux/badram/

(I know it works under Debian. I do not know under Gentoo) Good luck !

----------

## Sadako

Thanks for the response aCOSwt, I came across badram while looking for a solution, looks like the last patch is for 2.6.28, seems it's no longer maintained since the memmap option was added to the kernel.

Speaking of which, I'm currently running with 'memmap=4M$0x7F800000' in my kernel command line, which reserves 4MB from the 2040th MB from userspace allocation, seems to have done the trick, the userspace 'memchecker' utility passes every test now, where it threw up errors on every run before.

I suppose I can live without that 0.1% of my ram ( :Razz: ), at least for the moment, I'll try reseating and switching around the ram modules later, see if that makes any difference.

I'd still love to hear from anyone who has the kernel memtest working, also one other question;

Presuming things work the way I think they do, and if I were to swap the modules around and the faulty ram is now at the 4088th MB, would running a 32-bit OS be unaffected by this issue then, ie the faulty ram would be out of the range or memory a 32-bit OS can allocate?

I haven't run windows on this system yet, but I'm just wondering if that would make this problem a non-issue if I ever decide to do so...

----------

