Ubuntu – Dual boot Windows 10 and Ubuntu 16.04 on UEFI

16.04dual-bootuefi

As a long-time user of Ubuntu, I recently purchased an Acer Revo One which came pre-installed with Windows 8 on a 60GB SSD. This time I decided to keep the license. I took advantage of the free upgrade to MS Windows 10 (I chose to do a clean installation from a USB disc so I could control the partitions on the SSD – I left enough space for a root partition). This installation worked fine.

Next, I installed a HDD and proceeded with an Ubuntu 16.04 installation using a live USB.

I partitioned the disks as follows (I got this from GParted after booting from the Ubuntu live USB):

/dev/sda

/dev/sdb

Basically I want:

  1. both OSs to boot from the SSD
  2. Ubuntu to use the HDD for a nominal /home, swap partition and /tmp
  3. a shared partition to which both Windows and Ubuntu can write to

I have no idea why /dev/sdb3 and /dev/sdb4 have got "msftdata" flags.

Secure Boot is enabled (I've read various posts – some say have it disabled when installing Ubuntu, some say you don't need to do that). Fast Boot is disabled.

Ubuntu installs as expected however, upon reboot (having removed the live USB disk) the machine boots only into Windows.

I have checked the BIOS and there is no option to boot into anything other than the Windows Boot Manager (or the live USB disk when installed).

efibootmgr reports:

BootCurrent:0002 
Timeout: 2 seconds  
BootOrder: 0000,0002,0001 
Boot0000* Windows Boot Manager  
Boot0001 ubuntu 
Boot0002* UEFI: SanDisk

I noticed that there is no asterisk next to Boot0001 implying that is not "active". I have tried setting that active and I have also tried changing the boot order so Boot0001 is first. I've even tried changing BootNext to 0001. None of these work. I did notice that changes to activate Boot0001 are reset on the next boot – so my changes are not being preserved.

I read a number of posts which make number of recommendations:

  1. Some say install Windows first, others say the reverse.
  2. Install Grub again.
  3. Repair the EFI bootloader entries either manually (by mounting the EFI partition and copying/renaming entries) or using Boot-Repair.

I can't seem to attach a dump of the EFI partition, but here's a fragment:

./EFI
./EFI/Microsoft
./EFI/Microsoft/Boot
./EFI/Microsoft/Boot/bg-BG
./EFI/Microsoft/Boot/bg-BG/bootmgfw.efi.mui
./EFI/Microsoft/Boot/bg-BG/bootmgr.efi.mui
./EFI/Microsoft/Boot/bootmgr.efi
./EFI/Microsoft/Boot/memtest.efi
./EFI/Microsoft/Boot/boot.stl
./EFI/OEM/Boot
...
./EFI/Microsoft/Boot/en-GB
./EFI/Microsoft/Boot/en-GB/bootmgfw.efi.mui
./EFI/Microsoft/Boot/en-GB/bootmgr.efi.mui
...
./EFI/OEM
./EFI/OEM/Boot
./EFI/OEM/Boot/boot.stl
./EFI/OEM/Boot/bootmgfw.efi
./EFI/OEM/Boot/bootmgr.efi
./EFI/OEM/Boot/memtest.efi
./EFI/OEM/Boot/BOOTSTAT.DAT
./EFI/OEM/Boot/BCD
./EFI/OEM/Boot/BCD.LOG
./EFI/OEM/Boot/BCD.LOG1
./EFI/OEM/Boot/BCD.LOG2
...
./EFI/OEM/Boot/en-GB
./EFI/OEM/Boot/en-GB/bootmgfw.efi.mui
./EFI/OEM/Boot/en-GB/bootmgr.efi.mui
...
./EFI/ubuntu
./EFI/ubuntu/fw
./EFI/ubuntu/fwupx64.efi
./EFI/ubuntu/grubx64.efi
./EFI/ubuntu/grub.cfg
./EFI/ubuntu/shimx64.efi
./EFI/ubuntu/MokManager.efi
./OEM
./OEM/AcerOA30.xml
./OEM/Factory
./OEM/Factory/AMIDEWINx64.exe
./OEM/Factory/AMIFLDRV64.sys
./OEM/Factory/CHK.bat
./OEM/Factory/CHK_DK.bat
./OEM/Factory/Delay-Diags.exe
...

I know I'm close to cracking this nut, so which of the above suggestions is likely to work? I'd rather not get into the situation where Windows no longer boots and having to start again. It takes a long time reinstall everything.

Success of a sort.

My BIOS was out of date, so I updated that.

I also used Boot-Repair from a USB boot disk to repair the EFI boot partition (I'm not sure it was broken at all).

I then tried @fords suggestion – running bcdedit within w$ – Success! Grub is displayed with a plethora of choices – Ubuntu being the default.

This is all came to nought when I rebooted into Windows which, upon shutdown, decided to apply an update which stopped Ubuntu from booting. (deep sigh).

All I get is a few lines suggesting I try

sysctl reboot

or

sysctl defaults

neither of which did much.

Did the Windows update undo the Windows bcdedit and/or Linux Boot-Repair? If so, how do I prevent Windows updates from wreaking havoc on a daily basis?

Best Answer

Have you tried setting the default boot loader to Grub in the Windows command prompt? I had to do that when I installed Ubuntu to run with Windows 10:

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

I'd also recommend turning off Secure Boot. Windows is a cranky beast when it comes to dual booting.