Repair Windows 11 Bootloader with Command Prompt

A corrupted Windows 11 bootloader prevents your operating system from starting, frequently causing blue screen errors, infinite boot loops, or “No bootable device found” messages. This step-by-step guide explains how to access the Windows Recovery Environment and rebuild the Unified Extensible Firmware Interface (UEFI) Boot Configuration Data (BCD) using the Command Prompt.

Step 1: Boot into Advanced Startup

Because Windows will not start normally, you must access the Command Prompt through recovery media:

  1. Insert a Windows 11 bootable USB drive into your PC and boot from it.
  2. Select your language preferences and click Next.
  3. Click Repair your computer in the bottom-left corner.
  4. Select Troubleshoot > Advanced options > Command Prompt.

Step 2: Identify the EFI System Partition

Windows 11 requires UEFI and uses a specific FAT32 partition to store boot files. You need to assign a drive letter to this hidden partition.

  1. In the Command Prompt window, launch the disk partitioning utility:

    diskpart
  2. View your connected storage drives:

    list disk
  3. Select your primary drive (usually Disk 0):

    select disk 0
  4. Display the partitions to locate the EFI system partition:

    list volume
  5. Look for the hidden volume formatted in FAT32, typically sized between 100 MB and 500 MB. Note its volume number (e.g., Volume 2).

  6. Select the EFI volume:

    select volume 2
  7. Assign a temporary drive letter (such as Z:):

    assign letter=Z
  8. Exit the Diskpart utility:

    exit

Step 3: Rebuild the Bootloader Files

Once the EFI partition is mounted, use the bcdboot command to copy fresh boot files from your Windows directory to the EFI partition.

  1. Ensure your primary Windows installation partition is mapped correctly (often assigned to C: in recovery mode).

  2. Execute the following command:

    bcdboot C:\Windows /s Z: /f UEFI

    (Replace C: with your actual Windows installation drive letter and Z: with the letter assigned in the previous step if different).

If successful, you will see the message: “Boot files successfully created.”

Step 4: Run Bootrec Repair Commands

To ensure all boot records and configuration references are properly refreshed, execute the standard boot repair commands:

bootrec /fixmbr
bootrec /rebuildbcd

If the system prompts you to add installations to the boot list, press Y (Yes) and hit Enter.

Step 5: Reboot Your Computer

  1. Close the Command Prompt window by typing:

    exit
  2. Click Continue (Exit and continue to Windows 11).

  3. Remove the bootable USB drive.

Your system will restart and boot directly into Windows 11 using the newly generated bootloader files.