Windows 10: Update error 0xc0000017 (no ramdisk memory)

[German]Some users of Windows 10 (and also Windows 8.1) are facing a strange error. After installing an update, Windows won’t boot anymore and reports error 0xc0000017. I took the time to write a blog post, explaining a bit the background of this issue.


Advertising


The error 0xc0000017

This error occurs if Windows 10 (or Windows 8.1) is rebooting after installing an update. A blue screen appears with the following message:

There isn’t enough memory available to create a ramdis device.
Error code: 0xc0000017

I was trapped a while ago with this error within a virtual machine, when I installed an Insider Preview and ended with the screen shown below.

Recovery-Fehler 0xc0000017

My attempt to find out more about the error text with the help of an error-lockup tool didn’t really go any further. Error code 0xc0000017 stands for STATUS_NO_MEMORY – There are not enough virtual memory or swap file quotas for the specified operation.

An attempt to explain the background

Instead of typing a few commands, I would like to take the time and dig into some of the background of this error. This may help some users to understand what has happened.

Windows PE, Update installs and ramdisks

Update installations require a restart to replace files that are blocked during a running Windows. For this purpose, a so-called Windows PE (PE stands for Preinstall Environment) boots. Then the required file operations are carried out within Windows PE. Once this transaction is completed, the machine reboots and the actual Windows is restarted.

However, Windows PE is loaded into a ramdisk and depends on the fact that a certain number of (RAM) memory pages can be used in a contiguous way. The error 0xc0000017 probably occurs when trying to create a RAM disk for the Windows PE environment during the boot process. The problem here is that there should be enough RAM available. But something seems to fail. I found a ‘ shredded’ explanation here (German). There are no longer enough contiguous memory blocks to set up the RAM disk of the appropriate size. But why is that, anyway? For your understanding, I’ll dig a bit deeper.

Predictive Failure Analysis (PFA) in Windows

In Windows, there is a mechanism that analyzes ECC errors in memory and protects the operating system from using erroneous memory blocks in RAM. Microsoft has implemented a Predictive Failure Analysis (PFA) support in the Windows Hardware Error Architecture (WHEA) to detect ECC (Error Correction Code) memory errors.

WHEA monitors the ECC values of memory pages on which ECC errors have already been detected. If the number of ECC memory errors exceeds a threshold value during a configurable time interval, WHEA attempts to take the relevant memory page offline. For this purpose, the relevant memory page will be stored within the BCD database (BCD-Store, Boot Configuration Data Store) as bad. Microsoft has published a document Predictive Failure Analysis (PFA) discussing some details.

At this point it isn’t clear, whether the ECC value is for RAM or virtual disc pages. I assumed ECC values for RAM.

The BCD issue with bad memory

Most systems doesn’t come with ECC RAM, so I don’t know exactly, why we have bad memory blocks in BCD store. My guess is, that faulty write operations are causing erroneous bad memory entries within BCD store. Nevertheless, the following statement from Microsoft brings light into the error 0xc0000017 issue:

Windows does not provide an automated mechanism for clearing this list from the BCD system store. When the failing system memory is replaced, a system administrator must clear this list manually by using the BCDEdit command-line tool. If the list is not cleared, Windows will continue to exclude the memory pages in the list from being used by the system, even if the failing memory modules have been replaced.

This is cited from the following Microsoft document. So, if the bad memory is set in BCD store, it can cause a boot failure in ramdisk. So we need a solution to clean all bad memory entries in BCD store.

Check and clean bad memory entries in BCD store

Microsoft has published this document, explaining how to manage the badmemory entry in BCD store. Open an administrative command prompt window (using Run as administrator) and use the following bcdedit command:

bcdedit /enum {badmemory}

to enlist all etnries. On my system I havn’t bad memory entries at all (it’s a 10 year old system).

RAM-Defekte auslesen

Many web posts recommends to use the command bcdedit /enum all to enlist the entries. But this results of a long list of miscellaneous entries, and you need to search for the relevant section delivering the bad memory list.

If bcdedit shows bad memory blocks in BCD store preventing the creation of a ramdisk, we need to clean these entries. This may be done using the following command.

bcdedit /deletevalue {badmemory} badmemorylist

Note, that badmemorylist isn’t a placeholder, enter the command as listed above. But note, the command will result in an error message, if no badmemory entries are found.

I was able to manage it and add a couple of ‘faulty’ memory entries into BCD store, using the following command:

bcdedit /set  {badmemory} badmemorylist 0xB7 0xB8

Then I tried the following command sequence and was at least successful with all commands.

Note: The command bcdedit /set  {badmemory} badmemorylist enables to block memory pages (see and here). The blocks have a size of 4 K, so you could try to ‘repair’ a system with a defective memory by blocking the memory pages. This can help if you cannot install Windows. Depending on the machine’s BIOS, it may also be necessary to disable the ‘Memory Hole Remapping’ option (see). But this isn’t the topic of my article.

After resetting the bad memory entries in BCD store, the machine should be able to enter Windows PE in ramdisk, install the update and reboot the updated operating system.

Note: How can it be possible, that BCD store contains bad memory entries, even, if a machine doesn’t have ECC RAM? Weighting my experience I made with an Insider Preview, I guess, it’s faulty updates, that writes wrong values into BCD store. I’ve mentioned above a virtual machine that failed with this error. The VM has a Windows 10 Insider Preview installed and I attempt to update to a new Insider Preview build. But the install ends with the blue screen shown above. Because my host machine, it’s the machine I used for my tests with bcdedit, didn’t show bad memory entries in BCD store, it’s not possible, that the guest has ECC errors in its memory. The only explanation I found, was: It’s faulty software, that has caused the entries.

How to fix a broken Windows?

The first case is, that startup repair is able to repair the broken system and Windows starts again. These cases has been reported many times. The user ends with endless update install attempts, ending with error 0xc0000017. In this case, open an administrative command prompt window and enter the following command:

bcdedit /deletevalue {badmemory} badmemorylist

This should clean the faulty entries in BCD store and the machine might boot again. And the update install should be possible finished successfully. If Windows doesn’t boot anymore, and hung with the following blue screen, you need a recovery tool to repair the system.

Recovery-Fehler 0xc0000017

You can try the key F8 to invoke the Startup setting. Then you can try to enter command prompt window in Windows PE. But I guess, you will fail in most cases, because Windows PE can’t be loaded into ramdisk. Then you need to try an offline repair of your BCD store.

  1. Boot the Windows system with a USB stick or DVD containing an emergency Windows or installation image to access Windows PE using the computer repair options.

2. Then execute the bcdedit repair commands in offline mode at the command prompt.

The bcdedit syntax to access an offline BCD store are (see):

bcdedit /enum all /store <full path and file name of store>

But where is the BCD store located? Windows expects the hidden system file on the active partition in the Boot folder. If you know the logical drive name of this partition within your Windows PE, you can use the command as follows:

bcdedit.exe /deletevalue {badmemory} badmemorylist c:\boot\bcd

Here would be the logical drive c: the boot medium. Note that Windows PE usually runs on the logical drive X:. The logical drive c: does not necessarily have to be the partition with the broken Windows BCD store. You can type the command notepad.exe in the command prompt.

In the Windows Editor window, select File / Open and change the File type field in the dialog box to All Files. Then you can use the Open window as a mini-file manager, which allows you to inspect the drives.

The approach outlined here in the blog post can be used from Windows 7 up to Windows 10, and also under Windows Server. Maybe it helps, if you are affected by this error.

Similar articles:
Windows 10 Wiki
Check and repair Windows system files and component store
Windows 10 V1703: SuperFetch service fails
Windows: UAC opens hidden in background
Windows 10 Version 1607: System restore error 0x80070091 [Fix]
Windows 10: Defender Offline Scan boot loop – Part 2
How to fix Windows-Setup Hard Disk locked error


Advertising



This entry was posted in issue, Update, Windows and tagged , , . Bookmark the permalink.

6 Responses to Windows 10: Update error 0xc0000017 (no ramdisk memory)

  1. Glen Hickey says:

    Hi,
    You left a reply over on the Microsoft web site regarding this error in reply to me. But you really haven’t answered the issue. With the Windows 10 upgrade to Creators, we now have Windows PowerShell. BUT the good command that we relied on is bcdedit /deletevalue {badmemory} badmemorylist
    This no longer works!!!!
    Have you found a workaround yet?
    Cheers – great blog

    • guenni says:

      Hm, concerning your ‘the bcdedit /deletevalue {badmemory} badmemorylist This no longer works’ – I’ve tested it on Windows 10 Fall Creators Update (the final) at October 6, 2017. How did you define ‘no longer works’?

      If there are no bad memory entries, the command returns an error – as I mentioned within my blog post. Will try it again on another machine – but if it depends on PS, the command prompt window is still available.

      Addendum: Just did a double check on a Windows 10 Fall Creators Update machine. Entering

      bcdedit /deletevalue {badmemory} badmemorylist

      ends with ‘Command successful executed’ (raw translation from my German Windows).

  2. Jan says:

    bcdedit /deletevalue {badmemory} badmemorylist returns successfull, but when you return to windows (restart, return to windows from troubleshoot) windows immediately creates the entry badmemorylist (in my case everytime the same address 0x10007) and the error repeats

    • guenni says:

      Thanks for this insight. Is it on one machine – and which W10 build? I’ve never observed this behavior. If it’s one machine, maybe the RAM is broken (ECC error).

  3. Graham says:

    I was getting this ram disc error when trying to upgrade Windows 10 but the command
    bcdedit /set {badmemory} badmemorylist
    did not work because no memory areas were showing as bad. My issue was different to this.
    To give a bit of background, my laptop is an Asus E402M, which has 2GB RAM and 32GB eMMC built in. It also has a hard disc bay so when I got it I put in a 128GB SSD and cloned Windows to this and then wiped the eMMC.

    But the one error I made (with hindsight) was to leave the EFI partition on the built in eMMC storage so my laptop had 2 EFI partitions.

    This is what caused the update to fail, so after I removed the EFI partition on the built in 32GB eMMC (using Gparted https://gparted.org/), the update worked.

  4. Graham Hill says:

    Thanks! Fixed my issue with Windows 10 Fall Creators Update 1703.

Leave a Reply

Your email address will not be published. Required fields are marked *