Solved STOP C000021a Fatal System Error on Session Manager Initialization system process terminated unexpectedly with status 0xC000003a on Windows 7 Professional SP1 OS in a Dell Optiplex 9010 pc (Rev: 1.2)


There are 3 partitions in the Dell Optiplex 9010 pc [Intel Core i7-3770 (3.40 Ghz) CPU, 32 GB DDR3 1600 Mhz memory, 1 TB SATA hardisk drive, etc]:
  1. OEM Partition (Dell Utility FAT16 partition) (about 39 MB)
  2. Dell Recovery Partition (about 10.3 GB, System, Active, Primary partition)
  3. Windows 7 Professional SP1 x64 Operating System (OS) Partition (about 921 GB, Boot, Page file, Crash dump, Primary partition)

After booted up from the Acronis Disk Director 11 boot CDROM, I deleted the Dell Recovery Partition and resized the Windows 7 Professional SP1 x64 OS partition to take over the 10.3 GB space from the previous Dell Recovery Partition. After that, I reduced the Windows 7 Professional SP1 x64 OS partition to about 200 GB so that I can later format all the available free space to have a d:\ drive with about 800 GB partition size. Finally, I set the Windows 7 Professional SP1 x64 OS partition as an active partition to prevent the "Operating system not found" error.

I reboot the Dell Optiplex 9010 pc from a Windows 7 System Repair Disc (created from Windows 7 Control Panel -> Backup and Restore -> “Create a system repair disc”) in order to avoid the "BOOTMGR is missing. Press Ctrl+Alt+Del to restart" error.

At the "System Recovery Options" stage, a prompt automatically appeared with the below message:

Windows found problems with your computer's startup options. Do you want to apply repairs and restart your computer ?

I clicked the "Repair and restart" button and the Dell Optiplex 9010 pc rebooted. However, the "BOOTMGR is missing. Press Ctrl+Alt+Del to restart" error appeared. I booted the Dell Optiplex 9010 pc from the Windows 7 x64 System Repair Disc again. At the "System Recovery Options" stage, I clicked to select the "Windows 7 Professional (recovered)" and click the "Next" button. At the next "System Recovery Options" stage, when the automatically "Startup Repair" stage had completed, another message appeared:

Restart your computer to complete the repairs.

I clicked the "Finished" button and the Dell Optiplex 9010 pc rebooted. After showing the Windows Logo, the monitor screen shown an "autochk program not found - skipping AUTOCHECK" and later the below Blue Screen of Death (BSoD) error:

STOP: C000021a {Fatal System Error}
The Session Manager Initialization System process terminated unexpectedly with a
status of 0xC000003a (0x00000000 0x00000000).
The system has been shut down.


For detail of STOP C000021a error, please refer to "Bug Check 0xC000021A: STATUS_SYSTEM_PROCESS_TERMINATED (Windows Debuggers)".


I reboot the pc and press [F8] repeatly to get the Windows Boot List. I have tried "Last known good configuration" and "Safe Mode" respectively but both boot options still gave the same boot up errors:

"autochk program not found - skipping AUTOCHECK"

STOP: C000021a {Fatal System Error}
The Session Manager Initialization System process terminated unexpectedly with a
status of 0xC000003a (0x00000000 0x00000000).
The system has been shut down.


The same boot up errors also appeared even if you change the SATA operation mode in BIOS to "AHCI"  or "RAID On (Intel Rapid Restore Technology)" mode. If you changed the SATA operation mode in BIOS to "ATA" mode, it will show a "STOP: 0x0000007B" BSoD error.


I booted the Dell Optiplex 9010 pc from the Windows 7 x64 System Repair Disc again. At the Windows 7 x64 Recovery Console, the below bootrec command are issued:

# bootrec  /fixmbr
The operation completed successfully


# bootrec  /fixboot
The operation completed successfully


# bootrec  /rebuildbcd
Scanning all disks for Windows installations.
Please wait, since this may take a while...

Successfully scanned Windows installations.
Total identified Windows installations: 0
The operation completed successfully


# chkdsk d: /f
(OEM Partition is c:\ drive and Windows 7 Professional OS partition is d:\ drive)
Chkdsk discovered free space marked as allocated in the Master File Table (MFT) bitmap.
Chkdsk discovered free space marked as allocated in the volume bitmap.
Windows has made corrections to the file system.


# bootrec  /scanos
Scanning all disks for Windows installations.
Please wait, since this may take a while...

Successfully scanned Windows installations.
Total identified Windows installations: 0
The operation completed successfully


Solution

Persistent drive letters (eg: drive letter, c:\ drive for the Windows 7 Professional OS) allocations are contained in the HKEY_LOCAL_MACHINE\System\MountedDevices registry key. We need to mount the original Windows 7 SYSTEM hive from the c:\Windows\System32\config directory and delete the MountedDevices registry key from the HKEY_LOCAL_MACHINE\System\.

During the Windows boot process, if the MountedDevices registry key is missing, Windows will auto recreate the HKEY_LOCAL_MACHINE\System\MountedDevices registry key and new drive letters will be assigned.

I booted the Dell Optiplex 9010 pc from the Windows 7 x64 System Repair Disc again. At the Windows 7 x64 Recovery Console,
  1. # regedt32
    (To open the Registry Editor)

  2. In the Registry Editor, kindly click to select the HKEY_LOCAL_MACHINE. Then, please click File -> Load Hive.

    Note:
    When we boot into the Windows 7 x64 Recovery Console, we are actually booted into a RAMDRIVE (x:\ drive). When we open the Registry Editor, we are looking at the hives from the RAMDRIVE (x:\ drive) and not from the installed Windows 7 Professional OS (d:\ drive).

  3. d:\ drive is the Windows 7 Professional OS drive in the Windows 7 x64 Recovery Console. Kindly browse to d:\Windows\System32\config directory and select the SYSTEM file. Click the "Open" button and name it as "temp".

  4. Kindly navigate to the HKEY_LOCAL_MACHINE\temp and click the MountedDevices to select it. Hit the "Delete" key on the keyboard to delete the
    HKEY_LOCAL_MACHINE\temp\
    MountedDevices registry key. You will be prompt:

    Confirm Key Delete
    Are you sure you want to permanently delete this key and all of its subkeys ?

    Click the "Yes" button to delete the MountedDevices registry key and all of its subkeys from HKEY_LOCAL_MACHINE\temp.

  5. Kindly click the temp key to select it. Then, please click File -> Unload Hive. Kindly click "Yes" when prompt to confirm Unload Hive. Finally, please close the Registry Editor and exit from the Windows 7 x64 Recovery Console in order to reboot the Dell Optiplex 9010 pc.

The Dell Optiplex 9010 pc will boot normally to the login screen and the BSoD error of STOP: C000021a {Fatal System Error} did not appear.


References

[1] Editing the MountedDevices Registry Key

[2] "Bug Check 0xC000021A: STATUS_SYSTEM_PROCESS_TERMINATED (Windows Debuggers)"

[3] Operating system comes up with Blue Screen Error: Stop c000021a

25 comments:

Anonymous said...

I have the Same
Problem, and i did all steps of your Description, but if i Want
To delete all mounted devices, the Message: Not all can delete ... So i cant delete it .. It was only One ..
My Windows Partition is on C Not d in ...

Pls help me Dude

JackNg said...

Hi,

Did you booted to the Recovery Console using the Windows 7 x86/x64 System Repair Disc ?

Anonymous said...

Hi, after an update, my system crashed returnig this error.
I did all of your steps, and it worked.
I could logon again, but when I restarted the machine, the error returned.
I have nomore ideas...
Can you help me?
Tks a lot!

Anonymous said...

Hi, I just found what was messing up my system.
It was the kb2823324 update, after your steps, I removed it and now it´s fine. Tks.

Anonymous said...

WORKS!! Saved my life. Thank you very much!

Anonymous said...

HP Pavilion PC with Win 7, had same msg and behavior, did all on this post and now system is backto normal, works great! Thanks so much!

Anonymous said...

Thank you so much, it realy helped me!

Jorge Rossiter said...

Worked great!

Thank you very much!

Anonymous said...

It solved my problem and saves my day.
Thanks, you are incredible!

Anonymous said...

Thank you very much for the solution! It works.

Steve Conrad said...

Thank You!!!!!!

You solved a major headache for me!!!

Many of us owe you big time!!!

Your solution got me back up and running!!!! :)

Eduardo Rudas said...

Saved my life!!!
Just changed the partition schema with Gparted live CD and get this error. I was about to lost any hope to bring that Windows 7 installtion to live (restore Factory OS image), but i gave another shot, searched again in google and found your post.
Everything back to normal.
It was in a Samsung NP300E (NP300E4A-A02CO)

Daniel said...

I'm running Windows Server 2008 R2 and I had the same problem after using a disk imaging tool to migrate the server to an SSD.

In addition to clearing the MountedDevices key, it was necessary to enable "AutoMount" to make sure that the system drive was correctly re-mounted on the next reboot. (without it, the BSOD continued).

I guess Windows Server has automount disabled by default, whereas Windows 7 leaves it on.

The fix involves changing the NoAutoMount value in the HKEY_LOCAL_MACHINE\temp\CurrentControlSetXXX\Services\mountmgr to zero. (where temp is the name chosen to load the offline hive, and XXX is 001, or 002, or whichever control set is current as per the value in HKEY_LOCAL_MACHINE\temp\Select).

Full detail on this extra step is at http://blogs.technet.com/b/askcore/archive/2011/08/09/operating-system-comes-up-with-blue-screen-error-stop-c000021a.aspx

Hope that helps someone else ... took me a few hours to get from this post to that one!

JackNg said...

Dear Daniel,

Thanks for sharing !!!

In a working pc with Windows 7 Professional SP1 OS or working server with Windows Server Enterprise 2008 SP2 OS, I did not find the "NoAutoMount" dword value under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\mountmgr,
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\mountmgr or HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\services\mountmgr
.

Seems like the "NoAutoMount" dword value will appear in a STOP C000021a BSOD problem pc or server, and does not appear on a normal working pc or server.

Anyway, glad to know that your server STOP C000021a BSOD problem was solved.

Anonymous said...

Thanks a lot,

The German Wolf

Andy Raybould said...

Originally did all of the above without the last stage - no joy.
Setting NoAutoMount to 0 worked - thank you so much!

Anonymous said...

Eres el mejor, pude reparar el computador, estoy muy agradecido.

JJGM of Venezuela

Anonymous said...

Had the same problem after ghosting Windows 7 64-bit image to another machine using Symantec Ghost 15. I was unable to mount hive using Windows repair CD, but it did work when i used Symantec Ghost console.

Anonymous said...

I had Win7 installed/booting from a VHD. After losing a drive, I couldn't get the VHD booted up, always got this error. I had tried deleting MountedDevices with no success, spent hours on the problem.

Finally saw the post about turning off "NoAutoMount" and that fixed the problem!

Thank you Daniel!!!! Wish I had found this thread sooner!

Anonymous said...

It solved my problem and saves my day.
Thanks, you are incredible!

Anonymous said...

OMG you saved my life worked exactly like you said it would

Anonymous said...

Thanks a lot... Saved my work. :)

Anonymous said...

Thanks
Settings NoAutoMount fixed the problem

netw0rker said...

Thank you very much - it worked for me on a Server 2008 R2. You are my hero :D

Anonymous said...

Not worked. Please another way

Please donate. Thanks.


paypal.me/jackngch
(PayPal-to-Paypal account only)

Popular Posts