Note: Please read the full post with due diligence before posting comments/answers or downvoting/closing this question
Premise:
I first installed Windows 10 on my notebook-PC which created the EFI and other system partitions. I also created an extra partition. Once Windows was setup, I proceeded to install Ubuntu 22.04 on the extra partition; instead of choosing the "Install alongside Windows" option, I used the "Something else" option to complete the installation. Ubuntu installer created a directory called ubuntu
under the EFI directory on the eponymous partition.
Desired Outcome:
The dual boot functionality only works if I use the firmware boot manager (the one that can be accessed from the UEFI boot up screen by pressing some Fx key on startup). I want the Ubuntu OS entry to show up under the Windows Boot Manager.
What I tried:
Using the bcdedit
tool in windows I performed the following steps:
bcdedit /copy {bootmgr} /d "Ubuntu 22.04"
<--- returns a guid
bcdedit /set {guid} path "\EFI\ubuntu\shimx64.efi"
Although an entry for Ubuntu 22.04 shows up in the Windows Bootloader Menu, when I select it, after a restart, the error message thrown is:
.
.
.
Status: 0xc000007b
Path: \EFI\ubuntu\shimx64.efi
Message: The required file is missing or corrupted...
Perceived Problem:
I did some digging and I think the problem is this: chainloading error.
When the Windows Boot Manager tries to load the GRUB loader, the grub.cfg
file at \EFI\ubuntu\
tries to find a filesystem with an ID assigned by Ubuntu (whereas Windows assigns a different ID to the same partition for ubuntu). So, when attempting to load the shimx64.efi
Windows Boot Manager simply fails to find the required files.
Possible Solution:
This is where I need help - I think the problem can be solved by copying over some required files (say the mod files and actual grub.cfg) from the actual Ubuntu partition, into the EFI partition. So, the question is, which files and exactly what file structure?