How to block out or map out bad RAM in Windows…

A friend recently came across a Samsung Ultrabook with faulty RAM.. sadly the RAM was soldered onto the board so it isn’t possible just to swap it out.

It is also about 13 months old and Samsung refuse to fix it under warranty.

Our next quest was to see if you could block out the windows kernel from using the faulty section of RAM. Linux has a similar option and windows seems to automatically list faulty areas of RAM if you have ECC ram in your machine.

However if you want to mask out ram yourself it wasn’t so clear how you do it manually.

Microsoft don’t have any official documentation showing how you add faulty RAM zones or pages. A few comments on their forums list the incorrect command and the wider internet also lists this incorrect command.

Windows will accept the incorrect command with no errors – so it looks like it worked, but if you read back the memory list it actually has not added the faulty section.

bcdedit /set badmemorylist 0xB7 0xB8 0xB9 0xBA 0xBB 0xBC 0xBD 0xBE 0xBF 0xC0 0xC1
The operation completed successfully.

bcdedit /enum {badmemory}

RAM Defects
identifier              {badmemory}

The correct command, only documented in one place I could find, is in fact this:

bcdedit /set {badmemory} badmemorylist 0xB7 0xB8 0xB9 0xBA 0xBB 0xBC 0xBD 0xBE 0xBF 0xC0 0xC1
The operation completed successfully.

bcdedit /enum {badmemory}

RAM Defects
identifier              {badmemory}
badmemorylist           0xb7

You then need to turn off the ability to access the bad memory:

bcdedit /set badmemoryaccess no

The formula to convert RAM to pages is (replace line 65566 with the correct line!):

ram to microsoft page

DONE! Except this doesn’t help you if so much RAM is faulty that you can not boot to add the entries ;)… that is for another day. (Possibly copy a BCD from another system with the mask applied?).

This entry was posted in Uncategorized. Bookmark the permalink.

31 Responses to How to block out or map out bad RAM in Windows…

  1. jgustavo says:

    if memtest detect error from 0x51000000 to 0x51FFFFFF the adress pages are “0x51” ?
    bcdedit /set {badmemory} badmemorylist 0x51
    or how I should write?

  2. Not entirely sure but I believe so. Does memtest show the faulty ram in megabytes, if so – use the formula in the excel sheet to locate the correct “microsoft page” value?

  3. JGustavo says:

    there are 16MB fault. and in 4K pages, are 4096 entry.
    I try this.

    I test the 0x51 and don’t work. I can access the range.

  4. JGustavo says:

    I solve it.
    thanks for de support
    the keys are:
    0x10000000 in memtest = 0x10000 in windows
    0x00001000 in memtest = 0x1 in windows
    page windows cut the 3 hex from right
    page windows cut the 0 from the left

    yo can’t mark a range of addesses, but mark page a page.
    if you need mark 0x51c00000 to 0x51c04000 yo need:
    bcdedit /set {badmemory} badmemorylist 0x51c00 0x51c01 0x51c02 0x51c03 0x51c04
    bcdedit /set badmemoryaccess no
    and reboot

    and… IT WORK

    thanks again

  5. Thank you so much for coming back with your findings! I’m glad I aimed you in the right direction.
    What device were you repairing that couldn’t have the RAM swapped out?

  6. JGustavo says:

    the device are “chuwi vi10”.
    the seller gave more than 500, and mine is the only failed.
    anyway, these devices will become increasingly common.
    and this solution will help very many of them are not expensive paperweight.

    now, the device are powerfull for the money spend

  7. atropos says:

    The comand
    bcdedit /set badmemoryaccess no
    doesn’t work. After some fiddling i figured out that you need to add {badmemory} too,so it looks like this

    bcdedit /set {badmemory} badmemoryaccess no

    Applies to win 10.
    Thanks for the post. I wouldn’t have had the working sytem without you.
    I’ve had problems updating win8 to win10 because of the “not enough ram to create ramdisk” message. I’ve cleared badmemory with
    “bcdedit /deletevalue {badmemory} badmemorylist”
    command and then I was able to install win10. But then I had random crashes very often (twice a day or more). To cut the king stiry short: it wasn’t bad drivers, earlier incompatible software etc. And for three weeks I fought with my rig :). And as I hadn’t have any hardware problems earlier…. :) what have I thrown at microsoft :D Luckily I remebered that I did bcdedit command. The rest is google…
    Thank you again :)

  8. Charlie says:

    Hello thecomputerperson, Thankyou for this discussion, it is the clearest simplest explanation i have seen on the internet on how to blacklist some memory in windows. Im in the middle of doing so for a laptop i have which unfortunely has embedded ram. However i was wondering if you can give a little help as i am still a little confused on how to read and convert the address’s memtest is giving out. Thankyou in advance and hope all is well on your side of the world

  9. Take the location like 255.984375 MB from memtest and then *1024 then *1024 then divide by 4096 and turn the result into hex.
    If you did it right the location calculations should match the excel screenshot.

    Good luck.

  10. Charlie says:

    Thankyou. i now understood what you do in excel sheet. Thankyou. Have another couple of questions if you dont mind. DId you use Memtest86 to get the results? As my adress results are only to 1 decimal place “eg: 5227.3MB

    Also once you get the HEX value in this case lets use FFFC from my spreadsheet. do you need to further convert? EG you have (0xB7) in your command, or is the (0xB7) already in HEX, as i noticed this is what u used
    bcdedit /set {badmemory} badmemorylist 0xB7

    Thankyou and sorry its been a long long time since ive been in school learning hex… i “used” to know it:D

  11. 0xFFFC should do the trick iirc. As for the decimals and region of ram.. chuck the whole string of them into the bad list to cover that entire decimal(?).

  12. Charlie says:

    Ah i see, thankyou
    So to clarify, if say i had a bad memory range from 3400mb -to 3500mb
    Do you think i would need to enter 3400, 3401, 3402……….3499, 3500
    Or do you think i would nee4d to enter 3400.0, 3400.1, 3400.2………3499.9, 3500.0 or maybe even smaller?
    What i mean is how often does it need an entry?
    Thankyou again for your help

  13. I expect one for every “microsoft page” so in the increments on the spreadsheet. I remember having trouble trying to run a command with so many attributes.
    (It has been a while since I’ve done this so sorry if I’m a bit rusty on the specifics).
    If you don’t already know – a good tool for testing RAM once you are in windows is Prime95.

  14. Charlie says:

    thankyou this will be tonights job ..ill try and make an excel that will work out all my values and a bat file to enter them into command
    i will post up wat i make Thankyou for your time..

  15. Charlie says:

    believe it or not.. i didint get a chance to do it.. but am back to it and writing the script now!.. i WILL get back to write how it went

  16. mirh1 says:

    Given memtest86+ didn’t seem to have any kind of logging on my BIOS-based computer (and who seriously would copy addresses one at a time by hand?) I decided to blacklist a whole memory range altogether.
    I took the lowest and highest figures I could spot on display (in my case 760,5MB and 760,6MB), “lengthened” their span by an additional 0,1MB for safety, then went through your calculations/conversions.

    Instead of calling it a day though, I converted the lowest page number nack into DEC, copied its value to a separate cell and put DEC2HEX into the one next to it.
    By dragging both of them down (and stopping when I reached the max interested value) I could get a pretty good list of every existing page in my affected range.

    You can in the end get right bcdedit command format by using Notepad++ to replace “\n\r” characters to ” 0x”.
    Should you have *too many* PFNs for BCD to stand, you could try

  17. Charlie says:

    In the end, the windows command wasnt sufficient enough for me as i had so many entries as i was blocking out over a 1gb of ram. The method posted by mirh1 worked like a charm however. And successfully working my laptop well again
    Thankyou to all that helped out

  18. airmark says:

    Memtest86 shows one address (one bit) in error so I thought of using the above method instead of replacing the RAM. It’s also quite high 7944mb (1f080d0a0 to be exact) out of 8gb of RAM which is underutilized so it’s possible that it wouldn’t be accessed anyway.

    However when I use the command it gives me the below error message:

    C:\WINDOWS\system32>bcdedit /set {badmemory} badmemorylist 1f080d
    The integer data is not valid as specified.
    Run “bcdedit /?” for command line assistance.
    The parameter is incorrect.

    Any ideas? Running Windows 10 Pro.

  19. Juan Fogelman says:

    you can’t write 1f080d…
    you need in hex “0x[numberpage]” …

  20. kokko says:

    Thanks for this solution, for author and coments. Was very helpfull. Better repair instead of buying new one.

  21. Mohammed Akram says:

    I have DDR3 8gb stick and my system is slow and some time it hangs, after memory check I found few bad sectors in RAM,
    Kindly give me procedure to block the bad sectors

  22. The page tells you the commands¡ Also… If you have removable RAM I recommend replacing the stick rather than continuing to use it. The instructions are really only sensible for machines with soldered in RAM that you cannot change.

  23. Stefan says:

    Hello, so I have followed you instructions, but, I think doesn’t work.
    The bad addresses are from 0x2950fc00 to 0x2950d100ffc, which are the right commands to block the computer to acces them?

  24. As noted in the main article…

    bcdedit /set badmemorylist 0xB7 0xB8 0xB9 0xBA 0xBB 0xBC 0xBD 0xBE 0xBF 0xC0 0xC1

    But going by your 0x2950fc00, it looks like you may not have the right locations or have calculated them wrong? They seem to be too long. How did you get the location addresses?

  25. Stefan Furtuna says:

    I got them from memtest86.
    So which could be, I will attach a screenshot.

    Here you have it sir. And thank you

  26. Yea, I’m not sure that the address ranges noted in Memtest are the same as the Microsoft “Page address”. When I had the problem I took the range in megabytes and used the excel formula (see the screenshot) to calculage the Microsoft page address.

  27. Stefan Furtuna says:

    Ok then, how do I find addresses like yours? 0xB7 etc.

  28. When I had the problem I took the range in megabytes and used the excel formula (see the screenshot) to calculate the Microsoft page address.

  29. Stefan Furtuna says:

    Last question maybe before reinstalling windows with GitHub app to block the badblocks.

    Will this help you?
    I have converted the hex from memtest86 to Dec for windows.

    Any guidance? I am on the right side? Haha

  30. No :D Use the excel formula shown in the screenshot on this page!

  31. juan gustavo Fogelman says:

    the keys are:
    0x10000000 in memtest = 0x10000 in windows
    0x00001000 in memtest = 0x1 in windows
    page windows cut the 3 hex from right
    page windows cut the 0 from the left
    002950fc in memtest = 0x295 in windows
    0029d100 in memtest = 0X29d in windows

    try this

Comment on this topic

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s