Fix ntoskrnl.exe BSOD Error in Windows: Step-by-Step
In this article
The ntoskrnl.exe BSOD error is usually caused by faulty RAM, outdated or corrupt drivers, or damaged system files. To fix it, run the Windows Memory Diagnostic, update your drivers from the manufacturer's site, and run sfc /scannow and DISM from an elevated Command Prompt. If those do not help, check for disk errors and consider a clean install as a last resort. This guide walks through each step in order, from safest and simplest to more involved, so you can stop the blue screen without guessing.
What You'll Need
- A Windows PC that can boot to the desktop or Safe Mode (if it cannot, see Troubleshooting).
- An administrator account.
- Your PC or motherboard manufacturer's support website open in a browser for driver downloads.
- A blank USB drive (8 GB or larger) if you need to create Windows installation media for repair or reinstall.
- About 30–60 minutes, plus time for memory and disk tests.
Step-by-Step
- Note the stop code and when it happens. The blue screen shows a stop code such as
IRQL_NOT_LESS_OR_EQUALorPAGE_FAULT_IN_NONPAGED_AREAalongside ntoskrnl.exe. Write it down. Note whether the crash happens at boot, under load (games, video export), after sleep, or randomly. This narrows the cause: boot crashes point to storage or system files, load crashes to RAM or drivers, sleep crashes to power or driver issues. - Boot into Safe Mode if Windows will not start normally. From the sign-in screen, hold Shift and click Restart. On the recovery screen choose Troubleshoot > Advanced options > Startup Settings > Restart, then select Safe Mode. Labels can differ slightly by Windows version and device. Safe Mode loads a minimal set of drivers, so if the PC is stable there, a third-party driver or startup app is likely involved.
- Run the Windows Memory Diagnostic. Open Start, type Windows Memory Diagnostic, and choose Restart now and check for problems. The test runs before Windows loads and takes 15–30 minutes. If it reports errors, reseat the RAM sticks (power off, unplug, ground yourself), test one stick at a time in the first slot, and replace any stick that fails. Faulty RAM is one of the most common causes of ntoskrnl.exe crashes.
- Update drivers from the manufacturer, not a driver updater. Go to your PC or motherboard maker's support page and download the latest chipset, storage (SATA/NVMe), network, and graphics drivers for your exact model. Install them one at a time and restart between installs so you can tell which one changes behavior. Avoid third-party driver updater tools; they often install generic or mismatched drivers that cause new crashes.
- Run System File Checker and DISM. Open Start, type cmd, right-click Command Prompt, and choose Run as administrator. Run
sfc /scannowand let it finish. Then runDISM /Online /Cleanup-Image /RestoreHealth. These repair damaged Windows system files and the component store. Restart afterward and test. - Check the disk for errors. In an elevated Command Prompt, run
chkdsk C: /f /r. If it says the drive is in use, typeYto schedule the check at the next restart, then reboot. This scans for bad sectors and file system errors. A failing drive can corrupt the kernel and trigger ntoskrnl.exe blue screens, so back up important files before and after this step. - Check for and remove recent problem updates or software. Open Settings > Windows Update > Update history and uninstall the most recent update if crashes started right after it. Also review Settings > Apps > Installed apps and remove any antivirus, VPN, or system utility installed just before the crashes began. Restart and observe.
- Test with a clean boot. Open Start, type msconfig, go to the Services tab, check Hide all Microsoft services, and click Disable all. Then open Task Manager > Startup and disable non-Microsoft startup items. Restart. If the PC is stable, re-enable items in small groups to find the culprit. Re-enable everything when done.
- Use System Restore or reset Windows. If nothing else works, open Start, type Create a restore point, and use System Restore to roll back to a point before the crashes began. If no restore point exists, go to Settings > System > Recovery and choose Reset this PC. Choose Keep my files first; it removes apps and settings but keeps personal files. A full reset removes everything, so back up first.
Common Mistakes
- Assuming ntoskrnl.exe is the culprit. It is the Windows kernel, not a virus or a standalone program. The error means the kernel crashed, usually because of a driver, RAM, or storage problem. Deleting or replacing the file will break Windows.
- Using random driver updater tools. They often install generic drivers that do not match your hardware and can create new blue screens. Always use the manufacturer's support site.
- Skipping the memory test. Many people jump to reinstalling Windows before testing RAM. A five-minute reseat or a single bad stick can be the entire cause.
- Ignoring the stop code. The code and the failing module name (shown on the blue screen) point to the specific driver or component. Writing it down saves hours.
- Forgetting to back up before chkdsk or a reset. Both can take time and, in rare cases, affect data. Copy important files to an external drive first.
Tips
- Run only one fix at a time and restart between changes. If you change five things at once, you will not know which one worked.
- Keep Windows Update and your manufacturer drivers current, but avoid optional driver updates pushed through Windows Update unless the manufacturer recommends them.
- Check your PC's ventilation. Overheating can cause random kernel crashes; clean dust from fans and vents and confirm the CPU and GPU temperatures are normal in the BIOS or manufacturer utility.
- If you added new hardware recently (RAM, SSD, GPU), remove it and test with the original configuration. Incompatible or poorly seated hardware is a frequent cause.
- Write down the exact stop code and any file name shown on the blue screen before restarting; the screen disappears quickly.
Troubleshooting
Windows will not boot at all. Use a Windows installation USB to reach Repair your computer > Troubleshoot > Advanced options. From there you can run Startup Repair, System Restore, or open Command Prompt and run the SFC and DISM commands against the offline system. Creating the USB requires another working PC and the official Media Creation Tool from Microsoft.
The memory test passes but crashes continue. Test one RAM stick at a time in the primary slot, and try a different slot. Also run the test again overnight; some errors only appear under longer runs.
chkdsk finds errors but they return. Back up immediately and check the drive's health with the manufacturer's diagnostic tool (for example, Samsung Magician or Crucial Storage Executive). A drive that keeps producing errors should be replaced.
Safe Mode is stable but normal mode crashes. This strongly suggests a driver or startup app. Use clean boot and Device Manager to disable or roll back recently updated devices, especially graphics, network, and storage controllers.
Nothing works and you need the PC running. Back up your files and perform a clean installation of Windows from official media. If crashes continue on a fresh install with no extra software, the fault is likely hardware: RAM, storage, or the motherboard.
Frequently Asked Questions
Is ntoskrnl.exe a virus?
No. It is the Windows kernel, a core system file. A blue screen naming it means the kernel crashed, usually due to a driver, RAM, or disk problem, not because the file itself is malicious.
Can I delete or replace ntoskrnl.exe?
No. Deleting or swapping it will prevent Windows from starting. Repair it with sfc /scannow and DISM instead.
Does a factory reset fix ntoskrnl.exe blue screens?
It fixes software and driver causes but not hardware faults. If RAM or the drive is failing, the crashes will return after a reset.
How do I find which driver caused the crash?
The blue screen often names a file next to the stop code. If it does not, check Reliability Monitor (search Reliability in Start) or use Windows' built-in memory dump tools. The named file usually points to the responsible driver or component.
Is it safe to use my PC with this error?
Back up important files first. Repeated kernel crashes can interrupt writes and, if the cause is a failing drive, lead to data loss. Fix the underlying cause before relying on the PC for important work.