In this article we will learn how to repair Windows 10 / 8.1 /8 bootloader on a computer with UEFI. The corruption of the Windows bootloader can occur after the installation of the second OS (in Dual Boot configurations), be caused by the erroneous actions while failure recovering, removal of some data on hidden partitions, malicious software (virus, ransomware, etc.) and for some other reasons.
In this article, we will show how to repair a damaged or deleted bootloader on Windows 10 / Windows 8.1 / 8 systems with EFI. This guide should help in case when the system does not boot due to missing or damaged boot configuration in EFI\Microsoft\Boot\BCD.
The boot configuration data for your PC is missing: EFI\Microsoft\Boot\BCD
If the bootloader in Windows on UEFI system is corrupted – it’s impossible to start the system or user facing a blue screen with the following error:
Error code: 0xc000000f
All this can imply corruption or even total removal of Windows 10 / 8 bootloader configuration – Boot Configuration Data (BCD). You won’t be able to recover the BCD loader using bcdedit. When running this command, the following error appears:
The requested system device cannot be found
The matter is that the BCD loader configuration in Windows 8 installed in UEFI mode is stored on a separate hidden EFI volume (100 MB in size on FAT32 file system). Bcdedit can’t see it and, therefore, manage the bootloader configuration on it.
Automatic Windows Bootloader Recovery
The procedure for automatic recovery of the bootloader, which is used in the Windows Recovery Environment (WinRe), is usually powerless in such cases. But it’s worth trying all the same:
- Try to boot system from the recovery disc or installation Windows 10 media
- On the installation screen, click the Restore System
- Then select Troubleshoot -> Startup Repair and select the OS whose bootloader you want to try to recover
- But most likely the result will be negative: Automatic Repair Couldn’t Repair Your PC
Manually restoring the Windows 10/ 8 bootloader using the installation media
Let’s proceed to the procedure of manual recovery of the EFI boot loader on Windows 10 / 8.1.
So to recover the loader (BCD) configuration, you have to boot from the original installation Windows 10 media (or a recovery disk or a special EFI bootable flash drive) and open the command line choosing System Restore – > Troubleshoot-> Command Prompt or pressing Shift+F10).
Display the list of disks in the system:
Select the disk with Windows installed (if there is one disk in the system, it will have zero index):
sel disk 0
Display the list of volumes in the system:
In this example, you can see that the EFI volume (it can easily be recognized by its size of 100 MB and FAT32 file system) has the index volume 1, and the boot partition with Windows installed is volume 3.
Assign any disk letter to the EFI volume:
select volume 1
assign letter K:
A line that indicates the successful assignment of the drive letter to the EFI partition should appear:
DiskPart is successfully assigned the drive letter or mount point.
Go to the bootloader directory in the hidden volume
cd /d k:\efi\microsoft\boot\
In this case, K: is the drive letter assigned to the EFI partition just above. If the \EFI\Microsoft\Boot\ directory does not exist (error The system cannot find the path specified), try the following commands:
cd /d K:\Boot\
cd /d K:\ESD\Windows\EFI\Microsoft\Boot\
Recreate the boot sector on the boot partition
Delete the current BCD configuration file by renaming it (save the older configuration as a backup):
ren BCD BCD.bak
With bcdboot.exe, create BCD store again by copying the boot files from the system directory:
bcdboot C:\Windows /l en-us /s k: /f ALL
where C:\Windows – is the path to the directory with Windows 8 installed.
/f ALL – means that the boot files have to be copied including those for UEFI and BIOS computers (potential ability to boot in EFI and BIOS systems)
/l en-us – is a type of the system locale. By default, en-us – English (USA) is used.
bcdboot c:\Windows /l en-uk /s K: /f ALL
Version for Netherlands:
bcdboot c:\Windows /l nl-NL /s K: /f ALL
- BFSVC Error: Can not open the BCD template store. status – [c000000f] – check if the entered command is correct and whether you have localized Windows (in such case you need specify the local language code in a correct way);
- BFSVC Error: Error copying boot files from Last Error = 0x570 – try to check drive with the help of command: CHKDSK K: /F
Execute the commands:
Now you have to restart your computer. Then the Windows Boot Manager appears in the list of bootable devices, where you can choose desired operating system to start.
BCD bootloader configuration has been successfully restored!