How to Use the bcdboot Command to Repair the Windows 11 Bootloader

The Blue Screen of Death: Inaccessible Boot Device

When you press the power button on your Windows 11 computer, the motherboard does not immediately load the operating system. First, it looks for a tiny, hidden partition on your hard drive called the EFI System Partition. Inside this partition is the Boot Configuration Data (BCD), a master index that tells the computer exactly where the Windows 11 files are physically located on the disk.

If you clone your hard drive to a new SSD, or if a severe malware infection corrupts this hidden partition, your computer will completely fail to boot. You will be hit with a catastrophic blue screen error (often INACCESSIBLE_BOOT_DEVICE or 0xc0000098) indicating that the bootloader is missing or destroyed.

You do not need to reinstall Windows 11 from scratch and lose all your data. You can completely rebuild the missing bootloader from scratch using the bcdboot command.

Step 1: Accessing the Command Prompt (WinRE)

Because your computer cannot boot into the normal Windows 11 desktop, you must run this command from the Windows Recovery Environment (WinRE).

  1. If your computer crashed multiple times in a row, it should automatically load the blue Advanced Startup screen.
  2. If it does not, insert a Windows 11 installation USB drive, boot from it, and click Repair your computer in the bottom left corner.
  3. Navigate to Troubleshoot > Advanced Options > Command Prompt.

Step 2: Identifying the Windows Drive Letter

When you are in the Recovery Environment, drive letters are often temporarily scrambled. Your main Windows installation might not be on the C: drive right now; it might temporarily be on D: or E:.

You must verify the correct drive letter first.

  1. Type diskpart and press Enter.
  2. Type list volume and press Enter.

Look at the list of volumes. Identify which volume contains your actual Windows files (look for the largest GB size or the label “Windows”). Note the temporary drive letter assigned to it (for this example, we will assume it is D:).

Type exit to leave the diskpart utility and return to the normal command prompt.

Step 3: Rebuilding the Bootloader

Now that you know your Windows files are located on the D: drive, you can instruct bcdboot to copy fresh, uncorrupted boot files from that installation and rebuild the master EFI index.

Run the following command:

bcdboot D:\Windows /s D: /f ALL

Breaking down the command:

  • D:\Windows: The source path. This tells the tool exactly where to find the fresh boot files to copy.
  • /s D:: The target volume. This tells the tool where to rebuild the hidden EFI partition.
  • /f ALL: The firmware type. This forces the tool to create boot files that support both modern UEFI firmware and legacy BIOS firmware, ensuring the drive will boot regardless of the motherboard configuration.

Step 4: Rebooting the System

If the command is successful, the terminal will reply: “Boot files successfully created.”

Type exit to close the command prompt, and click Continue (Exit and continue to Windows 11) on the blue recovery screen.

The motherboard will now successfully find the brand new bootloader, read the fresh BCD index, and boot smoothly into your Windows 11 desktop with all of your files and programs perfectly intact.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.