Grub disappears and is replaced by the Windows bootloader after booting into Windows 10 (Windows 10 and Ubuntu 20.04 dual boot)
I installed ubuntu 20.04 alongside windows 10 from the ubuntu installation USB, I created a new partition and chose the device for the bootloader installation: Windows boot manager.
Everything seemed to be working fine (if using Ubuntu), until I tried booting into Windows. The grub menu disappeared and I started to boot directly into Windows. The grub menu could be restored by running the boot-repair from the Ubuntu USB, but was lost again when booting into Windows.
In the BIOS setup options I can select the UEFI boot order. However, apart from USB flash drive and USB CD/DVD ROM drive options, there is only one option under the OS Boot Manager. It is called Ubuntu (INTEL SSDPEKNW512G8H) before booting into Windows. After that Ubuntu option disappears and is replaced by the Windows boot manager option. Even efibootmgr appears to only have one possibility, so no Windows option before booting into windows:
efigbootmgr output:
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0002,9999
Boot0002* Ubuntu
Boot9999* USB Drive (UEFI)
Things that I tried so far:
I disabled the bitlocker disc encryption in Windows, since it demanded a security key every time after the Ubuntu installation. After that it stopped complaining. I also disabled the secure boot option in bios since I was warned about it by the boot-repair. I also disabled the fast boot option in Windows.
I tried running the bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi
in Windows cmd to redirect the Windows bootloader to grub, however, after that I am not even able to boot into Windows. Instead I am welcomed by the following message:
Failed to open \EFI\ubuntu\some Chinese characters – Invalid Parameter
Failed to load image \EFI\ubuntu\some Chinese characters: Invalid Parameter
Start_image() returned Invalid Parameter
Followed by the “boot device not found”. I checked the path and shimx64.efi
exists in that folder. The changes could be reversed with Bcdedit /set {bootmgr} path \EFI\Microsoft\Boot\bootmgfw.efi
, which is the original path to the Windows bootloader.
I also tried to delete the bootmgfw.efi
and replaced it by the renamed shimx64.efi
from the Ubuntu folder. This also did not fix the problem since after that the windows option in grub just refreshed the grub menu.
I do not know what else to try and am a bit tentative since my knowledge of this is very limited. Any advice on what else to tried will be appreciated.
solution: running bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
in windows cmd instead of shimx64.efi.