stop c000021a

stop c000021a

This was a situation where i had a small problem, and after some changes it got bigger and bigger.

The original problem i had was a non working hibernation system on a Windows7 computer.
The reason was simple. I did have a small boot partition and the system was a factory default fujitsu. I did not like the idea of the small boot partition because i also wanted to use a other BCD loader, so i first made a image of the bootpartiton, and then a remove the boot partition.

After i made a reboot i got this message on the screen

autochk program not found – skipping autocheck

After this i got a stop C000021a error, and i was expecting a easy fix with a Windows7 bootrepair cd.

The complete error i got was:

STOP: c000021a {Fatal System Error}
The Session Manager Initialization system process terminated unexpectedly with a status of 0xc000003a (0x00000000 0x00000000)
The system has been shutdown.

Bootrepair failed
sfc /scannow failed
boot with option “Last Known Good Configuration” failed
fixing the MBR and BCD failed

To make a long story short, i got it fixed without re installation by using the following steps

First boot with a bootrepair cd/usb
If you don’t have it, create one on another working computer
If you don’t know where you can find the option of creating a System Repair Disc, just use google to find out, its just a option on any Windows7 computer.

Then boot into WinRE and launch Command prompt
Then open regedit and take a look at HKLM\SYSTEM\MountedDevices
These keys are NOT the value of your own registry, but from the ramdrive environment

Next load the registry hives from your own system into a subkey
First just klik on HKEY_LOCAL_MACHINE and then click on File, Load hives
(in dutch its Bestand, Component laden)
Then browse to your local windows installation and load the file SYSTEM (normally its in c:\windows\system32\config)
Just name the loaded hive something simple like “temp” and go to the
Then hit on delete, so you completely remove the complete key and subkeys.
Then go back to the temp key and select File -> Unload Hive
Then make a reboot and if you’re lucky your problem is fixed.
If you’re not lucky then the keys are regenerated with the wrong values, but is easy to fix.

Just repeat the above steps and take a look at the values of both the HKLM\SYSTEM\MountedDevices
and the HKLM\temp\MountedDevices
You will notice that value of \DosDevices\C: will not match the discid, or that the driveletter is simply wrong
\DosDevices\F: for example instead of \DosDevices\C:
Take a look at the values on the ramdrive HKLM\SYSTEM\MountedDevices and you will understand the problem and know what to change.

I hope this info will be helpful for some other people.

p.s. After this fix my hibernation problem was also fixed 🙂