Skip to main content
Topic: A little trick I found with UEFI... [now with more detail] (Read 2619 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

A little trick I found with UEFI... [now with more detail]

So I was struggling to get UEFI to work on my new HP Elitebook 8440p, but I found a little trick that actually works believe it or not.

Hey everyone, I’m posting this to let people know how to get around having to select the EFI file to boot up in UEFI mode, my elitebook is an 8440p & I struggled with this problem for half a day, if you cannot select the EFI file in your BIOS boot menu then you must chroot into your system & do it, the best time to do this is right after the installation has finished before you restart while you’re still booted up on the USB.

here’s what I did:

cd /boot/efi/EFI/

You will see your Linux distro’s name in most cases, like void_grub or Artix, go into that folder & you’ll see the file name “grubx64.efi”

to see the file:
ls void_grub / ls Artix / etc

You should see grubx64.efi in your Linux distro’s folder, some PCs won’t recognize grubx64.efi, instead they’ll recognize

Now, make the following directory:

sudo mkdir -p /boot/efi/EFI/Microsoft/Boot/

Now we can copy the .efi file into the directory

cp /boot/efi/EFI/void_grub/grubx64.efi /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi

Now your PC will boot the Linux UEFI file thinking it is Windows, its apparent that HP only wanted Windows to work with UEFI, otherwise other .efi files would actually work instead of only “bootmgfw.efi”

NOW, if that doesn’t work, try this:

cd /boot/efi/EFI/Microsoft/Boot/

sudo cp bootmgfw.efi bootmgr.efi
sudo cp bootmgfw.efi bootx64.efi
sudo cp bootmgfw.efi grubx64.efi

Turns out all I have to do to boot another OS is to replace the .efi from the linux distro’s folders in /boot/efi/EFI/ to /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi so I can just replace the .efi file instead of having to figure out a dual-boot, because my PC allows me to select a .efi file to boot, but will only automatically boot the /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi so dual-boot isn’t even needed! How about that eh?!

Update: Turns out Artix recognizes Void Linux with os-prober & then update-grub, I wasn’t expecting it to do that!

How to handle the GRUB: OK so let’s say I’ve got Artix Linux controlling the GRUB & I’ve got Void Linux as a secondary:
You MUST keep GRUB installed on Void Linux & do update-grub on both distros when upgrading the kernel, but you must NOT do grub-install from the distro that isn’t controlling GRUB. os-prober will find the GRUB on Void Linux & add it into the GRUB on Artix.