Windows 10 upgrade kills grub and boot-repair doesn't help

I've just upgraded to Windows 10 from Windows 8.1 on my partitioned laptop that has Ubuntu 14.04 installed. Grub no longer appeared on boot so I ran boot-repair from an Ubuntu liveUSB. This didn't seem to have any effect. I've checked and secure boot is still disabled.
Log from boot-repair: http://paste.ubuntu.com/11972534/
So what's next?

Update: I've attempted to use chroot to update grub from my Ubuntu partition. update-grub runs successfully finding both linux and windows boot manager but the process still doesn't have any effect. grub-install complains that it cannot find EFI directory (but I have mounted everything correctly).

Update2: Just discovered that running efibootmgr after chroot into ubuntu shows ubuntu as not being in the boot order at all. I manually changed the order and rebooted to discover that the bootorder was reset. I run in windows: bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi But this has no effect either even after reporting 'Operation Successful'.


Solution 1:

I just had to run this in Windows as an administrator:

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

Or, if you are using PowerShell:

bcdedit /set "{bootmgr}" path \EFI\ubuntu\grubx64.efi

GRUB appears fine on boot and I can boot into Ubuntu and Windows 10 fine.


As pointed out in the comments (by David Faure), the final argument to this command depends on your particular system configuration. You can use this command to determine the correct path for your system:

bcdedit /enum firmware

This will list all the installed boot managers and associated EFI paths, and grub should be somewhere in the list.

Solution 2:

The only solution that worked for me is described on that link I've brought it again here just because it's easier to find this thread on google.

Essentially the steps are:

  1. Using Ubuntu Live to boot in 'Try Ubuntu' mode.
  2. Use GParted to verify the correct linux partition (e.g. /dev/sda2).
  3. Mount the linux partition:

    sudo mount /dev/sda2 /mnt  #Replace sda2 with your partition number
    
  4. Mount all other linux system folders :

    for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done
    

    If you are running an UEFI system, you will also have to mount your EFI directory using the following command:

    sudo mount /dev/sda1 /mnt/boot/efi
    
  5. chroot into your install

    sudo chroot /mnt
    
  6. Now that you are logged in your installation (not the Ubuntu Live) just do

    update-grub
    grub-install /dev/sda
    update-grub
    exit
    sudo reboot
    

And that's it ! Credits go do Scott Severance on the link I've mentioned above.

Solution 3:

same problem here, upgrading from windows7 to 10 in a dual boot pc... I resolved in this way:

  1. Upgrade Windows
  2. During installation process, after the first reboot, i get the grub rescue prompt, fixed this with BootRepair in a USB stick
  3. Completed the Windows installation, GRUB has gone and with a live cd of gparted i noticed that all partitions was still there but all of them were NTFS
  4. Used TestDisk from windows recovered my Linux partition
  5. BootRepair again and everything seems ok (i've Windows voice in GRUB menu duplicated.. i don't know why, but everything seems ok to me now!)

I hope it can be useful to someone!