Unable to start Windows - UEFI boot problems with Linux + Win8

9,184

The second of your two GRUB configuration entries is closer to being correct. The example I generally present looks like this:

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

Your example is missing the set root line, which you'll need to customize for your system. (It should point to your EFI System Partition (ESP).)

Alternatively, you could boot into Linux and install the RPM version of my rEFInd boot manager. rEFInd is much less finicky than GRUB, and it's easier to manage its configuration manually; but as it's not officially supported by OpenSUSE, you're more likely to have to manually configure it. (Of course, you're at a point where you're being forced to manually configure GRUB, so that may not really be a disadvantage of rEFInd!) One caveat about rEFInd: If you're booting with Secure Boot enabled, you may need to tweak the Secure Boot configuration. In particular, I've recently discovered that the Fedora and OpenSUSE versions of shim use different filenames, so you may need to play with those or disable Secure Boot in your firmware.

Share:
9,184

Related videos on Youtube

testun
Author by

testun

Updated on September 18, 2022

Comments

  • testun
    testun almost 2 years

    I have installed openSUSE (12.2) on a PC that has Win8 installed.

    At the beginning there were problems and it didn't start, after some "fixes" Linux started but when going in the grub2-efi Windows 8 entry I get this error:

    error: can't find command 'drivermap'
    error: invalid EFI file path

    First of all, I have checked and in my /boot/EFI/ there's no Windows .efi file, just the openSUSE one.

    I have tried the command:

    grub2-efi-probe --target=fs_uuid /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi 
    

    and I got:

    grub2-efi-probe: error: failed to get canonical path of /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi."

    I tried also to modify /boot/grub2-efi/grub.cfg, adding:

    menuentry "Windows 8 UEFI" {
      insmod part_gpt
      insmod fat
      insmod search_fs_uuid
      insmod chain
      set root='(hd0,gpt4)'
      search --fs-uuid --no-floppy --set=root 4f84-ee2e
      chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
    }
    

    as suggested in some websites..

    I also tried:

    menuentry "Microsoft Windows Vista/7/8 x86_64 UEFI-GPT" {
      insmod part_gpt
      insmod fat
      insmod search_fs_uuid
      insmod chain
      search --fs-uuid --set=root $hints_string $uuid
      chainloader /EFI/Microsoft/Boot/bootmgfw.efi
    

    }

    but no luck.

    My guess is that the Win EFI file has been deleted and I need that to make Win start? Am I right?

    In this case, where can I find it? Is it possible to solve this problem without reinstalling Windows (I've got no DVD)?

    Edit:

    sudo ls -l $(find /boot/efi -iname "*.efi")
    root's password:
    -rwxrwxr-x 1 root root 665600 Jan  8  2013 /boot/efi/EFI/opensuse/grub.efi
    -rwxrwxr-x 1 root root 120832 Mar 11  2013 /boot/efi/EFI/opensuse/grubx64.efi
    
    • Ramhound
      Ramhound over 10 years
      Have you tried using Windows to repair the problem? Have you tried a different boot manager by chance? askubuntu.com/questions/263044/… I am going to guess your partition type is GPT instead of MBR? This thread explains how to use the Windows Recovery Console to solve this problem bbs.archlinux.org/viewtopic.php?id=164486
    • Ramhound
      Ramhound over 10 years
      What is the output of sudo /usr/bin/diff /boot/efi/EFI/Boot/bootx64.efi /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi? You need to boot to the recovery mode in order to fix this, which might required media, so start working on that problem.
    • Ramhound
      Ramhound over 10 years
      My previous comment was suppose to say "might need to"
  • testun
    testun over 10 years
    hi, thank you for your suggestions. I've tried what you wrote but I got the same error: bootmgfw.efi not found.. As I said I think that file isn't in the EFI partition anymore..
  • Rod Smith
    Rod Smith over 10 years
    Please boot to Linux and type ls -l $(find /boot/efi -iname "*.efi"). This will show all the files on the ESP with names that end in .efi. Edit your original question to include the output.
  • testun
    testun over 10 years
    ok, I've done it
  • Rod Smith
    Rod Smith over 10 years
    Either something has deleted your Windows boot loader from the disk or it resides on another ESP. Use parted or some other tool to look for another FAT partition. If you've got another FAT partition, and if bootmgfw.efi is present on it, you should be able to edit GRUB's Windows entry to point to it, and that should fix the problem. Alternatively, switch to rEFInd (the second option in my original question); it scans all the filesystems that the EFI can read on every boot, so such problems are less likely when using it.
  • testun
    testun over 10 years
    thx. The only fat partition is the one where there's the linux efi file..
  • Rod Smith
    Rod Smith over 10 years
    In that case, you need to restore the Windows EFI boot loader. If you've got a backup of the ESP, you can use that. Otherwise, use a Windows installation or emergency disc and use that. I'm not an expert on its use, though.
  • testun
    testun over 10 years
    uhm.. ok.. I've not any backup.. just a windows recovery disk.. let's see what I can do.. thank you mate