Step 1
Boot into Windows operating system, open command prompt as administrator and execute:
powercfg /h off
In case Fast Boot is enabled in your configuration:
Open Windows Control Panel -> Power Settings.
Enable show hidden settings - uncheck Fast Boot.
Shutdown the machine completely, do NOT reboot.
Step 2
Boot from Windows installation media, on Install now screen select Repair your computer.
Choose Command prompt and execute:
bootrec.exe /fixboot
bootrec.exe /rebuildbcd
Step 3
Boot from Ubuntu installation media and select Try Ubuntu without installing.
When the Ubuntu Live desktop appears, open a terminal and execute:
sudo mount /dev/sd*** /mnt
sudo mount /dev/sd** /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
grub-install /dev/sd*
update-grub
Note:
sd*
= disk | sd**
= efi partition | sd***
= system partition
To identify the partition numbers use GParted - it is included in the Ubuntu installation media.
Boot into BIOS and select Ubuntu in UEFI settings to be the default operating system to boot.
Now you can boot Ubuntu directly or select the Windows environment from GRUB boot menu.
Update (instructions on how to rebuild everything as you asked for this in your comment) :
Boot into BIOS and enable UEFI mode and then (in case there is an option) disable Secure Boot.
Boot from Ubuntu install media and open GParted ... create a new partition table - choose GPT.
Install Windows - boot into Windows and disable Fast Boot and Hibernation - shutdown the PC.
Boot from Ubuntu install media - open GParted and shrink the Windows partition.
Create a new partition from the unallocated space and format it with ext4.
Create another new partition and format this one with linux-swap.
Close GParted and start the Ubuntu installer - when asked choose Something else.
Select the ext4 partition you created before and choose / (root) as mount point.
When Ubuntu is installed, boot into BIOS and select Ubuntu as default system.