1

Thank you so much for reading. I'm pretty desperate for an answer at this moment.

So anyways, I recently solved this issue allowing me to install xubuntu 12.10 correctly. This was a problem with the MBR. (even though I use EFI? :/ )

Now when I boot up the computer, I get to go into grub. OK. xubuntu works perfectly, no weird things over there. But when I try to boot Windows, there is this error: "error: invalid EFI file path".

(Both OSs are x64 and they also both use EFI.)

This is the log from boot-repair. I can't seem to understand why Windows won't boot :(

Any help is greatly appreciated!

2
  • Have you seen askubuntu.com/questions/221835/… ?
    – Seth
    Mar 13, 2013 at 22:39
  • Running linux or windows is not my problem here. The problem is that grub somehow messed up the path to the Windows efi boot :/ Sorry for the late response, I was sleeping :) @Seth
    – user140072
    Mar 14, 2013 at 13:44

2 Answers 2

1

Your GRUB configuration is set up for booting Windows in BIOS mode, but this won't work because you've clearly got an EFI-mode installation of Windows. There are a number of possible solutions. Here are a couple....

First, you could edit the file called /etc/grub.d/40_custom and add an entry like this:

menuentry "Windows 7 (custom)" {
    insmod part_gpt
    insmod chain
    set root='(hd0,gpt3)'
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi.grb
}

Then type sudo update-grub. With any luck that will create a new GRUB entry called "Windows 7 (custom)" that should work. This isn't guaranteed, though; GRUB is pretty finicky and flaky about launching Windows. What works on one system may not work on another. You'll also probably continue to have the non-functional entry in the GRUB menu.

A second option is to install rEFInd, which is an alternative to GRUB. If you install it via the Debian package, it should set itself up automatically and launch the next time you boot; however, the Windows icon in its menu will probably launch GRUB, thanks to the way the Boot Repair tool "fixed" things. To fix this problem, you can type the following commands in Ubuntu:

cd /boot/efi/EFI/Microsoft/Boot/
cp bootmgfw.efi.grb bootmgfw.efi

Thereafter, the Windows entry should boot Windows. You'll also have an entry with an Ubuntu icon that will boot GRUB and one or more Linux penguin icons that will launch Ubuntu directly. If the penguin icons work to your satisfaction and you don't want the GRUB icon any more, you can remove it by deleting the /boot/efi/EFI/ubuntu directory or by editing /boot/efi/EFI/refind/refind.conf, uncommenting the dont_scan_dirs or dont_scan_files line, and adding entries to them to keep GRUB out of the menu.

5
  • The extra menuentry sure added an "Windows 7 (custom)" entry, but it says it can not find hd0,gpt3... I made another boot-repair log, without actually using the uilty.
    – user140072
    Mar 15, 2013 at 14:05
  • rEFInd worked! But launching Windows from it doesn't, sadly. Even though I copied bootmgfw.efi.grb to bootmgfw.efi it still takes me to the grub menu. @RodSmith
    – user140072
    Mar 15, 2013 at 14:24
  • Then you'll need to figure out which of the .efi or .efi.grb files on the ESP is the real Windows boot loader and copy it to the name /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi. Try comparing their file sizes. I don't know offhand the precise size of the Windows boot loader file, but it will be different from the size of any GRUB file. Alternatively, a Windows boot repair utility should be able to restore Windows to bootability, but that might then bypass rEFInd. If that happens, try step #10 in rodsbooks.com/refind/installing.html#windows to fix it.
    – Rod Smith
    Mar 18, 2013 at 15:09
  • bootmgfw.efi is 1,3 MB (1,354,472 bytes). if you copy /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi to /boot/efi/EFI/Boot/bootx64.efi the EFI boot should go to Windows.
    – snayob
    Mar 18, 2013 at 16:51
  • Thank you, very much. This worked and everything is fine now. I stand in debt to you all!
    – user140072
    Mar 22, 2013 at 7:58
0

I don't think your grub install messed up the path to Windows efi, in your pastebin it is still there, /EFI/Microsoft/Boot/bootmgfw.efi, just try to get to it from your computer boot menu, press F10 or F12 when it starts up. On the other hand, I've never managed to load an efi Windows from within grub, although I wish.

3
  • How would I do this? I have access to the ASUS EZ Flash 2 Utility and can roam my windows partition from there.
    – user140072
    Mar 16, 2013 at 19:15
  • Edit: I lurked around in the windows partition, but can't find any EFI BIOS files to boot from. Where are they usually located?
    – user140072
    Mar 16, 2013 at 19:22
  • Most computers have a preset key to enter in BIOS setup, such as F2 or Del, and another key to enter in the boot menu, sometimes F10, sometimes F12 or F9. Whatever entries are added in the EFI firmware to boot from can be found there, in the boot menu. On the hard drive, the EFI entries are stored in the EFI partition, that you can find by listing the partitions with gdisk -l /dev/sda and look for the one with the code EF00. From your pastebin it looks like it is /dev/sda3. In linux it should be mounted under /boot/efi, so look for /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi.
    – Mike C.
    Mar 16, 2013 at 20:42

You must log in to answer this question.