(As [posted](http://superuser.com/revisions/620336/1) by [B0D_Mr4ZU](http://superuser.com/users/238402/b0d-mr4zu))

I wanted grub2 to boot Windows directly. I simply can not work that way. I made menu-entry for grub2; To /etc/grub.d/40_custom I added

    menuentry "Windows 8 UEFI" {
    insmod part_gpt
    insmod fat
    insmod search_fs_uuid
    insmod chain
    search --fs-uuid --no-floppy --set=root **4013-6F8C**
    chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
    }
**4013-6F8C** is UUID of my EFI partition (in my case sda1, only one for win and linux). If your system has its own EFI partition for Windows (in default windows EFI has 100MB when linux one has 200MB) use UUID of windows one. I found which of all partitions are EFI with;`gdisk -l /dev/sda` and `gdisk -l /dev/sdb` (I found out I have just one EFI partition). Then I needed UUID of sda1. I used `grub2-probe -t fs_uuid -d /dev/sda1` to find it. I edited the 40_custom file, saved it and aplyed settings to the grub 2. `grub2-mkconfig` and then `grub2-install` (Some systems have scripts to apply grub settings, but I used this method.) After restarting I had menu-entry for windows in grub2 menu, but it didn't boot windows, because `bootmgfw.efi` was missing in the /boot/efi/EFI/Microsoft/Boot folder of sda1. I booted Fedora, mounted windows partition and copied all files from \Windows\Boot\EFI (it contained some locale files en-GB, en-US... and .efi files I was looking for bootmgfw.efi, bootmgr.efi...) to the /boot/efi/EFI/Microsoft/Boot folder at the sda1.

----------

After restart grub2 menu showed Windows option and it booted as charm. Fedora is also booting without any problem. Well there was one problem.. First of the grub2 menu-entry do not want to boot, something with corrupted memory. But it keeps "older" kernels in this case, so I booted older one and it runs. I can wait for new kernel and after update things like this solve itself, or I can uninstall the kernel and try to install it manually again.

----------

Oh.. and one thing.. Try to avoid reinstalling windows boot manager via windows instalation DVD. It just wipe boot sector of disks and in the worst case you will end with non bootable linux and windows. (windows boot manager is not very good at finding any other than MS OS, so it will not boot neither linux nor chainboot it via grub)

I will be very happy, if this helped someone a bit. Have a nice day.