Wednesday, December 12, 2012

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

No comments:

Post a Comment