Windows 8 deletes GRUB when booting

10,390

Is it really missing or just not the default anymore?

This may just be a misconception, please take a look at the boot order in your firmware setup screen or run efibootmgr if you are in Ubuntu. Windows actually installed two bootloaders: the default UEFI bootloader for the drive in \EFI\boot\bootx64.efi, which – to my experience – will create a new entry in the NVRAM that is linked to \EFI\Microsoft\Boot\Bootmgfw.efi, the "real" UEFI Windows bootloader. It's very likely that by choosing to boot the Windows entry from the GRUB menu you booted the default UEFI bootloader, which set Windows as the default again. In that case simply move the Ubuntu entry up to the top in in the boot order.

Windows is not evil, Fedora does it too

I found that Fedora does something very similar, but neither Windows' nor Fedora's default bootloader removes entries from NVRAM. Your Ubuntu entry should still be in NVRAM and you should be able to boot it via boot override (ASUS boards have this feature in the setup screen), firmware boot menu (F8, F11 or F12) or – as mentioned above – by rearranging the boot order in the firmware setup screen (formerly called BIOS setup screen).

I want to point out that this is not a bad idea or bad practice. If you have installed an operating system and it boots from an entry in the NVRAM of the firmware, you can't take the drive out and boot it on another computer. That's where the default bootloader on the EFI System Partition (ESP) comes into play and can either boot the operating system or create a new entry in the NVRAM to the proper bootloader or do both.

Workarounds

  • Boot Windows always via it's "Windows Boot Manager" entry from the firmware boot menu (F8, F11 or F12). Never use the default bootloader (e.g. selecting the hard drive from the firmware boot menu), as it will alter the boot order.
  • Create a custom GRUB entry to boot Windows. Be aware that you need to change every occurrence of msdos from the example to gpt as you seem to be using a GPT partition table, like all Windows 8 preinstallations do.
  • Backup \EFI\boot\bootx64.efi and replace it with Gummiboot, it will also find the Windows Bootloader on the ESP, but not alter the boot order. (Follow only step 1 from this answer for instructions.)
  • You can also try the workaround suggested in the Arch Wiki. (The answer from Rod Smith looks similar, but a GRUB loader in the Microsoft directory of the ESP doesn't look quite right.)

You can combine 1-3 of course.

Share:
10,390

Related videos on Youtube

user3520818
Author by

user3520818

Updated on September 18, 2022

Comments

  • user3520818
    user3520818 over 1 year

    I have this situation:
    SONY VAIO SVF1521V1EB
    Windows 8 preinstalled in UEFI.

    I decided to install Ubuntu 13.10 in dual boot. So I downloaded the amd64 iso, burnt on a DVD, then booted from DVD in UEFI mode and installed Ubuntu.

    It worked fine, I had Ubuntu and Windows 8 installed. On booting GRUB asked me if I wanted Ubuntu 13.10 or Windows Boot Loader (UEFI).

    I used few times Ubuntu, and was ok.

    Then I needed to boot Windows 8. I have booted it and worked a bit. Then shutdowned the pc.

    When I powered it on, GRUB didn't appear anymore! It booted directly on Windows8 !

    I reinstalled Ubuntu with the DVD and GRUB came back, then when I booted Windows8 GRUB disappeared again.

    Does Windows delete GRUB? How can I have a "persistent" version of GRUB installed?

    Thank you very much

    EDIT: I tried all the workaround proposed, with no luck. I guess it is a problem in the VAIO firmware, which has strange settings about boot. PC manufacturers are worse and worse... They produce PC only for Windows, which I would not even define as an O/S.

    Bye

    • user3520818
      user3520818 about 10 years
      After accessing to windows I repaired GRUB with the ubuntu server x64 USB. I got the shell, mounted the efi partition on /boot/efi and repaired grub with grub-install and now it works... stil have the problem when booting windows... It deletes GRUB! I don't understand why
    • Rod Smith
      Rod Smith about 10 years
      possible duplicate of Windows 8 removes Grub as default boot manager (but note that if you've left Secure Boot active, you'll need to activate shimx64.efi rather than grubx64.efi)
  • user3520818
    user3520818 about 10 years
    Hi. My PC doesn't have anything which makes me boot from the firmware boot menu. So I tried 3th and 4th methods with no luck. Now I'm going to try to create a custom GRUB entry. Thank you for your help anyway
  • Csabi Vidó
    Csabi Vidó about 10 years
    Every computer (traditional desktop or laptop) should have this and a description in the manual that comes with the device on how to use that. However marketing people are stupid and turn support sites into anything but useful. F11 (2011 - probably BIOS) or "ASSIST" button (2013 - should be UEFI)
  • user3520818
    user3520818 about 10 years
    Hi. I have the "ASSIST" button, but if I boot from that it just presents me a window where it asks me: - recovery windows - boot from LAN - boot from media (CD/USB) - technical support nothing about asking me what system to boot Now after using Windows I do the following: boot from ubuntu server recovery, "grub-install /dev/sda" and recovers GRUB fine