Skip to main content
Topic: A little trick I found with UEFI... [now with more detail] (Read 76 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.
AMD FX-6300 3.5 GHz 6-core Black Edition 16GB DDR3 RAM rated @1600MHz NVIDIA GT 1030 low-profile 2GB GDDR5 240GB primary SSD + 160GB secondary HDD w newest PCI-E intel bluetooth 4.2(?) card zen-kernel
Toshiba Satellite L745D 1.4GHz 4-core 4GB DDR3 RAM rated @1333MHz Radeon HD 6520G 750GB HDD + 2TB external zen-kernel(home-server, operates stereo) - missing laptop screen
Acer Aspire 5551-2863 2.1GHz 2-core 6GB DDR3 RAM rated @1066MHz Radeon HD 4225/4250 120GB zen-kernel(works as video-player while gaming on main PC)  - missing laptop screen
HP Elitebook 8440p 2.4GHz 4-core 8GB DDR3 RAM rated @1600MHz intel i915 128GB 3D NAND SSD zen-kernel(my official laptop)
Raspberry Pi 3B 4-core 1.2GHz 1GB RAM ARM processor (camera system, MotionEye)