The SrtTrail.txt screen is Windows admitting defeat politely. Your laptop failed to boot, Automatic Repair kicked in, Automatic Repair failed too, and now you are staring at a blue screen referencing C:\Windows\System32\Logfiles\Srt\SrtTrail.txt — which is just the log file where Windows wrote down how it failed. The file is not the problem; the failed boot is.
This is one of the most searched Windows errors because it traps you in a loop: every boot attempt ends at the same blue screen. Breaking the loop means fixing the boot problem manually from the recovery environment. The steps below are ordered by likelihood — BCD issues first, then file corruption, then disk problems. If your machine shows 0xc000021a instead, see our dedicated 0xc000021a guide — similar territory, different error.
Before you start, grab what you need: another computer or phone to read this guide (your laptop will be in the recovery environment, not a browser), your BitLocker recovery key if the drive is encrypted (WinRE may ask for it before letting you run commands), and patience for the disk scans — chkdsk /r on a large drive can run over an hour. Nothing here erases data, but having your most important files backed up is always wise before boot surgery. If you have never opened a Command Prompt before, do not worry: you will be typing the commands exactly as shown, one line at a time, and each fix tells you what success looks like.
Why this happens
- Corrupt Boot Configuration Data (BCD). The most common cause. The boot loader’s database is damaged, so Windows cannot find or start itself.
- Damaged system files. Corrupted boot-critical files (winload.efi, ntoskrnl.exe) after a failed update or disk error.
- Disk errors on the boot partition. Bad sectors landing on boot files produce this loop reliably.
- Half-applied Windows update. A feature update that did not complete leaves old and new boot files mixed.
- Partition changes. Resizing, cloning, or dual-boot tools can invalidate the BCD’s partition references.
- Failing drive. When the drive itself is dying, boot files corrupt faster than repairs can fix them.
How to fix it
All fixes run from the recovery environment: on the blue screen, choose Advanced options, then Troubleshoot > Advanced options > Command Prompt. Work through these in order.
Fix 1: Rebuild the BCD
The highest-probability fix — do this first.
- Open Command Prompt from Advanced options.
- Run these commands one at a time:
bootrec /fixmbrbootrec /fixbootbootrec /scanosbootrec /rebuildbcd
- If
fixbootreturns “Access denied,” rebuild the EFI boot files manually:diskpart→list vol→ find the FAT32 EFI partition (~100MB) →sel vol <n>→assign letter=Z:→exit- Find your Windows drive letter with
diskpart→list vol(often D: in WinRE) →exit bcdboot D:\Windows /s Z: /f UEFI
- Type
exit, choose Continue, and test the boot.
Fix 2: Run SFC and DISM offline
Repairs the damaged system files that are failing the boot.
- In the recovery Command Prompt, confirm your Windows drive letter (
diskpart→list volume→exit). - Run:
sfc /scannow /offbootdir=D:\ /offwindir=D:\Windows(adjust D: as needed). - Then:
DISM /Image:D:\ /Cleanup-Image /RestoreHealth - Run the SFC command once more, type
exit, and reboot.
Fix 3: Check and repair the disk
Boot files on bad sectors will keep corrupting — check the disk itself.
- In the recovery Command Prompt, run
chkdsk D: /f /r(your Windows drive letter). - Let it complete — the
/rsurface scan takes a while on large drives but finds the bad sectors that cause recurring boot corruption. - If chkdsk reports bad sectors in system areas, back up your data at the first successful boot and plan a drive replacement — this loop will return otherwise.
Fix 4: Disable Automatic Repair’s loop (to boot at all)
Sometimes you need to stop the repair loop just to get a working boot for further diagnosis.
- In the recovery Command Prompt, run:
bcdedit /set {default} recoveryenabled No - Type
exitand choose Continue. Windows will now attempt a normal boot instead of diverting to Automatic Repair. - If it boots, immediately back up your data, then continue fixing (run SFC/DISM from within Windows).
- If it blue-screens with a different error, that new error is actually progress — it tells you what Automatic Repair was hiding. Look up that stop code next.
Fix 5: Uninstall the recent update
- Go to Troubleshoot > Advanced options > Uninstall Updates.
- Try Uninstall the latest quality update first, then the feature update if the loop started after 24H2.
- Reboot. If Windows starts, pause updates and check Microsoft’s Windows support hub for known issues with that KB before reinstalling.
Fix 6: System Restore from WinRE
- Go to Troubleshoot > Advanced options > System Restore.
- Choose a restore point dated before the loop began.
- System Restore rolls back system files, drivers, and registry — your personal files are untouched.
- If no restore points exist, this is a good reminder to enable System Protection once you are back up (System Properties > System Protection).
Fix 7: Reset with Keep my files, then clean install
- Go to Troubleshoot > Reset this PC > Keep my files. Choose Cloud download for fresh system files.
- If the reset fails (it can, on badly damaged systems), the final option is a clean install: create Windows 11 installation media on another PC from Microsoft’s Windows 11 download page
, boot from it, and install fresh — back up your files first via the recovery Command Prompt (
notepad→ File → Open gives you a file browser for copying to USB).
Closing
The SrtTrail.txt loop feels like a dead end because Automatic Repair keeps failing at the same wall — but the wall is usually just a corrupt BCD, and the rebuild in Fix 1 knocks it down in minutes. If you break out of the loop only to land on a blue screen naming a stop code like 0xc000021a, follow our 0xc000021a guide from there — that is progress, not a new disaster. Work the list in order, back up your data at the first successful boot (the loop can return if the drive is failing), and remember: SrtTrail.txt was never the error. It was just Windows taking notes while the real problem — the broken boot — waited for you to fix it manually. And if Automatic Repair itself keeps failing with the “couldn’t repair your PC” screen after the BCD rebuild, our Automatic Repair loop guide walks that specific loop in full.
