sodcalculator

10 Tech How-To

Fix Windows 10 Boot Errors with Command Prompt

Guide 10-44421 · Updated · Step by step

When Windows 10 won’t start, the built-in Command Prompt in the recovery environment can repair boot files, fix partition issues, and restore the bootloader. This guide walks you through the essential commands to diagnose and resolve common boot errors like “Bootmgr is missing,” “INACCESSIBLE_BOOT_DEVICE,” or a black screen after startup.

What You’ll Need

  • A Windows 10 installation USB drive or recovery drive (you can create one on another PC).
  • Access to the PC that won’t boot.
  • Basic familiarity with typing commands, but no prior experience required.

Step-by-Step

  1. Boot from the installation media. Insert the USB drive, restart the PC, and press the key to open the boot menu (often F12, F2, Esc, or Del, depending on the manufacturer). Select the USB drive and press Enter.
  2. Open the recovery environment. When the Windows Setup screen appears, click “Next,” then click “Repair your computer” in the bottom-left corner. Choose “Troubleshoot” → “Advanced options” → “Command Prompt.”
  3. Identify the Windows drive letter. In the Command Prompt, type diskpart and press Enter. Then type list volume and press Enter. Look for the volume labeled “System Reserved” or the one with the Windows folder (usually C: but it might be D: or E: in the recovery environment). Note the drive letter. Type exit to leave DiskPart.
  4. Run Bootrec commands. Type the following commands one by one, pressing Enter after each. These rebuild the boot configuration data (BCD) and repair the master boot record:

    bootrec /fixmbr
    bootrec /fixboot
    bootrec /scanos
    bootrec /rebuildbcd
    If you get an “Access is denied” error on /fixboot, it’s often because the System Reserved partition isn’t mounted. Skip to step 5.
  5. If /fixboot fails, rebuild the BCD manually. Type these commands, replacing C: with the actual Windows drive letter you found in step 3:

    bcdedit /export C:\BCD_Backup
    ren C:\boot\bcd bcd.old
    bootrec /rebuildbcd
    If “ren” fails because the file is missing, just run bootrec /rebuildbcd.
  6. Check for disk errors. Run chkdsk /f /r C: (replace C: with your Windows drive). This scans for file system corruption and bad sectors. It may take a while and might ask to dismount the volume—type Y and press Enter.
  7. Repair the partition table (if needed). If you suspect partition issues, type diskpart, then list disk, select disk 0 (or the disk with Windows), then list partition. Look for the partition marked “System” (usually 100-500 MB). If it’s there, continue; if not, you may need to recreate it—but that’s advanced and should only be done if you’re confident.
  8. Exit and restart. Type exit to close Command Prompt, then click “Continue” or “Restart” on the recovery screen. Remove the USB drive and let Windows boot normally.

Common Mistakes

  • Using the wrong drive letter. In the recovery environment, the Windows drive is often not C:. Always verify with diskpart before running commands that target a drive.
  • Skipping the /scanos step. This command detects existing Windows installations. If you skip it, /rebuildbcd may not find your system.
  • Running commands in the wrong order. The order matters—fixmbr first, then fixboot, then scanos, then rebuildbcd. Mixing them up can cause errors.
  • Forgetting to mount the System Reserved partition. If /fixboot gives “Access is denied,” it’s usually because the boot partition isn’t assigned a letter. In DiskPart, select the System Reserved partition and type assign letter=S: then run bcdboot C:\Windows /s S: (adjust letters).

Tips

  • Back up the BCD before editing. The bcdedit /export command creates a backup you can restore with bcdedit /import if something goes wrong.
  • Use Safe Mode as a fallback. If the commands don’t fix the boot, try booting into Safe Mode (press F8 or Shift+F8 during startup, or use the recovery environment to start with Safe Mode). This can help you run system restore or remove recently installed drivers.
  • Run System File Checker after boot. Once Windows starts, open Command Prompt as administrator and run sfc /scannow to repair corrupted system files.
  • Keep a recovery drive handy. Create a USB recovery drive on a working PC (search “recovery drive” in Control Panel) so you’re prepared for future boot issues.

Troubleshooting

If the commands don’t resolve the boot error, here’s what to try next:

  • “The system cannot find the path specified” when running bcdedit. This usually means the BCD store is missing. Run bootrec /rebuildbcd again, and if it says “Total identified Windows installations: 0,” you may need to use bcdboot C:\Windows (replace C:) to create a new BCD store.
  • Boot loop after repair. If the PC restarts repeatedly, try disabling Fast Startup in BIOS (if accessible) or run chkdsk again to rule out disk errors.
  • Error 0xc000000f or 0xc000000e. These indicate a missing or corrupted boot configuration. Run bootrec /rebuildbcd and if that fails, use bcdboot C:\Windows /s S: where S: is the System Reserved partition (you may need to assign it a letter first).
  • If nothing works, use Startup Repair. From the recovery menu, go back to “Advanced options” and choose “Startup Repair.” It automates many of the same fixes and might catch something you missed.
  • Consider hardware issues. If you still can’t boot, the problem might be failing hard drive or RAM. Use the Windows Memory Diagnostic (in the recovery menu) or test the drive with the manufacturer’s tool.

Frequently Asked Questions

Q: Will these commands erase my files?
A: No. Bootrec and bcdedit only repair boot files; they don’t touch personal data. Chkdsk repairs file system errors but doesn’t delete files unless it finds unrecoverable corrupt sectors, which it quarantines.

Q: How do I know which drive letter is Windows in the recovery environment?
A: Use diskpart → list volume. Look for the volume with the “Windows” label or the one that has the highest number of files. You can also type dir C:\Windows and see if it lists folders; if not, try D: or E:.

Q: What does “bootrec /fixmbr” actually do?
A: It writes a new master boot record (MBR) to the system partition without overwriting the partition table. This fixes MBR corruption but doesn’t repair the BCD.

Q: Can I run these commands from a normal Command Prompt in Windows?
A: Some commands like bootrec and bcdedit require administrator privileges and can be run from an elevated Command Prompt, but if Windows won’t boot, you must use the recovery environment.

Q: Why do I get “Access is denied” when running bootrec /fixboot?
A: This usually happens when the System Reserved partition isn’t mounted. In DiskPart, select that partition and assign it a letter, then run bootrec /fixboot again.

Q: How long does chkdsk take?
A: It depends on the size of the drive and the number of errors. A typical 500 GB drive might take 15–30 minutes, but larger or heavily corrupted drives can take hours. Let it finish.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →