Skip to content

Instantly share code, notes, and snippets.

@eNV25
Last active April 16, 2025 18:44
Show Gist options
  • Save eNV25/c8001491dc0440656ff7b0ae18993ba1 to your computer and use it in GitHub Desktop.
Save eNV25/c8001491dc0440656ff7b0ae18993ba1 to your computer and use it in GitHub Desktop.
Instructions to Update the BIOS/UEFI for an HP Laptop on Linux

Instructions to Update the BIOS/UEFI for an HP Laptop on Linux

To update the BIOS/UEFI firmware requires HP-specific files in the EFI System Partition, also referred to as ESP.

On a Linux system, the ESP is typically mounted on /boot/efi or /efi. Whithin you should also find a EFI directory, e.g. /boot/efi/EFI or /efi/EFI. This article assumes that the ESP is mounted on /efi and that the /efi/EFI directory exists. You can replace that with the mount point your system uses.

The HP-specific files are located in /efi/EFI/HP or /efi/EFI/Hewlet-Packard. These files typically come preinstalled in HP Windows PCs. If you have these files you could skip Install HP-specific files.

Install HP-specific files

We can obtain the HP-specific files using HP's HP PC Hardware Diagnostics 4-IN-1 USB KEY installer. This installer contains the needed files. We can simply extract this installer and copy the needed files to the ESP

HP's installer only runs on Windows, but it is possible to extract it by running the self-extracting executable on Wine. You cannot simply extract the executable using 7-zip because the executable needs to do some file generation.

Download the executable. You can get the URL to the latest executable from HP's website.

$ wget https://ftp.hp.com/pub/softpaq/sp112501-113000/sp112853.exe

Run the executable using wine. This will extract its contents to ./sp112853.

$ wine sp112853.exe /s /e /f sp112853

Copy the HP-specific files to the the ESP.

# cp -r sp142721/field/{Hewlett-Packard,HP} /efi/EFI/

According to HP, this works for most hardware. For some cases you may need additional files. I have tired this with an HP Pavilion 13-an0008ne Laptop only, which required no additional steps.

Install BIOS update

You'll need to find you updated BIOS image. You can find one by going to HP's Software and Drivers page, and input your serial number. Make sure you select Windows as your Operating System, otherwise it may not show the updates.

These drivers often also come in Windows executables, you should run them in wine. The executable will first fail to install automatically. Then it will display different options on how to procede. Select the Copy option and select a directory where the BIOS image and the key file should be copied to.

$ wget https://ftp.hp.com/pub/softpaq/sp112501-113000/sp112516.exe
$ wine sp112516.exe /s /f sp112516           # extract and execute

Complete BIOS update using HP Hardware Diagnostics

There should be a .bin and an .s12 file. Copy these files to the ESP to the directory /efi/EFI/Hewlett-Packard/BIOS/New and /efi/EFI/HP/BIOS/New. Here I am using 084C5 as an example.

# mkdir /efi/EFI/Hewlett-Packard/BIOS/New
# cp sp112516/084C5{.bin,.s12} /efi/EFI/Hewlett-Packard/BIOS/New
# mkdir /efi/EFI/HP/BIOS/New
# cp sp112516/084C5{.bin,.s12} /efi/EFI/HP/BIOS/New

At this point you should have the needed HP-specific files and the BIOS update installed in the ESP. Now, you can actually complete the update.

Boot into firmware settings and press F2 to enter HP Hardware Diagnostics. You should be presented a menu and there should a menu entry named BIOS Management. Navigate to BIOS Management > Update BIOS. Your BIOS should start updating.

If you have enabled Secure Boot with custom keys, you will first need to sign the HP-specific .efi files.

Complete BIOS update using Win+B key combination

Sometimes the previous method does not work, and the BIOS Management option does not show up. You can alternatively copy the .bin and .s12 file to /efi/EFI/Hewlett-Packard/BIOS/Current or /efi/EFI/HP/BIOS/Current, and press Win-B while the PC is booting up. This key combination should cause a BIOS firmware recovery using the files you copied.

Also note that updating will re-enable Secure Boot if had it disabled. If so, you might want to disable it again. Your custom Secure Boot keys will be preserved.

@DaRandomCube
Copy link

so, how do i know which additional files i need and where do i place them?

@alexey198233
Copy link

so, how do i know which additional files i need and where do i place them?

you can read step by step manual here :
https://gist.github.com/alexey198233/087a1a52d7a31b07bc4e114220561bac

@tkapias
Copy link

tkapias commented Dec 26, 2024

Might help some people:

  1. The extracted Bios image contained 3 version of .bin and .s12 files. None of them was exactly matching, the closest one was a 0820D, my bios contained a 825D reference... So I copied all of them in Bios/New.

  2. The HP Hardware Diagnostics menu did not contain a BIOS Management > Update BIOS. But there was a menu at boot to select an efi file to boot from. So I selected biosmgmt.efi somewhere in the EFI/HP/ directory.

  3. It worked, but after the update I got a "Boot device not found" (03F0) error. I had to use a use a Debian Live usb drive to rebuild the /boot/efi. Look for GrubEFIReinstall in Debian's wiki.

@sarrchri
Copy link

sarrchri commented Feb 28, 2025

Can this help?

https://ftp.hp.com/pub/caps-softpaq/cmit/linuxtools/HP_LinuxTools.html

  The toolset is compatible with the following HP systems:
     2015 and newer HP Desktop Workstations
     2018 and newer HP business Notebooks and Desktops.

This utility will not work on platforms prior to those listed above.

Just dropping this bit of information here:
These HP Linux Tools do indeed work for updating the BIOS. But it really does ONLY update the BIOS.
What I mean is, it does not update any of the additional firmwares (which are in fact bundled in the BIOS binary), such as USB-C PD firmware, Intel Management Engine, Camera firmware, Clickpad firmware, etc..

So if you want to update those firmwares, you need to actually run the BIOS via "normal" tools, so Windows tools (or, if supported, from BIOS via the "Update from Local media" or "Update from HP.com").

And yes, this tool will not work on e.g. EliteBook G1/G2 or older. It works from EliteBook G3 onwards. (But even on G3, only AFTER a specific BIOS version, IIRC something like 1.30 or so). On EliteBook G4 (and newer), it works since the initial BIOS-version.

@Zetarancio
Copy link

Hello there, I just want to mention how I successfully updated the bios from 1.27 -> 1.31 on my HP elitebook 1030 g3.

  1. Run the update exe in wine, copy everything to /EFI/HP/DEVFW
  2. Rename Q90_013100.bin to firmware.bin (I've read this somewhere but I do not think this is needed).
  3. Reboot and update the bios directly into the bios interface.

@sarrchri
Copy link

sarrchri commented Apr 9, 2025

Hello there, I just want to mention how I successfully updated the bios from 1.27 -> 1.31 on my HP elitebook 1030 g3.

  1. Run the update exe in wine, copy everything to /EFI/HP/DEVFW
  2. Rename Q90_013100.bin to firmware.bin (I've read this somewhere but I do not think this is needed).
  3. Reboot and update the bios directly into the bios interface.

Out of curiosity, is the firmware file deleted from /EFI/HP/DEVFW automatically by the BIOS after successful install? And did it also update firmwares (such as Intel ME)?

@Zetarancio
Copy link

Hello there, I just want to mention how I successfully updated the bios from 1.27 -> 1.31 on my HP elitebook 1030 g3.

  1. Run the update exe in wine, copy everything to /EFI/HP/DEVFW
  2. Rename Q90_013100.bin to firmware.bin (I've read this somewhere but I do not think this is needed).
  3. Reboot and update the bios directly into the bios interface.

Out of curiosity, is the firmware file deleted from /EFI/HP/DEVFW automatically by the BIOS after successful install? And did it also update firmwares (such as Intel ME)?

Nope. I manually deleted the folder. Yes the firmware was updated.
I did it last year to update from a previous version but I did not report back then because I copied the files to many different folders and I couldn't tell which one worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment