How to Fix Error 0xc000021a Boot Loop in Windows 10 & 11

How to Fix Error 0xc000021a Boot Loop Windows 10 and windows 11

Hello Everyone;

On this topic, you will learn how to fix error code: 0xc000021a boot loop with blue screen error message saying that: “Your PC ran into a problem and needs to restart” in windows 11, windows 10 and windows 8.1.

The previous error message followed by: “If you’d like to know more, you can search online later for this error: 0xc000021a



WHAT IS THE REASON FOR 0XC000021A BOOT LOOP?

  • According to Microsoft, the followings are the most common sources for 0xc000021a blue screen error:
    1. Computer shutdown while installing windows or security updates (the most common source)
    2. A corruption in system files.
    1. An Installation of incompatible third-party app or driver
    2. A backup or cloning program that’s used to restore a hard disk didn’t correctly restore files


LIST OF SUGGESTED SOLUTIONS:

The possible solutions will be different according to the error source, which include:

  1. Repairing corrupted system files bad disk sectors
  2. Trying automatic startup repair tool
  3. Removing the incompatible app or driver using safe mode
  4. Restoring system to a previous retore point
  5. Restoring or Repairing registry files

IMPORTANT NOTES:

  • You have to try all suggested solutions one by one unless you are aware that a specific solution will probably fix your issue.
  • All suggested solutions may fail to fix 0xc21a issue if the registry restoring files are missing or severely corrupted, specifically the corruption in System and/or Software hives or registry files.
  • The registry files may get corrupted due to an interrupted installation of windows update, for example, if you powered off your computer or disconnect it from the electric source while installing a Feature or Quality updates.


HOW TO OPEN ADVANCED RECOVERY MENU?

If the recovery environment was enabled in your computer, the system will try to repair startup files and then open Automatic Repair menu. From this menu, select Advanced Options to enter into Windows Recovery Environment (WinRE) or Advanced Recovery Menu.

If the recovery was disabled or corrupted, you have to create a bootable USB of windows using your mobile or in another computer in order to boot into Advanced Recovery Menu. Read this topic to learn how to create a bootable USB in your mobile or in another computer and how to boot from it.



FIRST SOLUTION: HOW TO REPAIR SYSTEM FILES:

  • From Automatic Repair menu, select Troubleshoot option and then Advanced options
  • Open Command Prompt
  • Execute the following three commands to rebuild disk sectors and BCD file:
    • BOOTREC /FIXMBR
    • BOOTREC /FIXBOOT
      • If you get access is denied error message, execute the following command and try again:
        • BOOTSECT /NT60 SYS /FORCE
    • BOOTREC /REBUILDBCD

How to repair System Files Using DISM & SFC and How to Repair Bad Disk Sectors?

  • Type BCDEDIT and press Enter to show the BCD data
  • Type this DISM command to restore system health locally:
    • DISM /IMAGE:D:\ /CLEANUP-IMAGE /RESTOREHEALTH
      • Replace the D with the letter of winnows partition in your computer
      • Read this topic to learn how to differentiate between Windows/Boot, Recovery and System/EFI partitions.
  • Now execute the following command to check and repair system files integrity:
    • SFC /SCANNOW
  • To check and repair bad disk sectors, execute the following command:
    • CHKDSK D: /F /R /X
      • Replace the D with the letter of winnows partition in your computer
  • Now, close command prompt and then click Continue button to restart into Windows 10 or Windows 11 operating system.

NOTE: If you are booting from a USB drive, you can download the automated batch script from this link to execute all mentioned commands by one click. In addition, this script will try to replace the corrupted or missed system files from the bootable USB if there is no a backup copy for the missed or corrupted files in your computer. Also it will fix all DISM and SFC errors automatically.


SECOND SOLUTION: TRYING AUTOMATIC STARTUP REPAIR TOOL:

Automatic Startup repair tool may start automatically after detecting boot failure, however, you can start it manually to identify the root cause of the 0xc000021a error as followings:

  • From Advanced recovery options, click on Start-up Repair option to start the tool
    • If the tool succeeded in fixing the issue, the computer will boot into login screen or into desktop automatically. if the tool, failed, it will generate a report file called SrtTrails.txt. This report will contain the succeeded and failed repair actions, in addition to the suggested root source for the problem.
  • To open the SrtTrails text file, navigate to the directory of log file according to what you will see on the start-up repair screen.
  • Open Command prompt
  • Type NOTEPAD and press Enter
  • From File tab, select Open option
  • Click on This PC icon and then navigate to the given directory, which is:
    • D:\windows\system32\logfiles\srt\srttrail.txt
      • Replace the D with the letter of winnows partition in your computer
  • In my case as you can see on the video below, the root cause was Boot Critical File Corrupt, with error code ox2.

THIRD SOLUTION: REMOVING THE INCOMPATIBLE APP OR DRIVER USING SAFE MODE:

If the problem appeared after installing a new app or updating existing app or driver, you can remove the problematic app or update by booting into Safe Mode as followings:

  • Select Start-up Settings option and then click on Restart.
  • Press F4 from keyboard to boot into Safe Mode
    • If there is a corruption in registry or recovery files, the computer will fail to boot into safe mode.

NOTE: In safe mode, you can either remove the problematic app, recent windows update, or recent driver installation or even disabling the problematic device according to what you think is the source of the error.

How remove the problematic driver or disabling the corrupted device?

  • Once you have booted into Safe Mode, you can remove the problematic driver as followings:
    • Right click on Start icon and select Device Manager option
    • Right click the problematic device and then select Uninstall Device option.
      • If you are not sure which drive is the source of the issue, skip this step.

How uninstall the problematic app or software you have installed?

  • If you are think the issue is related to recent app you have installed, you can remove it as followings:
    • Press Windows logo + R keys from keyboard
    • Type Control and press Enter
    • Change View by into Category option
    • Select uninstall a Program option
    • Click on Installed on column to sort apps according to installation date
    • Right click the problematic app and select Uninstall option.

How to uninstall the recent app you have installed?

  • If you are think the recent windows update is the source of the error, click on view installed updates option from left panel.
    • Locate the latest windows update or package according to its installation date and then uninstall it.
    • After that restart your system to see whether the issue fixed or not.

FOURTH SOLUTION: RESTORING SYSTEM TO A PREVIOUS RESTORE POINT:

  • If System Recovery was enabled and you have a valid Restore point, this solution will probably fix the issue unless the registry files are corrupted in your computer. To restore your system, do the followings:
    • Select System Restore option and then click Next.
    • If the System protection was disabled in your computer, you will see an error message saying that, No restore points have been created on your computer’s system.
    • Select the restore point from the list and then click on Next
    • Select Finish option and then click on Ok to start restoring process
    • If you are unable to proceed with restoring process or if the restoring process started but failed to fix the issue, then the issue is probably related to registry corruption, so you have to repair or restore your registry files as instructed on the next solution.

FIFTH SOLUTION: RESTORING OR REPAIRING REGISTRY FILES:

There are many sources that can corrupt the registry data, such as viral attack, manual modification, third party app, however, the most common source for registry corruption is when the computer powered off while installing windows updates.

  • If you have an older windows 10 or new windows 10 or windows 11 with enabled registry backup, then you can restore the backup manually to fix your issue as followings:
    • Open Command Prompt
    • Type Notepad and press Enter
    • From File tab, select Open option
    • Click on This PC icon and then open Windows partition
    • Navigate to this path:
      • D:\Windows\System32\Config\RegBack
        • Replace the D with the letter of winnows partition in your computer
    • Change File of Types option in Notepad window to All
    • If there are files with a file size that is not equal to zero for each one, then you are lucky, and you can copy the registry files to Config folder one by one after renaming existing files as followings:
      • Copy the Default file and back to Config folder
      • Rename Default file int Default.old and then paste the copied file into the Config folder
        • You will not be able to see the old file with the new name and the new file you have pasted until you have done a Refresh for the folder.
      • Open RegBack folder again and repeat previous steps with all registry files.
    • After copying all registry files, close Command prompt
    • Click on Continue option to restart your system into windows 10 or windows 11.

As you can see on the video below, my computer booted successfully after replacing Registry files without blue screen error.

It’s worth noting that the corrupted registry will probably lead to A failure of many recovery options, such as DISM or SFC, System restore or system reset and Booting to Safe Mode.

If you do not have a backup copy of the registry files saved in the RegBack folder, then try to repair the registry using new registry files as instructed on this topic.

If you encounter any problem while applying any method, try using another method, or add your question in a comment, and we will try to help you.


VIDEO:

For more details about fixing the 0xc000021a after windows update or whatever, watch this video: