Windows 8 deletes GRUB when booting

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


Solution 1:

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.