How to Fix Error 0xc0000221 (Windows Couldn't Load Because a File Is Corrupted)
bootrec /rebuildbcd, repair system files offline with sfc /scannow, and check your disk with chkdsk. Your files stay safe — these fixes only touch boot and system files. Steps below.What error 0xc0000221 means
When your PC shows "Your PC needs to be repaired. The operating system couldn't be loaded because the kernel is missing or contains errors" with the code 0xc0000221, Windows has caught a checksum mismatch in one of the files it needs most. Every critical file carries a small fingerprint called a header checksum; Windows compares the stored fingerprint with a freshly computed one at boot, and if they don't match, the file is damaged. Rather than start with broken code — which could scramble your data — Windows halts and shows the error.
The blue screen usually names the offending file. On UEFI systems it is most often \Windows\system32\winload.efi, and the info line reads "The operating system couldn't be loaded because a critical system driver is missing or contains errors." On other systems it may name ntoskrnl.exe, the Windows kernel itself. Microsoft documents this error (KB 4010132) as a file system or file corruption problem. The good news is that the fix is almost always repair, not reinstall — you rebuild or replace the damaged files from the recovery environment, and your documents, photos, and programs come through untouched.
Common causes
- Corrupted file system: file system errors or bad sectors in the system partition damage copies of boot files, which is the most common trigger.
- Interrupted Windows update: a power cut or forced shutdown while files are being written can leave winload.efi or kernel files half-written.
- Bad RAM corrupting files at load time: faulty memory can damage file copies as Windows loads them, causing checksum errors even on a healthy disk.
- Secure Boot or BIOS changes: toggling Secure Boot or switching between UEFI and legacy modes can break signature checks on boot files.
- Failed drive clone or disk imaging: cloning to a new SSD sometimes copies damaged sectors or skips the hidden boot partitions entirely.
How to fix error 0xc0000221 — step by step
Work through these fixes in order. You will need a Windows installation USB — create one on another PC with Microsoft's Media Creation Tool if you don't have one already.
- Reach the Windows recovery environment. Plug in the Windows installation USB and boot from it — on most PCs, press F12, F9, or Esc during startup to pick the USB drive. Choose your language and keyboard, then click "Repair your computer" instead of Install. If you can't boot from USB, force the recovery screen by interrupting the boot three times in a row: hold the power button when the Windows logo appears, and Windows will enter the recovery environment on the next start.
- Run Startup Repair first. Go to Troubleshoot, then Advanced options, then Startup Repair. Select your Windows installation and let it run. Startup Repair automatically detects and fixes simple boot record and bootloader problems, and on some systems it resolves 0xc0000221 on its own. If it reports that it couldn't repair the PC, continue to step 3 — the automatic tool only handles simple cases, and the manual fixes below go deeper.
- Rebuild the boot configuration data with bootrec. From Advanced options, open Command Prompt. Type these commands one at a time, pressing Enter after each:
bootrec /scanosto find Windows installations,bootrec /fixmbrto rewrite the master boot record,bootrec /fixbootto write a new boot sector, andbootrec /rebuildbcdto rebuild the boot configuration database. When rebuildbcd asks whether to add the installation to the boot list, typeYand press Enter. Then typeexitand restart the PC. - Repair the EFI boot files and check Secure Boot. If the error persists, the UEFI boot files need rebuilding. In the recovery Command Prompt, type
diskpart, thenlist vol. Look for the small FAT32 partition labeled as EFI or ESP — usually around 100 MB. Select it withsel vol N(replace N with its number), then typeassign letter=Xandexitto leave diskpart. Now rebuild the boot files withbcdboot C:\Windows /s X: /f UEFI— replace C: with your actual Windows drive letter if different. If the error still appears, restart into the BIOS (usually Del or F2) and check Secure Boot: if you recently changed it or the boot mode, toggling Secure Boot back to its previous setting can clear signature-based failures. - Check the disk and repair system files offline. From the recovery Command Prompt, run
chkdsk C: /ron your Windows drive — it takes a while but fixes file system errors and quarantines bad sectors that corrupt boot files. Then runsfc /scannow /offbootdir=C:\ /offwindir=C:\Windowsto repair damaged system files offline. Note that drive letters shift in the recovery environment, so confirm yours first withdiskpartthenlist voland adjust the letters accordingly. If SFC reports it couldn't fix everything, runDism /Image:C:\ /Cleanup-Image /RestoreHealthfrom the same prompt, then run SFC again. - Test memory and use System Restore or reinstall as a last resort. Go to Troubleshoot, then Advanced options, then System Restore, and choose a restore point from before the error first appeared — restoring earlier healthy boot files often clears 0xc0000221 when repairs don't. If the error keeps returning after every repair, suspect your hardware: run the Windows Memory Diagnostic (search for it once booted, or choose Memory Diagnostic from Advanced options if available) to test your RAM, since bad memory corrupts files during loading. As the final option, perform a clean Windows installation — guaranteed to fix the error, but it erases installed programs, so back up your files first from the recovery Command Prompt if you can.
Did this fix it? Quick checklist
- Windows boots past the blue screen without the 0xc0000221 error
- chkdsk finished with no new bad sectors on the system drive
- SFC /scannow reports "Windows Resource Protection did not find any integrity violations"
- No boot error after two full restarts, including one cold boot
If Windows boots again, don't stop there — back up your important files right away, then open Command Prompt as administrator and schedule a disk check with chkdsk C: /f for the next restart. Error 0xc0000221 is often the first warning of a dying drive or failing memory, so a clean backup now saves you from a bigger failure later. Also create a system image backup (search "Backup settings" in Start) so the next boot failure is a single restore instead of another repair session.
Frequently asked questions
What does error 0xc0000221 mean?
Error 0xc0000221 (STATUS_IMAGE_CHECKSUM_MISMATCH) means Windows detected that a critical system file — usually winload.efi or ntoskrnl.exe — is corrupted. The blue screen says 'The operating system couldn't be loaded because the kernel is missing or contains errors.' Windows refuses to start because running a damaged kernel could corrupt your data further.
Will fixing 0xc0000221 delete my files?
No. Startup Repair, bootrec, bcdboot, chkdsk, SFC, and System Restore only repair system and boot files — your personal documents, photos, and installed programs stay untouched. Only a clean Windows reinstall would remove your data, and that is only the last resort.
Why does 0xc0000221 mention winload.efi on some PCs and ntoskrnl.exe on others?
Both files are checked during boot, so whichever one fails the checksum first gets named on the blue screen. PCs booting in UEFI mode usually show winload.efi, while the error can name ntoskrnl.exe (the Windows kernel itself) on any system. The fixes are the same either way.
Can a failing SSD or bad RAM cause 0xc0000221?
Yes. A dying SSD or bad sectors can corrupt the copies of boot files on disk, and faulty RAM can corrupt those files while Windows loads them into memory. If the error keeps coming back after repairs, run chkdsk C: /r to check the drive and the Windows Memory Diagnostic to test your RAM before replacing parts.