You get a blue screen, Windows tries Automatic Repair, the repair fails, and you’re shown a log file path ending in SrtTrail.txt. Then it loops — repair, fail, loop — forever. This is one of the most frustrating Windows failure modes because the ‘repair’ that’s supposed to save you is the thing that’s stuck.
SrtTrail.txt is just the log of the failed repair; the real problem is whatever broke booting in the first place. Our SrtTrail reference explains the log; the escape sequence below gets you out of the loop. Start at Fix 1.
Why this happens
A corrupted Boot Configuration Data (BCD) store that Automatic Repair can’t rebuild by itself.
Damaged system files that the repair environment can’t replace automatically.
A recent Windows update or driver install that broke the boot chain.
Disk errors in the boot partition confusing the repair process.
BitLocker or third-party encryption blocking the repair’s access to the drive.
Multiple conflicting boot entries from dual-boot or cloned-drive setups.
How to fix it
Work through these in order, starting with Fix 1. Most of these crashes are resolved by one of the first three fixes, so don’t skip ahead.
Fix 1: Break the loop and open Advanced options
First, stop letting Automatic Repair run in circles. The Advanced options menu has the real tools.
On the Automatic Repair screen, click Advanced options (not Restart).
If you only see a blue screen, force-power-off twice during boot to reach recovery.
Choose Troubleshoot > Advanced options — this is your base of operations.
Don’t click Startup Repair again yet — it already failed; we do manual repairs first.
Fix 2: Run Startup Repair once more, properly
One manual run after breaking the loop sometimes succeeds where the automatic loop failed, since the environment is cleaner.
Go to Troubleshoot > Advanced options > Startup Repair.
Select your account and enter your password.
Let it run to completion without interrupting.
If it fails again, click Advanced options to return — and check the SrtTrail.txt log path it shows for clues.
Fix 3: Rebuild the BCD from Command Prompt
A corrupted Boot Configuration Data store is the most common root cause. These commands rebuild it manually.
Go to Troubleshoot > Advanced options > Command Prompt.
Run
bootrec /fixmbrand thenbootrec /fixboot(if access denied, continue anyway).Run
bootrec /scanosto find Windows installations.Run
bootrec /rebuildbcd, confirm each found installation with Y, then typeexitand choose Continue.
Fix 4: Run SFC and chkdsk offline
From the recovery Command Prompt you can scan the offline Windows installation for the file and disk damage that broke booting.
In the recovery Command Prompt, find your Windows drive letter with
diskpart,list volume,exit(often D: here).Run
sfc /scannow /offbootdir=D:\ /offwindir=D:\Windowsusing the correct letter.Then run
chkdsk D: /f /rand let it complete — this takes a while.Type
exitand choose Continue to attempt a normal boot.
Fix 5: Uninstall the breaking update
If the loop started right after an update, removing it from recovery often restores booting immediately.
Go to Troubleshoot > Advanced options > Uninstall Updates.
First try Uninstall the latest quality update.
Restart and test. If still looping, return and try Uninstall the latest feature update.
Once booting, pause updates so it doesn’t reinstall overnight. Our post-update crash guide covers the aftermath.
Fix 6: Use System Restore from recovery
A restore point from before the boot broke undoes the update, driver, or settings change that caused it.
Go to Troubleshoot > Advanced options > System Restore.
Pick the most recent point from before the looping started.
Complete the wizard and let it restart.
This doesn’t touch personal files. Full details are in our System Restore guide .
Fix 7: Disable automatic repair looping
If Windows is actually fine but keeps entering repair, disabling the auto-repair trigger stops the loop.
Open the recovery Command Prompt.
Run
bcdedit /set {default} recoveryenabled No.Type
exitand choose Continue.Windows will now boot normally or show the real error instead of looping — which tells you what to fix next. Re-enable later with
recoveryenabled Yes. Microsoft documents recovery options on their Windows support pages .
Fix 8: Rebuild the boot files with bcdboot
When bootrec’s rebuild stumbles, bcdboot rebuilds the entire boot environment from your Windows installation in a single command. It’s the heavier, more reliable sibling — and it succeeds where the older commands stall.
In the recovery Command Prompt, run
diskpart, thenlist volume, and note the letters of your Windows partition and the EFI system partition.Assign the EFI partition a letter if it lacks one:
select volume N,assign letter=S, thenexit.Run
bcdboot D:\Windows /s S: /f UEFI, replacing D: and S: with your actual letters.You should see ‘Boot files successfully created.’
Type
exitand choose Continue to boot.If it reports failure, double-check the letters with
diskpart— wrong letters are the usual cause.
Closing
The SrtTrail.txt loop feels like a dead end, but it’s just Automatic Repair failing at a job you can do manually: rebuilding the BCD, scanning the disk offline, or removing the update that broke things. Work from Fix 3 onward and most loops break within the hour. If nothing here restores booting and chkdsk shows a failing drive, stop and back up the data via a live USB — at that point it’s a hardware rescue, not a software repair. The bcdboot command is worth remembering by name — it rebuilds the whole boot environment from your Windows installation in one line. Between bcdboot, offline SFC, and System Restore, you now have three independent ways to break the loop; at least one works in nearly every case.
