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:
- Insert a Windows 11 bootable USB drive into your PC and boot from it.
- Select your language preferences and click Next.
- Click Repair your computer in the bottom-left corner.
- 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.
In the Command Prompt window, launch the disk partitioning utility:
diskpartView your connected storage drives:
list diskSelect your primary drive (usually Disk 0):
select disk 0Display the partitions to locate the EFI system partition:
list volumeLook for the hidden volume formatted in FAT32, typically sized between 100 MB and 500 MB. Note its volume number (e.g., Volume 2).
Select the EFI volume:
select volume 2Assign a temporary drive letter (such as
Z:):assign letter=ZExit 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.
Ensure your primary Windows installation partition is mapped correctly (often assigned to
C:in recovery mode).Execute the following command:
bcdboot C:\Windows /s Z: /f UEFI(Replace
C:with your actual Windows installation drive letter andZ: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 /rebuildbcdIf the system prompts you to add installations to the boot list, press Y (Yes) and hit Enter.
Step 5: Reboot Your Computer
Close the Command Prompt window by typing:
exitClick Continue (Exit and continue to Windows 11).
Remove the bootable USB drive.
Your system will restart and boot directly into Windows 11 using the newly generated bootloader files.