Windows BSOD, Event Viewer, SFC/DISM & Boot Repair
When Windows hits a Blue Screen of Death (BSOD), loops on Automatic Repair, or fails updates, avoid random registry tweaks. Follow the Windows Boot & Repair Pipeline from WinRE and BCD recovery down to DISM, SFC, and Event Viewer forensics.
1 Image & System File Repair (Admin CMD)
Run these commands in an Elevated Command Prompt (Right-click Start → Terminal (Admin)). Order mattersโrepair the Windows Component Store first so SFC has clean backup files to copy from.
DISM /Online /Cleanup-Image /RestoreHealth
Step 1: Repair Component Store
WinSxS)
DISM /Online /Cleanup-Image /ScanHealth.sfc /scannow
Step 2: System File Checker
WinSxS store repaired by DISM.chkdsk C: /f /r
Step 3: Disk & Bad Sector Repair
/f) and recover bad sectors (/r)
C:, Windows will ask to schedule the scan on the next rebootโpress Y and restart.chkdsk C: /f is usually enough and finishes in minutes instead of hours.2 Critical Event Viewer IDs Table
Open Event Viewer quickly with Win+R → eventvwr.msc. Filter Windows Logs → System or Security by these high-signal Event IDs.
| Event ID | Log & Source | What It Means & What to Check |
|---|---|---|
| 41 | System • Kernel-Power |
Unexpected shutdown or power loss. Windows rebooted without a clean shutdown (BSOD, PSU failure, thermal trip, or hard power button hold). |
| 1001 | System • BugCheck |
BSOD crash details. Records the exact Stop Code (e.g., 0x0000001A) and the path to the saved .dmp memory dump file. |
| 4624 / 4625 | Security • Microsoft-Windows-Security-Auditing |
Successful (4624) vs. Failed (4625) Logon. Check Logon Type (2=Interactive, 3=Network, 10=RDP) and Source Network Address for brute-force attempts. |
| 4740 | Security • Account Lockout |
User account was locked out. Check the Caller Computer Name field to find which device, mapped drive, or cached service credential is spamming bad passwords. |
| 7036 / 7000 | System • Service Control Manager |
Service state change / startup failure. 7036 logs a service entering running/stopped state; 7000 means a service failed to start (often bad path, permissions, or timeout). |
powershell -Command "Get-WinEvent -FilterHashtable @{LogName='System'; Id=41,1001,7000} -MaxEvents 15 | Format-Table TimeCreated,Id,Message -Wrap"
3 Boot & BCD Repair in WinRE
When Windows won't start ("Bootmgr is missing" or "Your PC needs to be repaired"), boot into WinRE (Hold Shift + Restart, or boot from a Windows USB → Repair your computer → Troubleshoot → Command Prompt).
bootrec /fixmbr
WinRE Command Prompt
bcdedit or bcdboot on UEFI systems.bootrec /fixboot
WinRE Command Prompt
diskpart and run bcdboot C:\Windows /s S: /f UEFI.bootrec /rebuildbcd
WinRE Command Prompt
C:\Windows and asks "Add installation to boot list?"โpress Y.bootrec /scanos first if you just want to verify Windows is detected.bcdedit /enum
Admin CMD / WinRE
Windows Boot Manager and Windows Boot Loader point to the correct drive letter/partition (usually partition=C:).bcdedit /export C:\bcd-backup.4 BSOD Stop Codes & Minidumps
Every Blue Screen writes a small crash snapshot to C:\Windows\Minidump\. Open those .dmp files in WinDbg (Microsoft Store) and run !analyze -v to see the exact faulting driver (.sys).
dir C:\Windows\Minidump\
Crash Dump Location
sysdm.cpl → Advanced → Startup and Recovery..dmp before checking which .sys driver caused the crash.| BSOD Stop Code | Common Root Cause | First Fix to Try |
|---|---|---|
| CRITICAL_PROCESS_DIED | Core Windows process (csrss.exe, wininit.exe) crashed or was killed; corrupt OS files or failing SSD. |
Boot WinRE → run DISM /RestoreHealth, sfc /scannow, and check SMART health. |
| MEMORY_MANAGEMENT | Faulty RAM stick, unstable XMP/DOCP overclock, or corrupted pagefile/driver memory pool. | Run mdsched.exe (Windows Memory Diagnostic) or MemTest86; disable RAM overclock. |
| INACCESSIBLE_BOOT_DEVICE | Storage controller mode changed (AHCI vs RAID/VMD), missing NVMe driver, or corrupt BCD. | Check BIOS SATA/NVMe mode, run chkdsk C: /f, and verify bcdedit /enum. |
5 The Danger Zone (What NOT To Do)
sfc /scannow before DISM when the component store is corrupt
sfc pulls replacement files from the local C:\Windows\WinSxS store. If that store is damaged, SFC fails repeatedly or leaves broken files behind.
DISM /Online /Cleanup-Image /RestoreHealth first, then sfc /scannow.C:\Boot or the EFI System Partition (ESP)
Wiping the hidden 100MBโ500MB EFI partition or C:\Boot deletes the Windows Boot Manager and BCD, making the PC unbootable.
diskpart; use bcdedit /export before boot edits.chkdsk /f /r or Windows Update
Interrupting active NTFS metadata repairs or servicing stack updates can leave the registry hives or boot files half-written.
chkdsk finish (even if it looks paused at 10โ20%), and check Event Viewer ID 41 / 1001 after boot.