Windows – How to fix Boot Configuration Data (BCD) for Windows 8 EFI system

bcdbcdbootbcdedituefiwindows 8

I have Lenovo H530 Desktop which comes with Windows 8. I tried to install Ubuntu on the system and ended up messing something on my way. Current status is my system won't boot into either one of them and will just fall into GRUB shell on startup. I have a 64-bit system with EFI.

enter image description here
Partition structure in GParted on Ubuntu live CD

enter image description here
Partition structure in Windows 8 Repair command prompt

I followed the instructions here as follows.

select disk 0
select vol 2 --> EFI
assign --> resulted in F: drive
select vol 3 --> Windows8_OS drive (471 GB)
assign --> resulted in G: drive
cd /d F:\EFI\Microsoft\Boot\
bootrec /fixboot
ren BCD BCD.bak
bcdboot G:\Windows /l en-us /s f: /f ALL

Everything was success till here. But reboot still results in GRUB shell.

I have also tried following links



but not much success. Any help to solve this would be really appreciated.

EDIT 1: bcdedit results in error
The boot configuration data store could not be opened.
The requested system device cannot be found

Best Answer

You have two partitions with boot flag and a bios_boot partition for grub which means you installed Ubuntu using BIOS mode!

On a GPT disk you should have only one EFI System Partition (ESP) which is used for storing all boot related files for Windows, Ubuntu e.t.c.

When installing / booting external media (CD, DVD, USB) use always EFI way of booting. This can be achived if you disable CSM/Legacy BIOS emulation in firmware.

In your case delete following partitions:(from GParted display)

sda3, sda7, sda8, sda9

Then you can boot from Windows installation DVD/USB (the UEFI way!!!), go to command prompt and use just

bcdboot drive_letter:\windows (drive_letter is drive where Windows is installed)

to repair UEFI booting.

You can also rewrite MBR to be in format "protected MBR" using

bootsect /nt60 all /force /mbr

Some explanations for repairing Windows BCD can be found here.

Then try rebooting to see if Windows boots OK.

After that you can install Ubuntu again but boot installation media the UEFI way !!!

Related Question