I want to dual boot my system with Windows 10 and Ubuntu 20.04 but I don't want to disable secure boot.
I came across and installation guide, in which GRUB bootloader was installed inside the root directory and then using easy BCD grub option was added to Windows bootloader.
But my PC runs UEFI, and therefore, I cannot run Easy BCD. Is there any other way to achieve the same result?
I used to do the same by installing grub in root partition and then manually copying the first 512 bytes of root into a linux.bin file. Then copying this to C: drive and manually creating an entry in windows boot loader using bcdedit, directed to this file. This approach was used in MBR disk with legacy BIOS, but doesn't seem to work on a GPT disk with a UEFI, which I use now. I was unable to add Ubuntu to Windows boot-loader, but I found a work-around (if you can call it that). Install Ubuntu boot-loader in EFI partition and select it from the 'boot devices' selection menu during system boot.
Steps are as shown:
Install Windows first, afresh in UEFI mode (by disabling CSM). Let it create the required partitions automatically.
After installation has completed, go to Disk Management and shrink C: to make un-allocated space.
Boot from Ubuntu installation media and select 'Try Ubuntu'. Create the required partitions. I use root (/), swap and home (/home).
Now start installation. Select 'something else'.
Map the root, swap and home to respective partitions.
When it comes to 'device for boot-loader installation', select the EFI partition. Let the installation complete.
Thus we haven't touched the Windows boot-loader. When we restart we directly go to Windows as before.
To get into Ubuntu, tap the function key for boot devices selection (F11 in case of MSI boards).
Select the entry which shows 'Ubuntu'.
Now you can enter the newly installed Ubuntu.
Hope that was helpful. Good luck.