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.

  1. On the Automatic Repair screen, click Advanced options (not Restart).

  2. If you only see a blue screen, force-power-off twice during boot to reach recovery.

  3. Choose Troubleshoot > Advanced options — this is your base of operations.

  4. 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.

  1. Go to Troubleshoot > Advanced options > Startup Repair.

  2. Select your account and enter your password.

  3. Let it run to completion without interrupting.

  4. 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.

  1. Go to Troubleshoot > Advanced options > Command Prompt.

  2. Run bootrec /fixmbr and then bootrec /fixboot (if access denied, continue anyway).

  3. Run bootrec /scanos to find Windows installations.

  4. Run bootrec /rebuildbcd, confirm each found installation with Y, then type exit and 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.

  1. In the recovery Command Prompt, find your Windows drive letter with diskpart, list volume, exit (often D: here).

  2. Run sfc /scannow /offbootdir=D:\ /offwindir=D:\Windows using the correct letter.

  3. Then run chkdsk D: /f /r and let it complete — this takes a while.

  4. Type exit and 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.

  1. Go to Troubleshoot > Advanced options > Uninstall Updates.

  2. First try Uninstall the latest quality update.

  3. Restart and test. If still looping, return and try Uninstall the latest feature update.

  4. 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.

  1. Go to Troubleshoot > Advanced options > System Restore.

  2. Pick the most recent point from before the looping started.

  3. Complete the wizard and let it restart.

  4. 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.

  1. Open the recovery Command Prompt.

  2. Run bcdedit /set {default} recoveryenabled No.

  3. Type exit and choose Continue.

  4. 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.

  1. In the recovery Command Prompt, run diskpart, then list volume, and note the letters of your Windows partition and the EFI system partition.

  2. Assign the EFI partition a letter if it lacks one: select volume N, assign letter=S, then exit.

  3. Run bcdboot D:\Windows /s S: /f UEFI, replacing D: and S: with your actual letters.

  4. You should see ‘Boot files successfully created.’

  5. Type exit and choose Continue to boot.

  6. 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.

Frequently asked questions

What is SrtTrail.txt?
It’s the log file Automatic Repair writes while trying to fix your PC, located at C:\Windows\System32\Logfiles\Srt\SrtTrail.txt. Seeing its name on screen just means Startup Repair ran and failed — the log lists what it tried, which sometimes hints at the real problem, like a specific corrupt file.
Will I lose my files fixing the SrtTrail.txt loop?
The repairs in this guide — BCD rebuild, offline SFC, update uninstall, System Restore — don’t touch personal files. Only a clean Windows reinstall would, and that’s the last resort. Still, if the drive is failing, back up first via a bootable USB before any repair.
Why does Automatic Repair keep failing?
Usually because the Boot Configuration Data is corrupted in a way the automated tool can’t parse, or because disk errors block its file operations. The manual BCD rebuild and offline chkdsk in Fixes 3-4 succeed where the automation gives up.
How do I stop the Automatic Repair loop permanently?
Fix the underlying boot problem first — a loop that you merely suppress will return. The bcdedit command in Fix 7 stops the looping behavior for diagnosis, but treat it as a diagnostic step, not the fix. Re-enable recovery once the real cause is resolved.