Repair Windows Startup from Recovery Media: Startup Repair, bootrec and bcdboot in the Right Order — What Each One Changes and When to Stop
Your Windows will not start, and you are sitting in front of a recovery screen with several buttons and at least four commands that the internet tells you to run. The problem is that those tools act on different parts of the boot process, they have different scopes, and some of them only make sense on one boot architecture. Running them all, in any order, is how a fixable configuration problem becomes a messier one.
This guide walks the complete workflow from recovery media: confirm what you are actually repairing before changing anything, identify your firmware mode, Windows volume and partitions with read-only commands, run Startup Repair first and interpret its result honestly, then apply exactly one targeted operation — a specific bootrec switch or bcdboot — only when the diagnosis points at it. Every modifying command is separated from the diagnostics, every decision point has an explicit stop condition, and there is a clear line where boot repair ends and data preservation begins.
Prerequisites and safety notes
- A Windows PC that will not start normally — or one you are preparing ahead of time. The commands below run from the Windows Recovery Environment (WinRE), which is reachable three ways (section 4).
- Windows installation media or a recovery USB. A genuine Microsoft installation USB for your Windows edition works even when the built-in recovery partition is damaged; both routes are covered in section 4.
- Your BitLocker recovery key, if the drive is encrypted — written down or saved to your Microsoft account. Without it, an encrypted system volume cannot be inspected or repaired (section 3).
- A backup of anything you cannot lose. Boot repair writes to boot configuration and, in some paths, rewrites boot files. A verified copy of important data on another drive is what keeps a bad outcome survivable (section 3).
Read this before anything else
Nothing in this guide is guaranteed to repair your machine — no tutorial can promise that, and some boot failures are hardware problems that no command will fix. What the workflow does guarantee is that you change as little as possible, only after identifying what is actually broken, and that you always know where the line is between “try one more targeted repair” and “stop and protect the data” (section 12).
Start here
Scope and the quick decision: where does your failure actually sit?
This guide covers one situation in depth: a Windows 10 or 11 machine that no longer reaches the desktop, which you are repairing from recovery media — either by booting official installation media and choosing “Repair your computer”, or by forcing the built-in recovery environment. It is decision-driven rather than command-driven: each section ends with what to do next based on what you observed, not with a fixed list of things to run. If your machine powers on, posts, and simply misbehaves after login (crashes, slow starts, update failures), this is the wrong guide — that territory is covered by the Windows troubleshooting library.
Why the decision-first approach matters: “Windows won’t boot” hides at least four different failure classes, and they have different correct first moves. A missing BCD store wants a different repair than a corrupted system file after an update, which wants a different one than a failing drive. The tools overlap (bcdboot can fix things Startup Repair missed), but the order is not interchangeable: diagnostics that only read are always safe to run first; operations that rewrite boot records or boot files should be applied once, against a target you have positively identified, and re-tested before anything else changes.
Quick decision — what exactly do you see?
- “Windows Boot Manager” error, or “Operating System not found” The firmware cannot find a bootable configuration. This is the classic case for the full workflow: identify everything (section 5), try Startup Repair (section 6), then repair the boot configuration with the tool that matches your architecture (sections 7–9).
- “INACCESSIBLE_BOOT_DEVICE”, usually right after an update or driver change. The boot files are probably fine; something the kernel needs is not. Start with Startup Repair and the offline system-file checks in section 10 before touching any boot configuration at all.
- Repeated Automatic Repair loops (the machine restarts into “Preparing automatic repair” over and over). Treat each loop as evidence, not an event to repeat: run Startup Repair once, then diagnose from the command prompt with logs (sections 6 and 10).
- No disk or volume appears at all in recovery, or you hear clicking/grinding from the drive. Stop — this is likely storage failure, not boot configuration. Go straight to section 12 and protect the data before running anything that writes.
- You are preparing ahead of time (the machine works). Skip to section 3: get your BitLocker key down, make a known-good recovery USB, and keep both somewhere you will find them at 6 a.m. when the machine does not start.
One more boundary worth stating up front: this guide never asks you to format partitions, delete files from an EFI system partition you do not understand, rebuild partition tables, or run destructive disk operations. Where a repair path requires choosing between “repair” and “preserve data first”, the preserve-data path wins whenever there is any sign of storage trouble.
Foundation
What Windows startup recovery actually involves
Windows startup is a chain of hand-offs, and a “boot failure” is a break somewhere in that chain. On power-on, the firmware (UEFI or legacy BIOS) performs its own initialization, then hands control to the first boot code it can find: on a legacy MBR disk that is the master boot record, which locates the active partition’s boot sector; on a UEFI GPT system the firmware reads the partition table directly and loads \EFI\Microsoft\Boot\bootmgfw.efi from the EFI system partition. That first-stage code loads the Windows Boot Manager (bootmgr.exe on legacy systems, the bootmgfw component under UEFI), which in turn reads the BCD store — a small database of boot configuration entries — to learn which operating system loader to start and from which volume. Only then does winload load the kernel and Windows itself appears.
Every repair tool in this guide acts on a specific link of that chain, which is why “just run the boot commands” is not a strategy. Startup Repair attempts fixes across several links automatically and reports what it found. The bootrec switches act narrowly: /scanos only reads, /rebuildbcd rewrites entries in the BCD store, /fixmbr rewrites the master boot record (a legacy-architecture component), and /fixboot rewrites the boot sector of the system partition. bcdboot works at file level: it copies a fresh set of boot-environment files from your Windows installation to the system partition or EFI system partition and recreates the BCD store there. If you apply a tool to the wrong link — for example, rewriting an MBR that is not part of your boot path because the machine boots UEFI — you have changed something without fixing anything, and now two things are different from before.
The second prerequisite for safe repair is knowing which architecture you are on, because the chain looks different in the two cases. The table below lists the differences that actually change your repair procedure. You will verify your machine’s mode with read-only commands in section 5 — do not assume from the age of the computer; many machines from the UEFI era were deliberately configured to boot legacy, and a GPT disk with a protective MBR is not the same thing as an MBR disk.
Table D — What differs between UEFI/GPT and legacy BIOS/MBR
| Aspect | UEFI + GPT | Legacy BIOS + MBR |
|---|---|---|
| How the firmware finds the boot code | Reads the GPT partition table, looks for the EFI system partition (FAT32, typically 100–500 MB), loads \EFI\Microsoft\Boot\bootmgfw.efi | Executes the master boot record at the start of the disk; the MBR boot code finds the active partition and runs its boot sector |
| Where Windows boot files live | On the EFI system partition, under \EFI\Microsoft\Boot; the BCD store sits on that same partition | On the (usually small) active “system” partition under \boot, with the BCD store at C:\Boot\BCD on the Windows volume in most consumer layouts |
| Firmware boot entries | Stored in NVRAM; each OS is a named entry the firmware menu can list. bcdboot adds/updates the Windows entry and by default moves it to first position | No per-OS firmware entries; the MBR + active partition decide what runs, so a second OS’s bootloader (e.g. GRUB) often lives in the MBR itself |
| What bootrec /fixmbr does here | Nothing useful — the MBR on a GPT disk is only a protective record. Skip it; repair the ESP path instead | Rewrites the MBR boot code on the active partition (not the partition table). The standard fix for damaged MBR boot code |
| What bcdboot writes to by default | The EFI system partition identified by the firmware; also updates the NVRAM entry | The active partition on the primary disk, creating \Boot there |
| Typical failure signatures | “Windows Boot Manager” errors when the ESP is missing, unreadable or its files are corrupted; firmware may fall back to booting other media | “Operating System not found” / “Reboot and Select proper boot device” when the MBR or active-partition chain is broken |
| Repair implication | Identify the correct ESP before writing anything (section 5); use bcdboot for file-level rebuilds; never assume C: is the system partition | Confirm which disk/partition is active; /fixmbr and /fixboot are scoped to it; a multi-disk machine can have the active flag on a disk you did not expect |
Two consequences follow. First, the correct repair procedure is a function of your architecture: the legacy column of that table is essentially inapplicable to a UEFI machine, and bcdboot’s default target differs completely between the two. Second, “the system partition” is not always C: — under UEFI it is usually an unlettered or differently-lettered FAT32 volume that File Explorer will not even show you by default. Section 5 exists to establish both facts with read-only commands before any write operation happens.
Prepare
Preparation: backups, the BitLocker key, and recovery media that actually boots
Back up before you change boot configuration
Boot repair is low-risk compared with disk surgery, but it is not risk-free: the operations in sections 7–9 rewrite boot records, boot files or the BCD store, and on a machine whose underlying problem is storage degradation rather than configuration damage, any additional write activity makes data recovery harder. If you can still reach the desktop, copy what matters to an external drive now and verify the copy opens — the Back up your PC guide covers the mechanics. If Windows will not start at all, you still have options: WinRE includes a File Explorer (section 4) that can copy files to an external drive, and a Linux live USB mounts NTFS volumes read-only by default, which is the gentlest way to pull data off a machine you suspect of failing.
The practical rule: if the data on the machine would be genuinely painful to lose, get it off first, even if that means an hour of copying before any repair attempt. If the data is regenerable or already backed up, proceed — but know which case you are in, because section 12’s stop conditions depend on exactly that distinction.
Find your BitLocker recovery key before you need it
If the system drive is BitLocker-encrypted — standard on Windows 10/11 Pro and common on Home with device encryption — every repair tool in this guide hits a wall until the volume is unlocked. WinRE cannot see inside an encrypted volume, so bcdedit may show no usable entries, bootrec /scanos finds nothing, and bcdboot cannot read the source installation. The 48-digit recovery key is what unlocks it from WinRE; check now where yours lives: your Microsoft account’s devices page (when the device was signed in), a printed copy or file you were shown at activation, or an Active Directory attribute if this is a work machine. If you cannot find it and the volume is encrypted, that fact changes the plan — section 12 explains why.
Use recovery media you can trust
There are two routes into WinRE, and they are not equivalent in reliability. The built-in recovery partition is convenient but lives on the same disk you are trying to repair — if that disk is failing, so is your access to recovery. Official Windows installation media (a USB created with Microsoft’s Media Creation Tool) boots independently of the internal disk and offers “Repair your computer”, which lands in the same WinRE command prompt. The Create a bootable USB guide walks through making one, including verifying the download before writing it. For this workflow, prefer installation media: it also gives you access to the full set of recovery options even when the local recovery partition is damaged or missing.
Keep the machine powered and stable during writes
bcdboot and the bootrec write operations copy files and update configuration; an interrupted write can leave a half-written BCD store. Keep a laptop plugged in, do not power-cycle the machine while a command is running, and if a command appears stuck for many minutes, let it finish rather than forcing a shutdown.
Prepare
Entering WinRE and opening the recovery command prompt
The Windows Recovery Environment is a minimal Windows that runs from memory or a recovery partition, with its own set of tools: Startup Repair, System Restore, an offline SFC/DISM, and — the workhorse for this guide — a command prompt. You need the command prompt even when you start with Startup Repair, because interpreting what happened (and what to do next) happens there. Three entry points, in order of preference:
- Boot from installation media. Insert the USB, boot from it (your firmware’s boot menu — commonly F8, F11, F12 or Esc at power-on), and on the setup screen choose Repair your computer instead of Install. Then: Troubleshoot > Advanced options. This route works even when the internal disk’s recovery partition is damaged.
- Force Automatic Repair. If you cannot get to a boot menu or media: at the “Starting Windows” spinner, hold the power button until the machine is off, and repeat this two more times. On the next start, Windows enters “Automatic Repair”, which leads to Troubleshoot > Advanced options. This uses the local recovery partition.
- Advanced startup from Settings (only if you can still reach the desktop): Settings > System > Recovery > Advanced startup > Restart now. Then the same Troubleshoot path.
Two things to expect at this stage. First, if the drive is encrypted you will be asked for the BitLocker recovery key before or during these steps — that is normal, and it is why section 3 put finding the key first. Second, once inside WinRE the drive letters you remember from normal Windows are probably wrong: the recovery environment reserves C: for its own use, so your Windows installation is commonly D: or E:. Never type a drive letter from memory in this environment — section 5 identifies each one with evidence.
Prepare
Identifying the firmware mode, the Windows volume, and the relevant partitions
This section is all read-only: every command below only inspects. Write down (or photograph) three facts before any repair step — your firmware mode, the letter of your Windows volume in WinRE, and the identity of your system partition or EFI system partition. Every later decision in this guide branches on these facts, and they are exactly the things people get wrong when they type from memory.
Step 1 — Confirm the firmware mode
Open Command Prompt from Advanced options and run:
bcdedit /enum firmware
Shows the “Windows Firmware” entry. A device path ending in \EFI\Microsoft\Boot\bootmgfw.efi means the machine boots UEFI. A legacy (BIOS/MBR) system shows a different device reference with no EFI path.
Cross-check with the disk layout, because firmware mode and partition style should agree: in diskpart, list disk followed by detail disk on your Windows disk reports the partition style — GPT or MBR. A UEFI-booted machine expects GPT; an MBR-style disk with a Windows installation is almost certainly legacy-booting (a GPT disk can be booted only through special hybrid setups that are rare on consumer PCs). If the two checks disagree, stop and re-examine before proceeding — that mismatch usually means you are looking at the wrong disk or a machine with an unusual configuration, and guessing from here is how dual-boot systems get broken.
Step 2 — Find your Windows volume’s real letter
The most reliable pointer is the BCD store itself: in its Windows Boot Loader section, the osdevice line names the volume that holds the operating system. If the BCD store is damaged (which may be part of your problem), fall back to listing each drive’s top-level folders — the Windows installation is the one with both a Windows and a Program Files directory.
bcdedit
dir D:\
dir E:\
In bcdedit output, find “Windows Boot Loader” and read the osdevice line (e.g. device partition=D:). The dir commands confirm which letter actually contains \Windows and \Program Files. Check every letter you have — on multi-disk machines the Windows volume is not always D:.
Step 3 — Identify the system partition or EFI system partition
This is the partition that bcdboot will write to by default, so it deserves its own careful identification. In diskpart, list volume shows every volume with its file system, size and label. On a UEFI machine you are looking for the EFI system partition: FAT32, typically 100–500 MB, often labelled “System” or left unlabelled, type shown as “EFI System”. On a legacy machine it is a small NTFS volume marked Active. Note its volume number and letter (assign one with assign letter=S in diskpart if it has none — assigning a letter changes nothing on disk, it only gives you a handle for inspection).
diskpart
list volume
detail disk 0
exit
Run each line inside diskpart, one at a time. On multi-disk machines, run detail disk for every disk that could hold Windows — the EFI system partition and the Windows partition are usually on the same physical disk, and that pairing is itself a useful confirmation.
Step 4 — Check encryption state
Finally, check whether any volume you plan to touch is locked. If the Windows volume shows as locked, nothing downstream will work until it is unlocked with the recovery key from section 3.
manage-bde -status
Lists every volume with its encryption percentage and lock state. “Lock State: Unlocked” means you can proceed; “Locked” means the next command is the unlock below.
manage-bde -unlock D: -RecoveryPassword 000000-000000-000000-000000-000000-000000-000000-000000
Replace D: with your Windows volume letter from step 2 and the dashes-and-zeros with your real 48-digit recovery key. Unlocking changes only the lock state — no data is modified. If you do not have the key, do not proceed to write operations; see section 12.
Never guess the target on a multi-disk machine
If diskpart shows more than one disk that could plausibly hold Windows — two NTFS volumes with \Windows folders, an old drive left in the case, a second ESP from a previous OS — stop and establish which installation you actually want to repair before any write command. Repairing the wrong target does not just fail: it can break the boot of the system you meant to leave alone. When in doubt, section 12’s preserve-data path is the correct next move.
Repair
Running Startup Repair — and reading its result honestly
Startup Repair is the automated first attempt, and it deserves that slot for a specific reason: it is safe to run without knowing the diagnosis. From WinRE it is reached via Troubleshoot > Advanced options > Startup Repair > Restart. It scans the machine and attempts to fix common startup problems automatically — per Microsoft’s documentation, missing or damaged system files, corrupted boot configuration data (BCD), a damaged master boot record, incompatible drivers and registry errors. If your device is encrypted, it will ask for the BitLocker recovery key before it can work, which is one more reason section 3 put finding that key first.
The important habit is in how you read the outcome. A success message followed by a machine that actually reaches the desktop means you are done — verify over the next few reboots (section 10) and stop making changes. The far more common outcome on a genuinely broken system is “Startup Repair could not repair your PC”, and that message is not a verdict that nothing can be done: it is the tool telling you its automated passes did not cover your specific failure, and pointing you to the command prompt for manual options. That is precisely where this guide takes over. What you should not do is run Startup Repair again and again expecting a different result — without new information between attempts, it will do the same work and reach the same conclusion.
One nuance worth keeping: Startup Repair’s scope includes things you cannot see from the command prompt, and its failure report is stored on the Windows volume at \Windows\System32\Logfiles\STARTUP.REP. If you have already completed section 5, open that file after a failed run (it may be empty or absent on some builds — treat it as evidence when present, not as something that must exist). It can name the specific component the tool flagged, which sharpens your choice between the bootrec and bcdboot paths in the next sections.
From here the workflow branches on what section 5 established. If Startup Repair failed (or you chose to skip it because your symptoms already pointed at system files rather than boot configuration), go to the command prompt and start with the read-only diagnostics in section 7 before applying anything.
Repair
The bootrec commands, one by one: what each switch actually does
bootrec is WinRE’s repair tool for the boot environment, and its four switches are routinely misused as a single incantation. They are not one operation: two of them only read, and the other three write to different components with different scopes — and two of the writing switches are essentially meaningless on UEFI systems. The table below separates orientation (read vs modify) from effect, so you can see at a glance which commands are safe to run first and which commit a change.
Table B — bootrec command reference
| Command | Orientation | What it actually does | Scope / limits |
|---|---|---|---|
bootrec /scanos | Read-only diagnostic | Scans disks for Windows installations and reports what it finds, changing nothing. Run it first in the bootrec family so you know whether the tool can see your installation at all. | Its output is a clue, not a verdict: “0 windows installations found” can mean a wrong drive letter, a locked (encrypted) volume, a damaged filesystem or a genuinely missing install. Interpret it with section 5’s evidence before concluding anything. |
bootrec /rebuildbcd | Modifying — BCD store | Searches for Windows installations and adds entries for them to the BCD store, so the boot manager can offer them at startup. This is the core fix for a missing or incomplete boot configuration entry. | It adds entries rather than wholesale-replacing the store; it needs write access to the BCD store and visibility of the installation (what /scanos checks). On UEFI systems where the store itself is gone, bcdboot (section 8) is usually the more complete repair. |
bootrec /fixmbr | Modifying — master boot record | Rewrites the master boot record’s boot code on the active partition. It does not touch the partition table or any data. | Legacy BIOS/MBR only. On UEFI/GPT systems the MBR is a protective record that is not part of the boot path — skip this switch entirely there (section 2, Table D). |
bootrec /fixboot | Modifying — system partition boot sector | Writes a new boot sector to the active system partition, replacing a damaged one. | Fails with “Access is denied” when the volume is write-protected or BitLocker-locked (unlock first, section 5), and it is not the right tool for most UEFI failures, where the boot files live on the EFI system partition and bcdboot is the file-level repair. |
The pattern to internalize: /scanos tells you what can be seen; /rebuildbcd, /fixmbr and /fixboot each change one specific component. A sound sequence on a legacy machine is scan → rebuild the entry if missing → fix the MBR or boot sector only if the evidence points there. On UEFI, the honest reading of that table is that /scanos is your diagnostic and bcdboot (next two sections) is usually your repair.
/scanos — the safe first step
bootrec /scanos
A successful result looks like “Windows found at [D:\]” (with your actual volume letter) or a count of one or more installations. That is useful confirmation that the BCD tooling can see your installation and know where it lives. A zero-result output does not prove Windows is gone — it proves this tool, in this state of the system, could not find it. The usual causes are an encrypted volume that is still locked, a filesystem that needs checking, or a BCD store so damaged that the scan has nothing to work against. Re-run section 5’s checks in that case (especially the BitLocker status), and run a filesystem check on the Windows volume before concluding the installation is missing.
/rebuildbcd — restore missing boot entries
bootrec /rebuildbcd
If it finds an installation, it will ask for confirmation to add it to the startup list — answer yes. A success message followed by a working boot means the missing entry was the problem and you are done (verify per section 10). If it reports that no Windows installations were found, do not keep retrying: that output is the same signal as /scanos’s zero result, and the correct response is to go back to section 5 (encryption state, volume letter, filesystem check) or, if the BCD store itself is absent or unreadable, to the bcdboot path in section 8, which recreates the store rather than adding entries to it.
/fixmbr — legacy MBR boot code only
bootrec /fixmbr
This is the standard fix when a legacy machine’s MBR boot code is damaged — for example after a partitioning tool or an old OS install overwrote it. It rewrites only the boot code, not the partition table, so your partitions and data are untouched by the operation itself. Two cautions: on a UEFI/GPT machine it has no useful job and should simply not be run; and on a legacy dual-boot machine whose Linux bootloader occupies the MBR (common with older GRUB installs), rewriting it will remove that first stage — which is exactly the scenario topic of a dedicated dual-boot recovery article, and a reason to validate your target carefully before writing.
/fixboot — the system partition’s boot sector
bootrec /fixboot
A clean success on a legacy machine with a damaged boot sector is one of the more satisfying fixes in this workflow. The well-known failure is “Access is denied”, which has two common causes: the volume is locked (BitLocker — unlock it per section 5 and retry) or, on UEFI systems, the command is aimed at a component that is not where your boot path actually runs. On UEFI machines the practical equivalent of this repair is bcdboot copying fresh boot files to the EFI system partition (section 9), so treat /fixboot’s failure there as a signal to switch tools rather than to fight permissions.
Repair
Determining whether BCDBoot is the appropriate tool
bcdboot is the file-level repair: it copies a complete, known-good set of boot-environment files from a Windows installation you specify to the system partition (legacy) or EFI system partition (UEFI), and creates the BCD store there using the BCD template inside that same installation. Microsoft documents it for exactly this kind of situation — a corrupted or missing system partition being rebuilt from new copies of the files on the Windows partition, and boot-menu repair on dual-boot machines. It is the strongest non-destructive repair in this guide, which is also why its source and target choices deserve a deliberate decision rather than a default.
Bcdboot is the right tool when the evidence points at the boot files or the BCD store itself: “Windows Boot Manager” errors on a UEFI machine whose EFI system partition contents are missing, damaged or inconsistent; a legacy machine where /fixmbr and /fixboot have not resolved the failure; or a rebuilt/reinstalled Windows that simply never got its boot environment set up. It is not the right tool when the problem is elsewhere in the chain — a corrupted system file after an update (section 10’s offline SFC/DISM), a failing disk (section 12), or a missing installation entirely. Running bcdboot against a healthy-but-unrelated configuration to “see if it helps” rewrites boot files and, on UEFI, the firmware’s NVRAM entry, so you have changed the system without addressing the cause.
Choosing the source
The source is the Windows directory of the installation you want to boot — D:\Windows in the examples below, where D: is whatever your verified Windows volume letter actually is (section 5). Bcdboot reads its boot files and BCD template from that installation, so a wrong source means a wrong repair: pointing it at an old Windows folder on a second disk rebuilds the boot environment for an installation you may not even want. If section 5 left any ambiguity about which volume is the one you intend, resolve it before this step.
Choosing the target — and why the defaults are usually right
By default, bcdboot writes to the system partition identified by the firmware: on UEFI that is the EFI system partition (it copies the files under \Efi\Microsoft\Boot, creates the BCD store there, and adds or updates the Windows entry in the firmware’s NVRAM boot list, placing it first by default), and on legacy systems the active partition (creating \Boot). For a single-Windows machine whose firmware mode you confirmed in section 5, that default is exactly what you want — no extra switches needed. The explicit options exist for situations that are not yours unless they match:
/s <volume>overrides the target partition. Microsoft’s reference is blunt that this option “should not be used in typical deployment scenarios” — it is for configuring a drive that will boot on another computer, or a deliberately chosen secondary system partition. If you use it, the volume must be one you positively identified in section 5; pointing it at another disk’s EFI partition (a second OS, an old drive) rewrites that system’s boot environment. Note also that with/son UEFI, no NVRAM firmware entry is created — the firmware is left to find the files by its default search path./f <UEFI|BIOS|ALL>forces the firmware type of the files written. It requires/s, and using a value that does not match the machine’s actual boot architecture produces a configuration that cannot boot. If you are confident about the firmware mode (section 5), the default already matches it — forcing is for building media, not for repairing the machine in front of you./ppreserves the existing position of the Windows Boot Manager entry in the UEFI boot order instead of moving it to first. On a dual-boot machine where another OS must stay first (or where you want the firmware menu unchanged), this is the switch that keeps bcdboot from reordering your boot list./venables verbose output — worth adding on first runs, because it names each file being written and makes failures easier to place.
One more behaviour matters for multi-installation machines: when bcdboot creates the new BCD store, an existing boot entry for the same Windows partition is replaced by default (its values are not carried over unless you pass /m), while entries for other installations are preserved on current Windows versions. That is generally the behaviour you want — your intended installation gets a clean entry, the others survive — but it means the operation is still a change to a shared configuration, and the pre-flight validation in section 9 is what keeps that change scoped to the right target.
Repair
Rebuilding the boot files — only after validating source and target
This section is the write step, so it begins with a gate: do not run bcdboot until each item below is true for your machine. The commands are short; the validation is what makes them safe.
- Source validated. You know the Windows volume letter (section 5, step 2) and it contains the installation you intend to boot — confirmed by
dir, not assumed. - Target identified. You know which partition is the system partition (legacy) or EFI system partition (UEFI) from diskpart’s file system, size and label (section 5, step 3) — and on multi-disk machines you are certain it belongs to this installation’s disk.
- Firmware mode confirmed (section 5, step 1), so the default target behaviour matches your machine. If you intend to pass
/s, you have a specific reason and the volume is positively identified. - Encryption resolved. The Windows volume is unlocked (section 5, step 4); a locked source cannot be read by bcdboot.
- Backup decision made (section 3): important data is copied off, or you have consciously accepted the risk for regenerable data.
All five true? Run the rebuild. Replace D: with your verified Windows volume letter; add /v for verbose output on a first run:
bcdboot D:\Windows /v
On UEFI systems this writes to the EFI system partition and updates the firmware boot entry; on legacy systems it writes \Boot to the active partition. Success output names the Windows Boot Manager path and reports that boot files were created successfully.
Read the output before rebooting. A clean result lists the boot manager location (something like X:\EFI\Microsoft\Boot\bootmgfw.efi on UEFI or X:\bootmgr on legacy) and confirms the files were created. If it reports an error instead — access denied, a missing item, a volume problem — stop and interpret it with section 13 rather than retrying blindly; most bcdboot failures point back at one of the five gate items (locked volume, wrong letter, target partition issue).
bcdedit /enum all
dir S:\EFI\Microsoft\Boot
First command: the BCD store now lists a Windows Boot Loader entry with an osdevice pointing at your installation. Second command (UEFI; S: is the EFI system partition letter you assigned in section 5 — use your actual letter, and on legacy systems list the \Boot folder of the active partition instead): bootmgfw.efi, winload.efi and the BCD store are present. Both checks passing means the configuration is structurally sound; the reboot test in section 10 is the final word.
If the auto-detected target looks wrong, do not force it
On machines with multiple disks or a previous operating system, bcdboot’s default target is the one identified by the firmware — usually correct, but verify against section 5 before assuming. If you cannot positively identify which EFI partition belongs to this installation, stop: forcing /s at a guessed volume is how a second OS gets its boot environment overwritten. The safe path is section 12 (preserve data) plus a cleaner diagnosis of the disk layout.
Verify & stop
Testing the result and interpreting what a failure means
The only real test is a reboot — and the first practical detail is to remove the installation media before restarting, or the machine will simply boot from the USB again and you will have tested nothing. A successful repair looks like this: the firmware finds the Windows Boot Manager (UEFI) or MBR chain (legacy), the OS loader starts, and you reach the desktop without returning to Automatic Repair. Give it a few reboots and a normal day of use before declaring victory — some corruption (a half-written file, a bad driver) only reveals itself under load.
If the machine still fails to start, the failure itself is now more informative than it was an hour ago, because you know which components are structurally sound. Work through the evidence in order: first, re-run bcdedit /enum all and confirm the store still lists your installation with a sensible osdevice — if the entry vanished or changed after a write operation, that operation did not land where you expected. Second, check the boot files exist where section 2 says your architecture expects them (the verification block in section 9). Third, look at the Startup Repair report (\Windows\System32\Logfiles\STARTUP.REP on the Windows volume) if the machine passed through Automatic Repair — it may name the specific component that is failing. Only when the boot configuration checks out and the machine still cannot start should you conclude the problem sits deeper, in the operating system files themselves.
That deeper case has its own standard repair: offline system-file checks against the Windows volume. These are modifying operations (they replace corrupted system files from the component store), but they are scoped to the OS installation and do not touch boot configuration:
sfc /scannow /offbootdir=D:\ /offwindir=D:\Windows
DISM /Image:D:\ /Cleanup-Image /RestoreHealth
Run SFC first, then DISM, both from the WinRE command prompt. If either reports that it found and repaired corrupted files, reboot and re-test before moving on. Microsoft’s WinRE startup-troubleshooting guidance follows this same order: identify the volume, check disk, run offline SFC, then DISM.
If the machine boots now, finish with section 15’s checklist and stop making changes. If it still does not boot after a clean boot-configuration verification plus system-file repair, you have exhausted the safe command-line path: the remaining explanations are storage failure, hardware, or a configuration problem that needs more information than this environment provides. That is section 12’s territory — and reaching it with evidence in hand (what you checked, what passed, what failed) is exactly the state you want to be in before escalating.
Verify & stop
The consolidated repair decision tree
Everything so far is also available as a single symptom-to-action map. Use it when you are mid-repair and want to confirm you are on the right branch, or when a new error appears and you need to re-orient. The “when to stop” column is part of the decision, not an afterthought: each row names the condition under which further command-line repair should give way to data preservation.
Table C — Symptom-to-next-action matrix
| Symptom | Safe initial checks (read-only) | What the result may indicate | Appropriate next step | When to stop |
|---|---|---|---|---|
| “Windows Boot Manager” error at power-on | bcdedit /enum firmware (section 5); list the EFI system partition contents on UEFI | BCD store missing or corrupted, or boot files absent from the EFI system partition | Startup Repair (section 6), then bcdboot rebuild (sections 8–9) | If no Windows volume is found at all → section 12 |
| “Operating System not found” / “Reboot and select proper boot device” | Firmware mode check; diskpart: which disk, which partition is active | Damaged MBR boot code or system-partition boot sector (legacy path) | /scanos, then /fixmbr and/or /fixboot in that order (section 7) — legacy machines only | If the disk is not detected by firmware/diskpart → section 12 |
| INACCESSIBLE_BOOT_DEVICE, typically after an update or driver change | Startup Repair report; bcdedit /enum all (is the entry intact?) | Corrupted system files or a bad driver filter — boot configuration is usually fine | Startup Repair, then offline SFC + DISM (section 10); do not rewrite boot files first | Two failed repair loops with no new evidence → section 12 |
| Repeated Automatic Repair loop | Each loop is a data point: check STARTUP.REP log, recent changes (updates, drivers), disk health | Corrupted files, failing driver, or underlying storage trouble | Run Startup Repair once (section 6), then diagnose from the command prompt (sections 5, 10); consider System Restore from Advanced options if a restore point predates the failure | If loops continue after two full diagnostic passes → section 12 |
bootrec /fixboot: Access is denied | manage-bde -status; confirm firmware mode | Locked (BitLocker) volume, write protection, or a UEFI machine where this is the wrong tool | Unlock the volume and retry (section 5); on UEFI, switch to the bcdboot path (sections 8–9) | If you do not have the recovery key → section 12 (protect data, retrieve the key) |
bootrec /scanos: 0 windows installations found | Re-verify the Windows volume letter (dir each drive); BitLocker status; plain chkdsk D: (status only) | Wrong letter, locked volume, damaged filesystem — or a genuinely missing installation | Fix the identified cause and re-run /scanos; if the filesystem is damaged, run chkdsk D: /scan, then reassess | If the volume is unreadable or chkdsk reports unrepairable errors → section 12 |
| Windows partition visible in recovery but machine still will not boot | bcdedit /enum all; boot files present where expected (section 9 verification) | Boot-configuration failure (fixable here) versus OS-level corruption or storage failure | Follow sections 7–10 in order; the configuration checks tell you which side of that line you are on | If configuration is verified sound and offline SFC/DISM did not help → section 12 |
| No disk or volume visible at all, or clicking/grinding noises | Firmware boot menu: does the disk appear? diskpart list disk | Storage failure (physical or controller) — not a boot-configuration problem | Stop. Preserve data: image the disk or copy files from another machine/OS (section 12) | This row is itself a stop condition |
Notice what the matrix does not contain: no row says “run all four bootrec commands and bcdboot until one works.” Each symptom has one or two sensible next moves, and every row knows when to stop. If your situation does not match any row, the honest answer is that you need more information than a symptom table can provide — gather the read-only evidence from section 5, and treat that as your diagnostic record.
Verify & stop
When to stop repairing and start protecting the data
Every repair command in this guide is a write to a machine that is already not working. That is acceptable while the evidence says the problem is configuration — writes are how you fix configuration. It stops being acceptable the moment there is any sign that the storage itself, or your ability to identify the right target, is in question, because then each additional write attempt raises the cost of a recovery you may still need. The stop conditions are explicit so the decision does not depend on nerve:
- Signs of storage failure. Clicking or grinding from a drive, a disk that disappears between firmware and diskpart, volumes reporting wrong sizes or 0 MB, or chkdsk reporting errors it cannot repair. These point at hardware or filesystem collapse, where the correct next step is preservation, not repair.
- Two full diagnostic-and-repair loops without new evidence. If you have identified everything (section 5), applied the targeted repair the diagnosis indicated, verified (sections 9–10), rebooted, and are back at the same failure with nothing newly observed, repeating the loop is not a strategy. More information (logs, manufacturer diagnostics, another environment) is the next requirement.
- An encrypted volume without its recovery key. You cannot inspect or repair what you cannot read, and guessing does not exist — BitLocker’s whole design makes the key the gate. The correct moves are retrieving the key (Microsoft account, printed copy, IT department) or, if it is truly unrecoverable, treating the data as lost and planning around that.
- A multi-OS or multi-installation machine where you cannot positively identify the intended target. Repairing the wrong configuration can break a system that was working. Until section 5’s evidence leaves no ambiguity, the safe action is to stop writing.
When a stop condition applies, the workflow changes from repair to preservation, in this order: first, get an image of the affected disk if you can (disk-imaging tools run from another bootable environment, or by connecting the drive to a working machine — an image is your safety net for everything that follows); second, copy the specific files that matter via WinRE’s File Explorer or a Linux live USB mounted read-only; third, only then decide between a clean reinstall (the Install Windows 11 from a USB drive guide covers it) and professional data-recovery service, which is worth the cost for data that cannot be replaced. A working system you rebuilt is replaceable; the only truly irreplaceable thing on a failing machine is the data on it.
Escalation is not failure. If you stop here with a clean diagnostic record — firmware mode, volume letters, partition layout, what each repair attempt changed, and what the machine still does wrong — you have done the maximum that safe command-line work allows, and you hand the next person (a friend with more hardware knowledge, a repair shop, Microsoft support) exactly the information they would otherwise spend an hour re-deriving.
Verify & stop
Common errors and their diagnostic meanings
Error text is the machine telling you where it thinks the break is. The table below maps the messages you are most likely to meet in this workflow to what they usually mean and the safe next move — as a lookup, so you can re-orient without re-reading whole sections.
| Message you see | What it usually indicates | Safe next step |
|---|---|---|
| “Startup Repair could not repair your PC” | The automated passes did not cover this failure — a normal outcome on a real configuration problem, not proof nothing can be done | Command-prompt diagnostics from section 5 onward; check the STARTUP.REP log for specifics |
| “Windows Boot Manager” (error screen at power-on) | The firmware found a boot manager but its configuration (BCD store) or files are missing/corrupted — UEFI systems most often | Verify the EFI system partition contents (section 9), then bcdboot rebuild (sections 8–9) |
| “INACCESSIBLE_BOOT_DEVICE” | The OS started loading but cannot reach its own volume — corrupted system files, a bad driver filter, or storage trouble | Startup Repair, then offline SFC + DISM (section 10); check disk health before further writes |
bootrec /fixboot: “Access is denied” | The target volume will not accept writes: BitLocker lock, write protection, or a UEFI machine where this switch targets the wrong component | manage-bde -status and unlock (section 5); on UEFI, use the bcdboot path instead |
bootrec /scanos: “Total windows installations found: 0” | The scan could not see an installation: wrong drive letter, locked volume, damaged filesystem, or missing install | Re-verify the volume letter and encryption state (section 5); plain chkdsk D: for status; then chkdsk D: /scan if damage is suspected |
bootrec /rebuildbcd: “0 windows installation(s) found” | Same signal family as above, plus the possibility that the BCD store itself is absent or unreadable | Do not retry blindly: fix the identified cause, or move to bcdboot, which recreates the store (section 8) |
| bcdboot: “Access is denied” | The source or target volume will not be read/written — typically a locked BitLocker volume or a protected partition | Check the five gate items in section 9, starting with encryption state and volume letters |
| bcdboot succeeded, but the machine still does not boot | The files are in place but something else gates the boot: firmware boot order pointing elsewhere, architecture mismatch, or OS-level corruption below the boot layer | Check the firmware’s boot order (UEFI setup), confirm the architecture matches section 5, then section 10’s system-file path |
| BitLocker recovery screen asking for a 48-digit key at boot | The firmware/TPM state changed enough that the drive will not auto-unlock — common after certain repairs, updates or hardware changes | Enter the recovery key from section 3. Without it, no repair tool can proceed — retrieve the key first (section 12) |
If your message is not in this table, resist the temptation to pattern-match it to the closest row. The reliable move is the same one everywhere in this guide: gather the read-only evidence (firmware mode, volume letters, BCD contents, boot-file locations), identify which link of the chain from section 2 the failure sits at, and apply only the operation scoped to that link.
Reference
Frequently asked questions
Can I run bootrec or bcdboot from a normal Windows command prompt?
No — for this repair workflow you should run them from the Windows Recovery Environment (WinRE) command prompt. The tools are built to operate on an offline installation: they read and write the boot configuration of the volume you point them at, which is exactly what you want when that Windows will not start. Running bcdboot inside a working Windows targets the live system and is a different operation with different risks.
Is it safe to run all four bootrec commands in order?
No. /scanos only reads, but /rebuildbcd, /fixmbr and /fixboot each change part of the boot environment, and they have different scopes: /fixmbr and /fixboot are meaningful on legacy BIOS/MBR systems, while most UEFI/GPT repairs belong to bcdboot. Run the diagnostic first, read its result, and apply only the specific operation that matches what you found.
My computer is UEFI — do I still need bootrec /fixmbr?
No. On a UEFI/GPT system the firmware reads the partition table and loads the Windows Boot Manager from the EFI system partition; the MBR on the disk is only a protective record. Repairing that path means checking the boot files and BCD store on the EFI system partition — typically with bcdboot — not rewriting the master boot record.
Will bcdboot delete my Linux boot entry in a dual-boot setup?
On UEFI systems, bcdboot adds or updates the Windows firmware (NVRAM) boot entry and by default places it first in the firmware boot order; it does not remove other entries, and GRUB’s own files on their partitions are untouched. On legacy BIOS/MBR systems the situation is more fragile: rewriting the master boot record can overwrite the first stage of a Linux bootloader, which is why dual-boot machines need extra target validation before any write operation.
Do I have to run chkdsk before attempting boot repair?
Not routinely. Run a filesystem check when there is evidence of filesystem trouble — for example, a volume that is visible but unreadable, or repeated boot failures after checking the boot configuration. A plain chkdsk D: with no parameters only reports status and changes nothing; chkdsk D: /scan performs the full scan and repairs what it finds. If the check reports unrepairable errors, stop boot-repair work and preserve your data first.
Startup Repair said it fixed the problem but Windows still will not start. What now?
Trust the reboot test over the message: if the machine does not reach the desktop, treat the repair as unsuccessful. Go back to the command-prompt diagnostics — confirm the firmware mode, re-identify the Windows volume, inspect the BCD store with bcdedit, and check that the boot files exist where your firmware mode expects them. The Startup Repair report on the Windows volume (C:\Windows\System32\Logfiles\STARTUP.REP) can also tell you what it found.
Reference
Final verification checklist
Work through this list before and after your repair. Your progress is saved on this device.
Before you change anything
After the repair
Reference
Further reading and references
Related guides on this site
Technical references
- Microsoft Support — Startup Repair: what the tool checks, how to reach it, and its BitLocker key requirement.
- Microsoft Learn — BCDBoot Command-Line Options: bcdboot’s file behaviour, NVRAM handling, and the /s, /f, /p, /v, /m, /d, /c parameters.
- Microsoft Learn — bcdboot (Windows Commands): syntax and the default system-partition behaviour.
- Microsoft Learn — Use WinRE to troubleshoot common startup issues (KB 4026030): entering WinRE from installation media, finding the system volume with bcdedit, and offline chkdsk/SFC/DISM.
- Microsoft Learn — Windows startup issues troubleshooting: the scanos → rebuildbcd sequence and restoring from a BCD backup.
- Microsoft Learn — MBR2GPT: the MBR/GPT and UEFI/BIOS partitioning context behind Table D.
- Microsoft Learn — diskpart: the volume and disk inspection commands used in section 5.
- Microsoft Learn — manage-bde: BitLocker status and unlock from the command line.