Return to site

Ramdisk Manager 1 1

broken image


[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.

Increase RAMdisk Is there a way to increase the RAMdisk from the WYSE Device Manager? I am using version 4.9 and trying to update it on WES on device C90LE7. I want to install software need to increase the RAMdisk first. Thanks in advance for any help on this. Mods are now installed independently in their own subfolder. This paves the way for future Magisk Manager versions to manage mods, just like how Xposed Modules are handled; Support small boot partition devices (Huawei devices) Use minimal sepolicy patch in boot image for smaller ramdisk size. Live patch policies after bootup.

Advertising
Manager

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.

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.

Advertising

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.

Ramdisk

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.

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.

Advertising

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

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. Totals 3 0 17.

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.

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

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:

Ramdisk Manager 1 14

bcdedit.exe /deletevalue {badmemory} badmemorylist c:bootbcd

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.

Ramdisk Manager 1 12

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




broken image