Skip to content

Instantly share code, notes, and snippets.

@eNV25
Last active June 20, 2026 04:35
Show Gist options
  • Select an option

  • Save eNV25/c8001491dc0440656ff7b0ae18993ba1 to your computer and use it in GitHub Desktop.

Select an option

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.

@osiris

osiris commented Dec 17, 2025

Copy link
Copy Markdown

Hi, I automated all BIOS update configuration process with Ansible in Ubuntu 18.04, tested on +3000 HP ProDesk 400 G5 ๐Ÿ˜Ž

@osiris

osiris commented Dec 17, 2025

Copy link
Copy Markdown

Hi, I automated all BIOS update configuration process with Ansible in Ubuntu 18.04, tested on +3000 HP ProDesk 400 G5 ๐Ÿ˜Ž

@WooHooWasTaken

Copy link
Copy Markdown

Hi, I have a HP laptop, and I was trying to update the UEFI for a long time. I tried this, and I tried that, and I experimented on my own, and I came to a solution that is both very elegant, and much simpler than I had expected. I also haven't seen anyone else use this method.
This is the step-by-step instructions for what I did:

  1. Go to the HP website and find the BIOS update for your laptop. Download it. Mine came as an .EXE
  2. The package I downloaded had another EXE inside of it called BIOSupdate.EXE
  3. I installed VirtualBox, set it up, and created a Tiny10 instance. I copied the BIOSupdate.exe into it and ran it.
  4. The program launched and told me that the BIOS update was incompatible with my system. That was to be expected; VirtualBox creates a virtual computer that the guest OS runs in, and does not interact with any physical hardware. It gave me two options: 1. Dump the binary files for the update into a chosen folder, or 2. Create a BIOS update USB drive to plug into the chosen computer.
  5. I plugged in a USB drive and gave VirtualBox access to it. I selected option 2 and it proceeded to write a BIOS update USB drive. I shut down VirtualBox and then shut down my laptop.
  6. I plugged in the USB drive and hit the power button. As soon as it lit up, I hit f9 to bring up the boot order menu. It didn't show the USB drive as a bootable device, so I chose "Boot from EFI" and it showed all the files in the USB drive. I chose HpBiosUpdate.efi, and it loaded the BIOS update tool! From there, it was just a couple of menus to navigate and a bit of a wait as it flashed my new BIOS. Then it rebooted.
    After it rebooted, I typed sudo lshw in a terminal, and it told my my current BIOS version. It was correct. The flash had worked.

@vc1cv1

vc1cv1 commented Jun 20, 2026

Copy link
Copy Markdown

it's midnight, I want to go to bed. I found my old usb stick that I had updated another HP model before. Hopefully this saves someone some time in the future mimicking the folder structure.

This worked on a HP Elitebook x360 G2 (it was on bios P80_135 before).

so, whether you need the other HP*.exe files or not ... I'm not going back to test. I initially did name it as 'firmware.bin' for the newer 151 on this usb stick -- that didn't work. So, I just copied the file over as it was (P80_0151.bin) and it worked fine.


./EFI
./EFI/HP
./EFI/HP/BIOS
./EFI/HP/BIOS/New
./EFI/HP/BIOS/New/P80_0135.bin
./EFI/HP/BIOS/New/HpqPswd.exe
./EFI/HP/BIOS/New/.BIN
./EFI/HP/BIOS/New/HPBIOSUPDREC.exe
./EFI/HP/BIOS/New/HPBIOSUPDREC64.exe
./EFI/HP/BIOS/New/HpqPswd64.exe
./EFI/HP/BIOS/New/P80_0151.bin
./EFI/HP/BIOS/New/firmware.bin
./Hewlett-Packard
./Hewlett-Packard/BIOS
./Hewlett-Packard/BIOS/New
./Hewlett-Packard/BIOS/New/P80_0135.bin
./Hewlett-Packard/BIOS/New/P80_0151.bin
./Hewlett-Packard/BIOS/New/firmware.bin
./boot
./boot/efi
./boot/efi/EFI
./boot/efi/EFI/HP
./boot/efi/EFI/HP/BIOS
./boot/efi/EFI/HP/BIOS/New
./boot/efi/EFI/HP/BIOS/New/.BIN
./boot/efi/EFI/HP/BIOS/New/HPBIOSUPDREC.exe
./boot/efi/EFI/HP/BIOS/New/HPBIOSUPDREC64.exe
./boot/efi/EFI/HP/BIOS/New/HpqPswd.exe
./boot/efi/EFI/HP/BIOS/New/HpqPswd64.exe
./boot/efi/EFI/HP/BIOS/New/P80_0135.bin
./boot/efi/EFI/HP/BIOS/New/P80_0135 (copy).bin
./boot/efi/EFI/HP/BIOS/New/firmware.bin
./boot/efi/EFI/HP/BIOS/New/P80_0151.bin

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