Score:0

I renamed grubx64.efi file to bootmgfw.efi to dual boot. Is it right?

fm flag
  • I use a HP laptop, GPT disk, dual boot win 11 and ubuntu. But it always boot into window boot manager and doesn't show Grub menu. I must go to boot option to choose Ubuntu.

  • I tried: Boot repair, "bcdedit... grubx64.efi", bios setting, turn off secure boot, add GRUB_DISABLE_OS_PROBER=false to grub.cfg, etc but it wasn't ok.

  • So I think some devices have set defaults to boot from Windows and prevent other systems from changing it.

  • Then, i found and knew "Windows bootmanager" boot from bootmgfw.efi (/efi/micosoft/boot). Ubuntu boot from grubx64 or shimx64. So i had an idea:

    1. rename bootmgfw.efi to bootmgfw1.efi
    2. Copy grubx64.efi to /efi/micosoft/boot. Rename it to bootmgfw.efi. So, when i boot, my laptop will show grub2 menu.
    3. Edit 40_custom file (/etc/grub.d) to boot window 11 from bootmgfw1.efi
    4. Update grub

    And it works. Now i can dual boot from Grub menu: 1. Ubuntu 2. Windows boot manager (it 's grub menu because i replaced bootmgfw.efi with grubx64.efi) 3. Windows 11 (40_custom)

So, do you think about my solution. Is it right?

oldfred avatar
cn flag
Years ago that was a work around, but not recommended, now. The issue is grub only boots working Windows. That means Windows fast startup/hibernation must be off & Windows updates may turn it back on without you knowing. And then you cannot boot Windows. You need to keep an UEFI boot entry for Windows. HP seems to always default to the Windows UEFI boot file.
oldfred avatar
cn flag
But many with HP, say they can go into UEFI settings and change boot order to use Ubuntu first. And if a Windows UEFI or fwupdate in Ubuntu update UEFI, it may turn UEFI Secure boot back on. Then grubx64.efi will not boot. You have to have the full secure boot version of grub, kernels & drivers. Or first go into UEFI & turn Secure Boot off again if issue happens.
cc flag
Another HP workaround is (after a normal grub install) to replace device bootloader: replace EFI/Boot/rootx64.efi with shimx64.efi, and also put grubx64.efi in that directory (although these days, grubx64.efi in the same directory may not be necessary). Then put the device first in the bootorder. Check the size of rootx64.efi against shimx64.efi and bootmgfw.efi, a grub install may already have done this.
The_Nhu avatar
fm flag
Tks for all!!!!
I sit in a Tesla and translated this thread with Ai:

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.