Installation error 0xc000021a stops Windows from starting, often right after a failed update or driver install. The fix is to boot into advanced recovery and run system repair commands, or restore from a backup. Below are the exact steps and the reasons behind this error.
What Is Error 0xc000021a?
Error 0xc000021a is a Windows stop code that appears during startup, usually as a blue screen with the message “Your PC ran into a problem and needs to restart.” The underlying cause is that a critical system process—typically winlogon.exe or csrss.exe—failed to start or crashed. These processes handle user logon and the graphical subsystem, so when they fail, Windows cannot continue booting.
This error is not a hardware failure; it is almost always software-related. Common triggers include:
- A Windows update that was interrupted or corrupted
- Installing an incompatible driver (especially graphics or storage drivers)
- Antivirus software interfering with system files
- Disk corruption or a failing hard drive
- Third-party software that modifies system files (e.g., “tweakers”)
Because the error appears before you can log in, you cannot fix it from the normal desktop. You must use the Windows Recovery Environment (WinRE) or installation media.
How the Error Occurs
When Windows boots, the kernel loads and then starts session manager (smss.exe), which launches csrss.exe (Client/Server Runtime Subsystem) and winlogon.exe. These processes handle input, output, and the login screen. If either process crashes or fails to authenticate, Windows triggers a bug check with code 0xc000021a.
The error can also occur if a system file that these processes depend on becomes corrupted. For example, if win32k.sys (a core graphics kernel driver) is replaced by an incompatible version, csrss.exe might crash on the next boot. Windows then displays the blue screen, and the system may try to restart automatically.
In some cases, the error appears during a Windows installation (upgrade or clean install) when the installer cannot copy or verify critical files. This is less common but can happen with a corrupted ISO or a failing USB drive.
Before You Start: Prepare Your System
You will need a way to access the Windows Recovery Environment. If your PC can boot to the recovery menu (usually by pressing F11 or Shift + Restart), you can use that. Otherwise, you need a Windows installation USB or DVD.
- Create a Windows installation media on another PC using Microsoft’s Media Creation Tool (for Windows 10/11).
- Insert the USB drive into the affected PC and boot from it (press F12 or Del to choose boot device).
- When the Windows Setup screen appears, click Next, then Repair your computer (bottom-left corner).
If you have a recent system restore point or a full backup, have it ready. The steps below may require a system restore, which can roll back recent changes.
Fix 1: Run Startup Repair
Startup Repair is the simplest first attempt. It scans for common issues like corrupted boot files or registry problems and tries to fix them automatically.
- Boot to the recovery environment (as described above).
- Go to Troubleshoot > Advanced options > Startup Repair.
- Select your operating system (if prompted) and wait for the repair to finish.
- If it reports that it couldn’t fix the problem, proceed to the next method.
Startup Repair often works if the issue is a corrupted boot sector or missing system files. If it fails, you will need to use command-line tools.
Fix 2: Use System Restore
System Restore rolls back your system files and settings to an earlier point, without affecting your personal files. This can undo the change that caused the error.
- In the recovery menu, go to Troubleshoot > Advanced options > System Restore.
- Choose an account and enter your password (if you have one).
- Select a restore point that was created before the problem started.
- Follow the prompts and wait for the restore to complete.
If you don’t have a restore point, this method won’t work. In that case, try the command-line fixes below.
Fix 3: Run SFC and DISM Commands
These commands check and repair system file corruption. They require the recovery environment’s command prompt.
- In the recovery menu, go to Troubleshoot > Advanced options > Command Prompt.
- Type the following commands one by one, pressing Enter after each:
sfc /scannow– scans and repairs protected system files.dism /online /cleanup-image /restorehealth– repairs the Windows image (requires internet access).
If DISM fails because the online image is not accessible, you can point it to a local source (e.g., the installation media). For example:
dism /online /cleanup-image /restorehealth /source:wim:X:\sources\install.wim:1 /limitaccess (replace X with the drive letter of your USB).
After running these, type exit and restart. If the error persists, you may need to rebuild the Boot Configuration Data (BCD).
Fix 4: Rebuild BCD and Boot Files
Corrupted boot configuration data can also cause 0xc000021a. Rebuilding it is safe and often effective.
- Open Command Prompt from the recovery menu.
- Type
bootrec /rebuildbcdand press Enter. - When prompted to add the installation to the boot list, type
Yand press Enter. - Then run
bootrec /fixmbrandbootrec /fixboot. - Type
exitand restart.
If bootrec /fixboot gives an “Access is denied” error, you can try bootsect /nt60 SYS from the same prompt.
Fix 5: Perform a Repair Install (In-Place Upgrade)
If none of the above works, a repair install (also called an in-place upgrade) reinstalls Windows while keeping your files and installed programs. This is more invasive but usually fixes deep corruption.
- Boot from the Windows installation media.
- Click Install now.
- Choose “Keep personal files and apps” when asked.
- Follow the prompts. The process can take 30-60 minutes and will restart several times.
This method requires that your current Windows installation is still recognized. If the error prevents setup from running, you may need to do a clean install, which will erase your files. Always back up your data if possible before attempting this.
Frequently Asked Questions
Can I fix 0xc000021a without losing my files?
Yes, most fixes (Startup Repair, System Restore, SFC/DISM, BCD rebuild) do not touch your personal files. Only a clean install (or a factory reset) will erase them. If you cannot boot at all, you can use a Linux live USB to copy your files to an external drive before attempting a clean install.
Why does this error appear after a Windows update?
Windows updates can replace system files that are incompatible with your drivers or other software. If the update is interrupted (e.g., power loss), the new files may be incomplete. The error 0xc000021a often appears because a critical process (like winlogon) cannot start with the corrupted files.
Is error 0xc000021a a sign of a failing hard drive?
Not usually. The error is typically software-related, but a failing drive can cause file corruption that leads to this error. If you suspect a hardware issue, run a disk check (chkdsk) from the recovery command prompt, or test the drive with its manufacturer’s diagnostic tool.
Will a system restore delete my installed programs?
System Restore does not delete your personal files, but it may remove programs that were installed after the restore point. It can also undo driver updates. If you have a restore point from before the error, this is a good first step.
Can I prevent this error in the future?
Yes, several habits reduce the risk: always let Windows updates complete without interrupting them, create a restore point before installing drivers or major software, and avoid using third-party system tweakers. Also, keep your drivers updated from official sources.
When to Seek Professional Help
If you have tried all the above and the error persists, the problem may be hardware-related (e.g., RAM or disk failure). At this point, it is wise to consult a qualified technician. They can run hardware diagnostics and recover your data if needed. Do not attempt to replace hardware unless you are confident in your skills.
Remember: the key to fixing 0xc000021a is to repair the Windows system files or roll back the recent change. Start with the least invasive method (Startup Repair) and work your way up. With patience, most users can resolve this error without losing their data.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- MacBook Trackpad Protection: A Complete Guide
- PlayStation Overheating: Causes & Fixes
- How to Remove or Insert a SIM Card in Your iPhone
- How to Send a Fax from Android or iOS
- Outlook Stuck on Loading Profile? Fix It
- Error 0x803f7001 Windows: Fixes & Meaning