The officially official Devuan Forum!

You are not logged in.

#1 2022-04-19 15:49:16

andyprough
Member
Registered: 2019-10-19
Posts: 327  

How-to boot GRUB with HP Envy laptop

I am following the instructions from the extremely helpful post by @edbarx who figured out how to boot the HP Probook 4540s in this post: https://dev1galaxy.org/viewtopic.php?id=15

I have an old 2012 HP Envy laptop that I was able to install Devuan on, but which would not boot normally. It did allow booting by finding the efi file from a boot menu, but it was a tricky process and looked like it could fail pretty easily, which would leave this machine un-bootable.

The trick that @edbarx figured out was to create a /boot/EFI/Microsoft/Boot/ folder and copy the /boot/EFI/debian/grubx64.efi file into the new Microsoft boot folder and change its name to bootmgfw.efi. That did not work in Legacy Boot mode on edbarx's HP Probook, but did work in EFI boot mode.

On my HP Envy laptop, it will boot in Legacy mode, and there's a small difference where the bootmgfw.efi file goes. Proceed as follows, as root:

cd /boot/efi/EFI/
mkdir -p Microsoft/Boot/
cp debian/grubx64.efi Microsoft/Boot/bootmgfw.efi

That's it, reboot, and should boot up normally now. Hopefully this will help someone else in the future find the correct path and bios settings for their HP laptop.

A few notes - to access the legacy BIOS settings in this HP laptop, I needed to hit the Escape key right after power up, as it will go directly to another failed boot attempt with a zero second delay. Have to have a fast Escape key finger. That brings up a screen with some options, including changing legacy BIOS settings, which can only be accessed with the F10 key - arrowing down to that option and hitting "Enter" will just go directly to a failed boot again. Pushing the F9 key on that menu gives access to an option to find the Devuan efi file, which is actually easy to do in HP's little cli file manager thingy.

Anyway, long story short, if you have a 2012-era HP laptop that is giving you trouble with booting, don't give up. My HP Envy system is very weird, from the keyboard entries to the menu prompts to the BIOS settings to the efi path, but it can all be navigated and fixed with a bit of patience.

Last edited by andyprough (2022-04-19 15:50:18)

Offline

#2 2022-04-19 16:25:22

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: How-to boot GRUB with HP Envy laptop

There are several motherboards that will only boot Microsoft's EFI loader if it is present on the EFI system partition so this advice is generally useful.

FWIW the machine should boot from $ESP/EFI/Boot/bootx64.efi if $ESP/EFI/Microsoft/Boot/bootmgfw.efi is not present.

For more on this see https://www.rodsbooks.com/efi-bootloade … ive-naming

EDIT: Devuan's grub-efi package has a configuration option to copy GRUB's EFI loader to $ESP/EFI/Boot/bootx64.efi that can be enabled with

# dpkg-reconfigure grub-efi-amd64 # or grub-efi-ia32

Say yes when it asks if you want to "force extra installation to the EFI removable media path".

Or just copy the loader and change the setting directly:

mkdir -p /boot/efi/EFI/Boot
cp /boot/efi/EFI/{debian/grubx64.efi,Boot/bootx64.efi}
debconf-set-selections <<!
grub-efi-amd64 grub2/force_efi_extra_removable boolean true
!

Last edited by Head_on_a_Stick (2022-04-20 09:47:47)


Brianna Ghey — Rest In Power

Offline

#3 2022-04-19 17:10:17

andyprough
Member
Registered: 2019-10-19
Posts: 327  

Re: How-to boot GRUB with HP Envy laptop

Head_on_a_Stick wrote:

Say yes when it asks if you want to "force extra installation to the EFI removable media path".

Oh interesting, so this is primarily for people who boot from an EFI partition on a USB drive, I would imagine. Something like that?

Offline

#4 2022-04-19 17:45:35

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: How-to boot GRUB with HP Envy laptop

Yes, exactly so. It comes in useful for all the crappy UEFI implementations out there, of which there are many.


Brianna Ghey — Rest In Power

Offline

Board footer