Windows – Repairing Windows 8 EFI bootloader after installing Fedora 20

bootloaderuefiwindows 8

Background

System is self built, so no OEM stuff. Windows 8 was installed first, hard drive was also newly set up as GPT. Later on, I installed Fedora 20 which installed GRUB on a BIOS Boot partition.

GRUB was loading Fedora fine but wasn't loading Windows properly so I've decided to scrap my Fedora installation and just set it up on a separate hard drive. After wiping my Linux partitions, I've done:

bootrec /fix
bootrec /fixmbr
bootrec /scanos # doesn't recognize any installation
bootrec /rebuildbcd

Which wiped out GRUB, but now I boot to a missing operating system error.

Now

Current disk layout from gdisk:

Number Size        Code    Name
  1    300MiB      2700    Basic data partition # WinRE partition
  2    100MiB      EF00    EFI system partition
  3    128MiB      0C01    Microsoft reserved partition
  4    136.7GiB    0700    Basic data partition

The ESP contains:

/Boot/
  BCD
  BCD.LOG, BCD.LOG1...
  BOOTSTAT.DAT
  memtest.exe
  Localization, resource, and fonts folders
/EFI/
  Boot/
    bootx64.efi
  Microsoft/
    Boot/
      BCD
      BCD.LOG, BCD.LOG1...
      boot.stl
      bootmgfw.efi
      bootmgr.efi
      bootstat.dat
      memtest.efi
      Localization, resource, and fonts folders
/bootmgr
/BOOTNXT

bcdedit also reports:

Windows Boot Manager
identifier          {bootmgr}
device              partition=I:
path                \EFI\Microsoft\Boot\bootmgfw.efi
...

Windows Boot Loader
identifer           {default}
device              partition=C:
path                \Windows\system32\winload.efi
....

I've also tried following the directions here but after rebooting it still gives a missing operating system error. (I've done the procedure both with and w/o secure boot)

rEFInd also does not detect any bootloader.

Is there any other way to repair the bootloader?

Best Answer

First, you could have almost certainly fixed your initial problem by either installing Fedora 20 in EFI mode or installing the EFI-mode Linux boot loader of your choice on your computer. Of course, with Fedora wiped, that doesn't really do you much good; I mention it simply in the hope of helping you learn, or helping somebody else who might need that advice.

As to your problem, it sounds as if your EFI System Partition (ESP) has been damaged, but you haven't presented information on its contents. I'm also unfamiliar with the format of the Windows partitioning tool you've used. It shows a FAT32 partition (which is presumably the ESP), but it's unclear if it's marked with the correct type code. The ESP should be marked as such (with, for instance, a type code of EF00 in gdisk or a "boot flag" in parted), and the Windows boot loader file is EFI/Microsoft/Boot/bootmgfw.efi. If that file is missing, that's the problem. I'm not an expert on the Windows repair tools, but the page to which you linked says to use bootrec /fixboot, whereas you used bootrec /fixmbr, among other differences. Assuming Microsoft hasn't simply reused an old name, I wouldn't expect /fixmbr to be useful on an EFI/GPT-booting computer, since EFI doesn't store boot code in the disk's MBR.

Related Question