Score:4

Windows 11 erases GRUB every time I launch it from GRUB itself

cn flag

So I have been trying to solve this problem from several hours for now:

Problem explanation

I bought a new computer (HP OMEN 15) with Windows 11 already installed. I did a dual boot with ubuntu, which perfectly worked... until I booted again on Windows (from GRUB). Then, GRUB disappears and only windows boot manager remains.

So I reinstalled GRUB according to these instructions: https://doc.ubuntu-fr.org/tutoriel/comment_restaurer_grub . And this worked, but the problem remained: upon launch, windows 11 erases GRUB again.

So then I inactivated windows boot manager following these instructions https://unix.stackexchange.com/questions/241809/grub2-gone-every-time-i-boot-windows-10 and I could clearly observe Windows boot manager was set inactive. So after that I reinstalled grub and ran agan efibootmgr but then windows boo manager was not in the list anymore. Ubuntu was standing where it was. So I thought "ok this time the problem is solved".

I double checked in my computer's BIOS: Windows boot manager had also disappeared and only "OS Boot Manager" was to be seen.

Upon boot, my computer properly open GRUB and I had the possibility to boot on ubuntu (which worked), or on Windows (even if there was no "Windows boot manager" either in the output of efibootmgr or in the Boot options list of my BIOS).

But still, when I chose to boot on Windows, the same problem happened again: GRUB disappeared.

Clarification

Hypothesis

What I think (with my low knowledge) it is related to:

  • As Windows boot manager somehow semms to disappear in GRUB's installation process, windows clears everything and restores it upon startup. If so, is there a way to "tell" windows not to look for its boot manager ?

What I need

I am in dire need of help. I would like to solve this disappearing GRUB problem and have a better understanding of what is going on here.

I am aware I may not have been clear enough, but I hope there is enough info for someone to help me !

Thank you for your reading time !

karel avatar
sa flag
If nothing else works maybe you'll have to use Windows Boot Manager instead of grub. [Uninstall GRUB and use Windows bootloader](https://askubuntu.com/q/429610/)
ChanganAuto avatar
us flag
Some HP laptops are notorious for overriding UEFI boot order but should be possible to boot Ubuntu from the F9 menu. Also when dual-booting with Windows disabling its Fast Startup feature is a must and especially in this cases.
us flag
Another reason why Windows should be erased.
Julien Bocage avatar
cn flag
@ChanganAuto : I disabled the Fast startup option but it didn't solve the problem. (Thank you though, I will keep it disabled from now on !)
ChanganAuto avatar
us flag
OK, but is the problem Grub being somehow deleted, as it appears to be the claim here, or it just boots Windows directly regardless of the boot order setting? The difference is huge, the former won't let you boot Ubuntu no matter what, while the latter allows at least Ubuntu to boot if selected with the F9 menu.
oldfred avatar
cn flag
HP is one that does not work with changes using efibootmgr either manually or as grub install uses efibootmgr to set boot order. Many with HP post that changing boot order in UEFI settings (not UEFI boot menu) does work. Not sure if it is always syncing Windows BCD. You may be able to add entry to BCD, but do not know details or if then using HP's UEFI menu also updates BCD?
heynnema avatar
ru flag
@ArchismanPanigrahi And so how do you propose doing BIOS or firmware updates without Windows. How to run Windows-only apps? Best to leave it in a dual-boot configuration.
ChanganAuto avatar
us flag
@oldfred *Many with HP post that changing boot order in UEFI settings*... Yes, some do, some don't. Many override the boot order even if set at (F10) UEFI > Boot menu. I've seen the same happening in a AMD Ryzen based Maibenben from a few years ago. A more recent model with optional preinstalled Ubuntu does dual-boot as we expect.
Julien Bocage avatar
cn flag
@ChanganAuto : Well in fact GRUB's EFI files were still here, but when entering the BIOS, ubuntu was not listed anywhere, and Windows Boot Manager had reapeared. So this is not about the boot order (or so do I think)
Julien Bocage avatar
cn flag
@oldfred : I finally edited the {bootmgr} in bcdedit to make point to shimx64.efi. This solved the problem even if upon booting my computer briefly shows me an error message (for less than 1 sec) before showing me the GRUB screen. I am going to explain that as an answer to my own question.
oldfred avatar
cn flag
Do you still have an UEFI boot entry that points to Windows? As grub only boots working Windows and you always need a way to boot Windows. I do not understand BCD but would want two entries if possible, one Windows & then one for shim.
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.