Error Medic

Windows Stop Code Windows 11: Complete Fix Guide for BSOD Errors

Fix Windows 11 stop code BSODs fast. Step-by-step diagnosis for INACCESSIBLE_BOOT_DEVICE, CRITICAL_PROCESS_DIED & more. Real commands included.

Last updated:
Last verified:
1,992 words
Key Takeaways
  • Windows 11 stop codes (BSODs) are triggered by driver corruption, hardware failures, faulty Windows updates, or misconfigured storage controllers — identifying the exact stop code is the first diagnostic step.
  • INACCESSIBLE_BOOT_DEVICE (0x0000007B) is the most common Windows 11 stop code and is usually caused by a missing or corrupt storage driver, BIOS SATA mode mismatch (AHCI vs IDE), or a damaged MBR/BCD.
  • Quick fix summary: Boot into WinRE, run 'sfc /scannow' and 'DISM /RestoreHealth', rebuild BCD with bootrec commands, roll back recent drivers or updates, and if all else fails perform a Startup Repair or Reset This PC.
Fix Approaches Compared
MethodWhen to UseTimeRisk
SFC + DISM ScanCorrupted system files suspected; PC can boot to Safe Mode or WinRE15–45 minLow
BCD Rebuild (bootrec)INACCESSIBLE_BOOT_DEVICE or boot loop; BCD/MBR damage10–20 minLow–Medium
Driver Rollback / UninstallBSOD started after a driver or Windows Update install5–15 minLow
Windows Startup RepairRepeated BSODs, cannot boot at all; WinRE accessible20–40 minLow
DISM RestoreHealth (online)Corrupt Windows image; internet access available30–60 minLow
Registry SAFEBOOT EditStuck in Safe Mode loop or boot flag corruption5 minMedium
Reset This PC (Keep Files)Multiple fixes failed; data preservation is critical45–90 minMedium
Clean Install Windows 11Persistent hardware or software corruption; last resort60–120 minHigh (data loss)

Understanding Windows 11 Stop Codes

A Windows Stop Code — colloquially called a Blue Screen of Death (BSOD) — is Windows 11's last line of defense. When the kernel detects a condition it cannot safely recover from (a hardware fault, a driver writing to protected memory, a corrupted system file), it halts execution, displays a stop code, and either reboots or waits for user action.

Windows 11 reformatted the BSOD screen compared to Windows 10: you now see a frowny face emoji, a plain English description (e.g., "Your PC ran into a problem and needs to restart"), and a stop code such as:

  • INACCESSIBLE_BOOT_DEVICE (0x0000007B)
  • CRITICAL_PROCESS_DIED (0x000000EF)
  • SYSTEM_THREAD_EXCEPTION_NOT_HANDLED (0xC000021A)
  • DRIVER_IRQL_NOT_LESS_OR_EQUAL (0x000000D1)
  • PAGE_FAULT_IN_NONPAGED_AREA (0x00000050)
  • KERNEL_SECURITY_CHECK_FAILURE (0x00000139)
  • MEMORY_MANAGEMENT (0x0000001A)
  • WHEA_UNCORRECTABLE_ERROR (0x00000124)

Each code maps to a specific failure category. This guide covers diagnosis and resolution for the most common ones.


Step 1: Record and Identify the Stop Code

Before touching anything, note the exact stop code displayed on the blue screen. If the machine reboots too quickly:

  1. Go to Settings → System → About → Advanced system settings.
  2. Under Startup and Recovery, click Settings.
  3. Uncheck Automatically restart under System failure.
  4. Set Write debugging information to Small memory dump (256 KB).

After the next BSOD, open Event Viewer → Windows Logs → System and filter for Critical events. Alternatively, use WinDbg or the free WhoCrashed tool to parse the minidump at C:\Windows\Minidump\.


Step 2: Boot into Windows Recovery Environment (WinRE)

If Windows 11 cannot boot normally, WinRE is your workspace:

  • From a running system: Settings → System → Recovery → Advanced Startup → Restart Now.
  • Forced: Power the PC off three times mid-boot. Windows 11 automatically launches WinRE after three failed boots.
  • USB media: Boot from a Windows 11 installation USB, choose Repair your computer.

From WinRE, navigate to Troubleshoot → Advanced Options → Command Prompt for full CLI access.


Step 3: Fix INACCESSIBLE_BOOT_DEVICE (0x0000007B)

This is the most common Windows 11 stop code. It means Windows cannot read the drive containing the OS during boot. Root causes:

  • Storage controller driver missing from boot sequence.
  • BIOS SATA mode changed from AHCI to IDE (or vice versa) after Windows install.
  • Corrupt Boot Configuration Data (BCD).
  • Damaged Master Boot Record.
  • A new SSD/NVMe not recognized by the existing driver stack.

Sub-fix A — Rebuild BCD from WinRE Command Prompt:

bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd

If bootrec /fixboot returns Access is denied, run:

bcdboot C:\Windows /s C: /f ALL

Sub-fix B — Check BIOS SATA Mode:

Reboot into BIOS/UEFI (usually Del or F2). Under Storage Configuration, verify SATA mode matches what was set when Windows was installed. Switching AHCI ↔ IDE mid-life will produce 0x0000007B. If you must switch, inject the AHCI driver first via Safe Mode before changing BIOS.

Sub-fix C — Enable msahci in Registry (from WinRE):

reg load HKLM\TempSystem C:\Windows\System32\config\system
reg add "HKLM\TempSystem\ControlSet001\Services\msahci" /v Start /t REG_DWORD /d 0 /f
reg add "HKLM\TempSystem\ControlSet001\Services\storahci" /v Start /t REG_DWORD /d 0 /f
reg unload HKLM\TempSystem

Step 4: Repair System Files with SFC and DISM

For stop codes like CRITICAL_PROCESS_DIED, SYSTEM_THREAD_EXCEPTION_NOT_HANDLED, or KERNEL_SECURITY_CHECK_FAILURE, corrupted Windows system files are the usual culprit.

From an elevated Command Prompt (or WinRE):

sfc /scannow

If SFC reports it cannot fix some files, run DISM to repair the Windows image first:

DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth

Then re-run SFC:

sfc /scannow

If running from WinRE where C: is the Windows partition:

DISM /Image:C:\ /Cleanup-Image /RestoreHealth /Source:esd:D:\sources\install.esd

Step 5: Identify and Roll Back Problematic Drivers

For DRIVER_IRQL_NOT_LESS_OR_EQUAL or SYSTEM_THREAD_EXCEPTION_NOT_HANDLED, a driver is the prime suspect. The minidump will usually name the offending .sys file (e.g., nvlddmkm.sys for NVIDIA GPU drivers).

From Safe Mode (press F8 or Shift+Restart → Safe Mode):

  1. Open Device Manager → find the device with the named .sys file.
  2. Right-click → Properties → Driver → Roll Back Driver.
  3. If rollback is unavailable, right-click → Uninstall device, check Delete the driver software, reboot.

To uninstall a Windows Update that caused BSOD:

wusa /uninstall /kb:XXXXXXX

Replace XXXXXXX with the KB number shown in Settings → Windows Update → Update History.


Step 6: Check RAM and Storage Hardware

For MEMORY_MANAGEMENT or WHEA_UNCORRECTABLE_ERROR, hardware is failing.

RAM test (Windows Memory Diagnostic):

mdsched.exe

Choose Restart now and check for problems. The tool runs automatically on next boot.

Storage health check (from elevated PowerShell):

Get-PhysicalDisk | Select-Object FriendlyName, HealthStatus, OperationalStatus

chkdsk on the boot volume:

chkdsk C: /f /r /x

This requires a reboot to run on the system drive.


Step 7: Use Windows 11 Startup Repair

If all manual steps fail:

  1. Boot into WinRE.
  2. Troubleshoot → Advanced Options → Startup Repair.
  3. Select your Windows 11 installation and let it run.

Startup Repair automates BCD rebuild, SFC, and driver checks.


Step 8: Reset This PC or Clean Install

If stop codes persist after all fixes:

  • Settings → System → Recovery → Reset this PC → Keep my files — reinstalls Windows 11 while preserving user data.
  • Clean install via USB — download the Media Creation Tool from Microsoft, create bootable USB, and perform a fresh install.

Always back up data to an external drive before performing a reset or clean install.

Frequently Asked Questions

bash
# ============================================================
# Windows 11 Stop Code Diagnostic & Fix Script
# Run from an elevated Command Prompt or WinRE Command Prompt
# ============================================================

:: --- Step 1: Identify stop code from recent event logs ---
wevtutil qe System /c:10 /rd:true /f:text /q:"*[System[(Level=1)]]" | findstr /i "bugcheck stop code"

:: --- Step 2: Check system file integrity ---
sfc /scannow

:: --- Step 3: Repair Windows image with DISM (requires internet) ---
DISM /Online /Cleanup-Image /CheckHealth
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth

:: --- Step 4: Re-run SFC after DISM ---
sfc /scannow

:: --- Step 5: Rebuild Boot Configuration Data (BCD) ---
bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd

:: --- Step 6: Fix access denied on bootrec /fixboot ---
bcdboot C:\Windows /s C: /f ALL

:: --- Step 7: Enable AHCI storage driver in registry (INACCESSIBLE_BOOT_DEVICE fix) ---
reg load HKLM\TempSystem C:\Windows\System32\config\system
reg add "HKLM\TempSystem\ControlSet001\Services\msahci" /v Start /t REG_DWORD /d 0 /f
reg add "HKLM\TempSystem\ControlSet001\Services\storahci" /v Start /t REG_DWORD /d 0 /f
reg add "HKLM\TempSystem\ControlSet001\Services\iaStorV" /v Start /t REG_DWORD /d 0 /f
reg unload HKLM\TempSystem

:: --- Step 8: Check disk for errors (reboot required to run on C:) ---
chkdsk C: /f /r /x

:: --- Step 9: Uninstall a problematic Windows Update by KB number ---
:: Replace XXXXXXX with the actual KB number
wusa /uninstall /kb:XXXXXXX /quiet /norestart

:: --- Step 10: Check disk health via PowerShell ---
powershell -Command "Get-PhysicalDisk | Select-Object FriendlyName, HealthStatus, OperationalStatus, Size"

:: --- Step 11: Check RAM with Windows Memory Diagnostic ---
mdsched.exe

:: --- Step 12: List recently installed drivers (sorted by date) ---
powershell -Command "Get-WmiObject Win32_PnPSignedDriver | Select-Object DeviceName, DriverVersion, DriverDate | Sort-Object DriverDate -Descending | Select-Object -First 20 | Format-Table -AutoSize"

:: --- Step 13: Export System event log for offline analysis ---
wevtutil epl System C:\SystemLog_Export.evtx

:: --- Step 14: List minidump files for analysis ---
dir C:\Windows\Minidump\ /o-d

:: ============================================================
:: END OF SCRIPT
:: ============================================================
E

Error Medic Editorial

The Error Medic Editorial team is composed of senior DevOps engineers, SREs, and Windows system administrators with 10+ years of experience diagnosing and resolving OS-level failures across enterprise and consumer environments. We specialize in translating cryptic stop codes and kernel panics into actionable, step-by-step recovery procedures backed by official documentation and real-world testing.

Sources

Related Articles in Windows 11 Windows Stop Code

Explore More windows Guides