Windows Stop Code 0xC000021A on Windows 10: Complete Fix Guide
Fix Windows stop code 0xC000021A (0xc00021a) on Windows 10. Step-by-step solutions: Safe Mode, SFC, DISM, startup repair, and registry fixes.
- Root cause 1: Corrupted system files — Winlogon.exe or Csrss.exe has failed or been replaced by a third-party process, triggering a fatal Windows subsystem error.
- Root cause 2: Incompatible or corrupted drivers/software — A recently installed driver, antivirus, or Windows Update has broken critical user-mode system components.
- Root cause 3: Registry corruption or mismatched SAM/SYSTEM hives — Often occurs after an interrupted update or failed clone/migration.
- Quick fix summary: Boot into Safe Mode, run SFC /scannow and DISM to restore system files, uninstall recent updates or drivers via Recovery Environment, and use Startup Repair as a last resort before considering a Reset or clean install.
| Method | When to Use | Time | Risk |
|---|---|---|---|
| Safe Mode + SFC / DISM | Corrupted system files; PC still partially boots | 15–30 min | Low |
| Startup Repair (WinRE) | Cannot reach desktop or Safe Mode at all | 10–20 min | Low |
| Uninstall Recent Update/Driver | BSOD started after a Windows Update or driver install | 10–20 min | Low |
| System Restore | Restore point exists from before the issue began | 20–40 min | Low–Medium |
| Registry Hive Repair (manual) | Registry corruption confirmed in dump/event logs | 30–60 min | High |
| Reset This PC (Keep Files) | All other methods failed; data preservation is possible | 45–90 min | Medium |
| Clean Install | Severe corruption, no backups, nothing else works | 60–120 min | High (data loss) |
Understanding the Error
The Windows stop code 0xC000021A (also written as 0xc00021a) is a fatal Blue Screen of Death (BSOD) that Windows 10 displays when a critical user-mode subsystem — specifically Winlogon.exe or Client Server Runtime Subsystem (Csrss.exe) — exits unexpectedly or returns an error. Because these processes are integral to the Windows session manager (Smss.exe), any failure causes an unrecoverable system state, and Windows halts completely to prevent data corruption.
The full error message displayed on screen typically reads:
Your PC ran into a problem and needs to restart.
Stop code: 0xC000021A
Older systems may show the legacy format:
STOP: c000021a {Fatal System Error}
The Windows Logon Process system process terminated unexpectedly with a status of 0xc0000034.
The system has been shut down.
The hex status code embedded in the message (e.g., 0xc0000034, 0xc0000005) provides additional context about why Winlogon or Csrss failed.
Step 1: Attempt to Boot into Safe Mode
Before running any repairs, you need to reach a command prompt or the Windows Recovery Environment (WinRE).
Method A — Interrupt boot three times:
- Power on your PC. As soon as the Windows logo appears, hold the power button for 5 seconds to force a shutdown.
- Repeat this two more times (three total hard resets).
- On the fourth boot, Windows will automatically launch Automatic Repair mode.
- Click Advanced options → Troubleshoot → Advanced options → Startup Settings → Restart.
- Press F4 for Safe Mode or F6 for Safe Mode with Command Prompt.
Method B — Boot from Windows 10 Installation Media:
- Create a bootable USB using the Media Creation Tool.
- Boot from USB, select your language, then click Repair your computer (bottom-left).
- Navigate to Troubleshoot → Advanced options → Command Prompt.
Step 2: Run SFC and DISM to Repair System Files
Once you have a command prompt (Safe Mode or WinRE), run the following commands in order:
Step 2a — System File Checker (SFC):
sfc /scannow
This scans all protected system files and replaces corrupted ones from the local cache. If Windows cannot be booted normally, run the offline variant:
sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows
(Replace C: with the actual Windows drive letter if different — use diskpart → list volume to confirm.)
Step 2b — DISM to repair the component store:
Dism /Online /Cleanup-Image /CheckHealth
Dism /Online /Cleanup-Image /ScanHealth
Dism /Online /Cleanup-Image /RestoreHealth
If offline:
Dism /Image:C:\Windows /Cleanup-Image /RestoreHealth /Source:esd:D:\sources\install.esd
After both tools finish, restart and check if the error is resolved.
Step 3: Uninstall a Problematic Update or Driver
If the BSOD began after a Windows Update or driver installation:
Via Safe Mode:
- Open Settings → Update & Security → Windows Update → View update history → Uninstall updates.
- Sort by date and uninstall the most recent Cumulative Update or driver package.
Via Command Prompt (WinRE):
wmic qfe list brief /format:table
wusa /uninstall /kb:XXXXXXX /quiet /norestart
Replace XXXXXXX with the KB number of the problematic update.
For drivers, boot into Safe Mode and use Device Manager (devmgmt.msc) to roll back or uninstall the suspect driver, especially display, storage controller (AHCI/NVMe), or antivirus drivers.
Step 4: Perform a System Restore
If restore points exist:
- In WinRE: Troubleshoot → Advanced options → System Restore.
- Select a restore point dated before the BSOD first appeared.
- Confirm and let the process complete.
Alternatively from Safe Mode:
rstrui.exe
Step 5: Repair Registry Hives (Advanced)
If event logs (check C:\Windows\System32\winevt\Logs\System.evtx) show registry errors, you may need to restore hive backups:
cd C:\Windows\System32\config
copy SAM SAM.bak
copy SYSTEM SYSTEM.bak
copy SOFTWARE SOFTWARE.bak
cd C:\Windows\System32\config\RegBack
copy SAM C:\Windows\System32\config\
copy SYSTEM C:\Windows\System32\config\
copy SOFTWARE C:\Windows\System32\config\
Note: On Windows 10 v1803+, RegBack hives may be empty (0 bytes) by default due to a Microsoft policy change. Only proceed if the files have nonzero sizes.
Step 6: Rebuild BCD and MBR (If Startup Fails)
A corrupted Boot Configuration Data store can also trigger this error:
bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd
If bootrec /fixboot returns "Access is denied", first run:
bcdboot C:\Windows /s C: /f ALL
Step 7: Reset or Clean Install (Last Resort)
If no steps above resolve the issue:
- Reset This PC (Keep Files): WinRE → Troubleshoot → Reset this PC → Keep my files.
- Clean Install: Boot from USB → Install Now → Custom → delete partitions and reinstall.
Always back up your data first using a live Linux USB (e.g., Ubuntu) to copy files from the drive before a clean install.
Frequently Asked Questions
# ============================================================
# Windows Stop Code 0xC000021A — Diagnostic & Fix Commands
# Run from WinRE Command Prompt or Safe Mode with Networking
# ============================================================
# --- 1. Identify Windows drive letter (run in diskpart) ---
# diskpart
# list volume
# exit
# --- 2. SFC Online Scan ---
sfc /scannow
# --- 3. SFC Offline Scan (replace C: with actual Windows drive) ---
sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows
# --- 4. DISM Health Check and Repair (Online) ---
Dism /Online /Cleanup-Image /CheckHealth
Dism /Online /Cleanup-Image /ScanHealth
Dism /Online /Cleanup-Image /RestoreHealth
# --- 5. DISM Offline Repair (D: = install media, C: = Windows drive) ---
Dism /Image:C:\Windows /Cleanup-Image /RestoreHealth /Source:esd:D:\sources\install.esd /LimitAccess
# --- 6. List installed Windows Updates (identify recent KB) ---
wmic qfe list brief /format:table
# --- 7. Silently uninstall a specific KB update ---
# Replace XXXXXXX with the KB number
wusa /uninstall /kb:XXXXXXX /quiet /norestart
# --- 8. Rebuild Boot Configuration Data (BCD) ---
bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd
# --- 9. Re-create BCD if rebuildbcd shows 0 installations ---
bcdboot C:\Windows /s C: /f ALL
# --- 10. Check RegBack hive file sizes (0 = empty, skip restore) ---
dir C:\Windows\System32\config\RegBack
# --- 11. Restore registry hives from RegBack (if non-zero size) ---
cd C:\Windows\System32\config
copy SAM SAM.bak
copy SYSTEM SYSTEM.bak
copy SOFTWARE SOFTWARE.bak
copy C:\Windows\System32\config\RegBack\SAM .
copy C:\Windows\System32\config\RegBack\SYSTEM .
copy C:\Windows\System32\config\RegBack\SOFTWARE .
# --- 12. Launch System Restore GUI (from Safe Mode) ---
rstrui.exe
# --- 13. Launch Windows Memory Diagnostic (check for RAM errors) ---
mdsched.exe
# --- 14. Check CHKDSK for disk errors (replace C: as needed) ---
chkdsk C: /f /r /x
# --- 15. Export System event log for analysis (offline) ---
wevtutil epl System C:\Logs\system_export.evtx
# ============================================================
# After each major step, restart and check if BSOD recurs.
# ============================================================Error Medic Editorial
The Error Medic Editorial team is composed of senior DevOps engineers, SREs, and Windows systems specialists with over a decade of experience diagnosing OS-level failures, BSOD errors, and enterprise infrastructure incidents. Our guides are built from real-world incident postmortems, Microsoft documentation, and community-validated fixes. We focus on actionable, command-level troubleshooting that works in production and home lab environments alike.
Sources
- https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-check-0xc000021a--status-system-process-terminated
- https://support.microsoft.com/en-us/windows/windows-10-recovery-options-31ce2444-7de3-818c-d626-e3b5a3024da5
- https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-recovery-environment--windows-re--technical-reference
- https://answers.microsoft.com/en-us/windows/forum/all/blue-screen-stop-code-c000021a/b9a94f47-f7b5-4b53-b823-0b17985d1b48
- https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/sfc
- https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/dism-image-management-command-line-options-s14