Solution 1:

Your problem is with the Compatibility Support Module (CSM), which is enabled on your computer. Many Linux installation instructions suggest enabling the CSM, but this is bad advice. (The page you referenced comments that legacy mode will do nothing good, but doesn't really emphasize this point.) If you disable your CSM (aka "legacy boot support" or something similar) in your firmware setup utility, you should be able to get the Ubuntu installer to boot in EFI mode, which should then enable Boot Repair to work correctly. (In some cases, there are no "CSM" or "legacy boot" options, but there is a "boot mode" option with settings like "UEFI only," "UEFI or legacy," or "legacy only." Setting this to "UEFI only" should disable the CSM.)

If you can't find the appropriate options, I recommend you try using my rEFInd boot manager to force an EFI-mode boot. This is an EFI-only boot manager; if it boots, you can be sure you've booted in EFI mode, and on a UEFI-based PC, if it shows you an Ubuntu boot option, using it will boot in EFI mode. The page to which I linked includes download links for USB flash drive and CD-R versions of rEFInd; use one of those to prepare a bootable medium and boot to it. If this works and enables you to boot to Ubuntu, you can then either run Boot Repair or install rEFInd using its PPA or Debian package, which will bypass GRUB and use rEFInd as the default boot manager. One caveat, though, is that the downloadable USB flash drive and CD-R versions of rEFInd do not support Secure Boot. If this feature is enabled, you must either disable Secure Boot or jump through extra hoops to get rEFInd working with Secure Boot. The former will be easier than the latter.

Solution 2:

assuming that grub installed successfully, but you are getting the windows loader. do this:

1) make grub the default boot loader:

boot into a live CD and try ubuntu. install efibootmgr and gparted sudo apt-get install efibootmgr gparted

use gparted to turn off the ESP boot flag on the EFI partition.

find the file /EFI/ubuntu/grubx64.efi or /EFI/ubuntu/shimx64.efi

make a copy of it and rename it bootx64.efi. then move the file to /EFI/boot/bootx64.efi. replace the file that is there.

use gparted to reset the ESP boot flag on the partition.

2)windows like to tell efi to put 0000 first in the boot order. To keep windows from placing itself first in the boot order:

use efibootmgr to remove the entries in the efi boot memory.

sudo efibootmgr -b 0000 -B

repeat for all entries (except USB, CD and network boots), then reboot. make sure ubuntu is the first system you boot into so it gets placed in slot 0000

then boot your other systems. return to ubuntu and efibootmgr to verify ubuntu is in slot 0000.