Score:1

Grub disappears after booting into Windows 10

cn flag

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.

oldfred avatar
cn flag
What brand/model system? Some do not support efibootmgr's change of boot order. You always install boot loader to a drive. With UEFI, it knows to add Ubuntu/grub to ESP - efi system partition. Lets see details, use ppa version with your live installer (2nd option) or any working install, not Boot-Repair ISO: Please copy & paste the pastebin link to the Boot-info summary report ( do not post report), do not run the auto fix till reviewed. https://help.ubuntu.com/community/Boot-Repair & review this: https://askubuntu.com/questions/486752/dual-boot-win-8-ubuntu-loads-only-win
Lodergen avatar
cn flag
Thank you so much for trying to help. The boot-info summary report is available here: https://paste.ubuntu.com/p/ypGXYSRPJv/ (before launching windows, directly from installed ubuntu) and https://paste.ubuntu.com/p/2rdZtMM2GV/ (after booting into windows), from ubuntu usb . I am using a HP laptop 15s-eq2xxx, system family HP Notebook. BIOS vendor AMI, bios revision F.03 (if that is relevant).
oldfred avatar
cn flag
This user with HP and AMD chip was not able to install in UEFI mode. You can use BIOS mode, which is not normally recommended, but cannot dual boot from grub, only from UEFI boot menu. https://ubuntuforums.org/showthread.php?t=2465857 HPs seem to be getting more difficult and always were not easy to dual boot. I would make sure you have newest UEFI. You also may need newest 21.04. Some have posted it works where 20.04 does not. Some have needed multiple boot parameters: https://ubuntuforums.org/showthread.php?t=2448727 Or with your system, you will have to try several different things.
Lodergen avatar
cn flag
Thank you for all the useful links. I tried some things and in the end somehow managed to fix the problem by using `bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi` in windows cmd instead of the usually recommended `\EFI\ubuntu\shimx64.efi` . I am not really sure why it works now, if I understood right the latter essentially just calls the former?
oldfred avatar
cn flag
Shimx64.efi is required for Secure boot. But I never have had UEFI Secure boot on and system is booting with shimx64.efi. But I have booted with grubx64.efi. Do not know if both files required or not. Or if shimx64.efi has checks for signed kernel & drivers but incorporates all of grubx64.efi or if it needs it also.
Lodergen avatar
cn flag
I vaguely remember that using `bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi` created a path beginning with just EFI\ instead of \EFI\, so without the first "\" if checked by running the `bcdedit` command. I'm almost certain it was not a typo since I tried it writing manually multiple times. I might remember wrong, I'm not retrying it now. Just writing down my speculation for others.
Lodergen avatar
cn flag
Thank you very much once again.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.