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
                        0xb8
                        0xb9
                        0xba
                        0xbb
                        0xbc
                        0xbd
                        0xbe
                        0xbf
                        0xc0
                        0xc1

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?).

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

15 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.
    thanks

  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
    then
    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

Comment on this topic

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s