A man diagnoses components inside an open desktop computer on a desk
Linux Troubleshooting
William  

Kernel Is Missing or Contains Errors: 6 Boot Checks

Kernel is missing or contains errors usually means Windows can't read or validate a boot-critical file. Don't reinstall yet. First find the file that failed. Then repair the offline Windows image with DISM and System File Checker, check the drive with chkdsk, test memory, or repair the boot setup with BCDBoot. The message is a symptom, not a diagnosis. In most cases, the kernel file is still where it belongs.

Last updated: 2026-11-11

What does “kernel is missing or contains errors” mean?

Windows may report "The operating system couldn't be loaded because the kernel is missing," or add "or contains errors." That exact message appears with Windows boot error 0xC0000221. People also call it a kernel missing error, or say Windows failed to load because the kernel is missing or corrupt. Those descriptions cover related boot failures. However, none of them proves ntoskrnl.exe is absent.

The Windows boot configuration selects a Windows loader, which then reads the kernel and other system files. A bad boot entry, a damaged file or a read failure can all lead to similar messages. So check which part failed before you rebuild the boot setup.

The recovery environment can fail separately from Windows on the disk. WinRE is based on Windows Preinstallation Environment, or Windows PE. It can be customized with additional drivers, languages, optional components and troubleshooting tools. So if the message appears only when you start recovery media, suspect that media or its drivers first.

Does the same error happen on Linux?

Windows and Linux use different boot paths. On Linux, /lib/modules holds the kernel modules the system needs. A mismatch between the running kernel and its module tree is a different problem. The default Linux module installation path is /lib/modules/$(KERNELRELEASE), and depmod builds the module dependency list by reading modules under that path. If the machine runs Linux, use this guide to diagnose Linux kernel module failures.

Linux kernel releases arrive every approximately 9–10 weeks, with a merge window followed by stabilization. The kernel itself occupies 1.5GB of its repository, while the rest is mostly history. A recent Linux kernel release supports 21 different architectures. None of those details explain a Windows boot error. Still, they show why a Linux module mismatch needs its own diagnosis.

Read the stop code and boot evidence first

Write down the full status code and any filename on the screen. Status 0xC0000221 means the file header checksum does not match the expected checksum. Microsoft describes it as a serious error in a driver or other system file. A driver or system DLL may be corrupted. That points to a file-integrity problem. However, it doesn't tell you whether the cause is the file itself, storage or memory. See Microsoft's explanation of status 0xC0000221.

In Windows Recovery Environment, drive letters can differ from the ones you see during normal startup. Find the Windows volume before you run any repair command:

diskpart
list volume
exit
dir D:\Windows

list volume shows the volumes and their assigned letters. The dir command confirms whether the selected volume contains the Windows folder. If it doesn't, check the other listed letters. A locked BitLocker volume also has to be unlocked before its files can be read.

Next, inspect the boot entry and recovery log:

bcdedit /enum

Check whether the loader entry points to the Windows installation you found. The command shows boot entries. It does not prove the kernel file is healthy. Startup Repair details may appear in \Windows\System32\LogFiles\Srt\SrtTrail.txt on the Windows volume. If Windows starts, check Event Viewer's System log around the failure for disk, file-system, memory and driver errors.

Which checks should you run first?

The named file matters. A system DLL or Windows driver with a checksum error needs a different response than repeated disk read errors. So don't replace files until the evidence narrows the cause.

I work in this order, starting with the cheapest and least destructive checks:

  • Find the Windows volume with diskpart and dir.
  • Read the boot entries with bcdedit /enum.
  • Check SrtTrail.txt and the System log for the failing component.
  • Repair Windows files with DISM and SFC once corruption is confirmed.
  • Check storage, then memory, if repaired files go bad again.
  • Repair boot files with BCDBoot only when the boot environment itself failed.

That order keeps a bad boot entry, a failing disk and damaged system files from being treated as the same problem. Each of those needs a different fix.

Repair the identified Windows system files

Use DISM and System File Checker (SFC) when the evidence points to damaged Windows files. From WinRE, first confirm the correct Windows drive letter. The example below uses D:. Change it if your installation is on another volume.

DISM /Image:D:\ /Cleanup-Image /RestoreHealth
sfc /scannow /offbootdir:D:\ /offwindir:D:\Windows

DISM checks and repairs the offline Windows image. SFC then checks protected system files against that image. If DISM reports that repair files are unavailable, stop. Use a suitable Windows installation source rather than guessing at a replacement.

Then check SFC's result. If it reports repaired files, restart and run the check again once Windows is available. If the same file fails again, don't keep repeating the repair. Instead, look for a storage or memory fault that may be corrupting files.

If the named file belongs to a third-party driver, use recovery options to roll back or remove that driver. A driver problem is not a reason to copy a random DLL or kernel file from another computer.

Check the storage and file system for read failures

Woman in a blue shirt diagnoses an open desktop computer tower on a desk

Repeated checksum errors can come from a failing drive, a bad connection, a storage controller or file-system damage. Start with a read-only check:

chkdsk D:

Replace D: with the Windows volume. The output reports any file-system problems it finds. If it reports errors, back up important files before you ask it to make repairs. Then run:

chkdsk D: /f

Use /r only when the evidence suggests unreadable sectors. It takes longer, and it cannot repair a failing drive. If checks report read errors again, protect the data and investigate the drive or controller. Reinstalling Windows won't help here.

Also check that the Windows volume has free space for servicing and temporary repair files:

fsutil volume diskfree D:

That reports the volume's available space. A full volume can block repairs. However, freeing space will not fix a failing disk.

Test RAM and pagefile-related causes

Suspect memory when file corruption returns after repair, or when different files fail across boots. A stable system should not keep changing which file appears damaged.

If Windows starts, run Windows Memory Diagnostic with mdsched.exe. If it can't start, use the machine's built-in firmware memory test if one exists. If you recently changed firmware memory settings, return them to stable defaults before testing again. Don't toggle obscure firmware options as a substitute for a memory test.

A pagefile problem is not proof that ntoskrnl.exe is corrupt. If Windows boots, check the virtual memory settings. Leave the pagefile system-managed unless logs point to a specific configuration problem. Don't delete pagefile.sys to try to clear a kernel checksum error.

Confirm the fix and escalate based on the evidence

After repairing files, boot Windows and review the System log again. The fix isn't confirmed if the same file fails on the next start or fresh disk errors appear. If the machine boots reliably and the errors stop recurring, the repair addressed the failure.

Rebuild boot files only when the evidence points to a damaged boot environment. Microsoft says BCDBoot can quickly set up a system partition or repair the boot environment located on the system partition. Use it only after you've identified the correct Windows installation and system partition. Guessing at either can make the machine harder to boot.

If storage or memory tests fail, deal with that hardware before you trust a file repair. If diagnostics are clean but Windows files stay damaged, use recovery or repair installation options after protecting your data. Reinstalling first may erase evidence and leave the actual fault untouched.

FAQ

Does this message mean my personal files are gone?

No. A failed boot doesn't delete anything, and your documents are usually intact on a disk Windows just can't start from. The exception is a drive that throws read errors. If chkdsk reports those, copy what matters off the disk before anything else, because each extra repair pass works hardware that's already struggling.

Can I use System Restore after a driver or update change?

Yes, if a restore point exists from before that change. I'd try it before any file-level repair, because it reverses the exact change you suspect. Just don't treat a clean boot afterward as a health check. Restore never tests the drive or memory, so a failing disk can bring the error right back.

Is this the same as a kernel panic?

No. This Windows message appears while the system is still trying to load. A Linux kernel panic happens later, after the kernel has started and hit a fault it can't recover from. The evidence and the tools are different, so see our guide to kernel panic diagnosis for that failure.

Related on this blog

Related: Fix EasyAntiCheat Kernel Driver Blue Screen Errors