cd /d K:\ESD\Windows\EFI\Microsoft\Boot\
At this point, many guides recommend running the following commands, which should overwrite the partition boot
record, find the installed Windows, and add them to the BCD:
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd
or even:
bootrec /FixMbr (preparing MBR record for a GPT disk looks strang)
You can use all these commands only for MBR-based disks. If your computer boots in UEFI mode, then it definitely
uses the GPT partition table (as in our case). Therefore, when you run bootrec
commands, you will see an error:
access is denied
BCDBoot.exe
tool to restore bootloader files and fix the boot records on the EFI partition by copying
them from the system directory on the Windows partition. The BCD bootloader configuration is recreated using the
%WINDIR%\System32\Config\BCD-Template file.
Use the attrib command to remove the hidden, read-only, and system attributes from the BCD file:
attrib BCD -s -h -r
Delete the current BCD configuration file by renaming it (this will keep the old boot configuration as a backup):
BCD.bak
Using the bcdboot
tool, you need to copy the critical files of the UEFI boot environment from the system directory to the EFI
boot partition and recreate the BCD bootloader config file:
bcdboot C:\Windows /l en-us /s k: /f ALL
C:\Windows
– the path to the root Windows system directory on the disk (this is your disk on which your Windows
is installed, we determined it earlier using the diskpart command);
f ALL
–means that you need to copy the Windows Boot Environment files, including those for UEFI and BIOS
computers (theoretically able to boot both on UEFI and BIOS computers). To copy only the EFI bootloader, use the
UEFI command;
/l en-us
—specifies the system locale that is used when initializing the BCD store. By default, en-us – English (USA)
is used;
/s K: — copy the bootloader EFI files to the specified partition;
/c
– this is a new BCDBoot option in Windows 10 that allows you to overwrite existing boot records (including
debugsettings). Use this option to ignore old boot settings and create a clean BCD configuration;
Windows Server Active Directory Windows Clients Virtualization