Skip to content

Instantly share code, notes, and snippets.

@eNV25
Last active October 28, 2024 14:10
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.

@eNV25
Copy link
Author

eNV25 commented Jan 24, 2023

I have updated the gist so that it doesn't use a separate USB drive.

@dmitrmax
Copy link

dmitrmax commented Jan 24, 2023

@eNV25 nice! But I'm not sure whether it should be /efi/HP/BIOS/Current or /efi/HP/BIOS/New. I saw different variants around the internet. So I just did both before I attemped and it succeeded )

Also mine worked when Win-B was pressed and held before power on button was pressed. May be it is also important.

@TicTac7x
Copy link

TicTac7x commented May 22, 2023

I updated my omen 15 ek-1000 to F.32 and now I can't downgrade it any longer. The bios updater from windows doesn't allow selecting the update option to be selected.

Trying to flash old bios from usb also fails (Failed to find bios signature file).

Also tried with this method, where i manually copy old bios files to efi partition, then running bios managememt efi from bios update folder (same error about signature failure)

And Win + B only shows that bios recovery files are not found or corrupted (i copied them both to HP folders including Current and New folders).

Any ideas?

@eNV25
Copy link
Author

eNV25 commented May 22, 2023

@TicTac7x Did you copy the signature file (.s12, or similar) too?

@TicTac7x
Copy link

TicTac7x commented May 22, 2023

Yes, mine is .sig file, i also tried to make duplicate of it and rename it to .s12, still fails with the signature check.

If i use the latest bios version, the .sig file is in same place and there is no error about the sig file. I have no idea how to downgrade the bios now...

Feel free to add me on discord to discuss it, willing to pay money if someone helps me get it resolved.

TicTac7x#5352

@eNV25
Copy link
Author

eNV25 commented May 23, 2023

Why do you want to downgrade? Just curious.

@TicTac7x
Copy link

TicTac7x commented May 23, 2023 via email

@TicTac7x
Copy link

Found following tool to flash bios from linux without verification: https://ftp.hp.com/pub/caps-softpaq/cmit/linuxtools/HP_LinuxTools.html

Has anyone tried using it or is this something better not to use?

@dmitrmax
Copy link

Found following tool to flash bios from linux without verification: https://ftp.hp.com/pub/caps-softpaq/cmit/linuxtools/HP_LinuxTools.html

Has anyone tried using it or is this something better not to use?

Nope. I see it for the first time in my life. If I didn't find out how to deal with EFI way of flashing (above) I would definitely give it a try.

@TicTac7x
Copy link

EFI way of flashing is easier than compiling this thing tho... But i'm not sure if I have the guts to try this out, wouldn't want to turn my laptop to a paperweight :)

@dmitrmax
Copy link

EFI way of flashing is easier than compiling this thing tho... But i'm not sure if I have the guts to try this out, wouldn't want to turn my laptop to a paperweight :)

Well, you know, the most nervous flash was the one described above. Because it was rebooting several times with intervals of being off for quite a time with no indication that everything is going fine. I'd expect that this tool you've found is more user friendly and will check for compatibility of firmware file and will explain you further steps and what to expect.

So, next time I'll give it a try because I don't expect to get a brick at the end with it )

@TicTac7x
Copy link

TicTac7x commented May 24, 2023 via email

@supertin
Copy link

@Samweis2111
Thank you so much... The Win+B thing was what I needed. I wish HP would just let you download a bootable disk image with the flash toop and a binary file for the BIOS like many other vendors do... Never have this issue with Asus systems for example.

@ant9000
Copy link

ant9000 commented Sep 18, 2023

Since this version im getting BIOS reset errors, fan curve is different, laptop is running hotter, resume from sleep no longer works (screen stays black, i need to force poweroff from button and then again i get BIOS RESET error). So yeah, this version is really bad compared to previous ones... Looking for any way to downgrade this.

Hello, same problem here: latest version from HP resets the laptop after 15-30 seconds, on and on forever, and downgrading does not work.
Have you ever found a solution?

Thx in advance!

@ant9000
Copy link

ant9000 commented Sep 19, 2023

In answer to my own question: I did a BIOS recovery again with the same version (the latest). No errors (as before), and this time my laptop works correctly. Likely, I borked something on the first attempt.

@DuxAlex
Copy link

DuxAlex commented Dec 8, 2023

Could you help me ? Which version should I install? See the specs of my laptop.

Item Valor
Nome do Sistema Operacional Microsoft Windows 10 Pro
Versão 10.0.19045 Compilação 19045
Outra Descrição do Sistema Operacional Não disponível
Fabricante do Sistema Operacional Microsoft Corporation
Nome do sistema KRYPTO
Fabricante do sistema Hewlett-Packard
Modelo do sistema HP Pavilion g7 Notebook PC
Tipo do sistema PC baseado em X64
SKU do sistema D6X23EA#UUZ
Processador AMD A8-4500M APU with Radeon(tm) HD Graphics, 1900 Mhz, 4 Núcleo(s), 4 Processador(es) Lógico(s)
Versão/data do BIOS Insyde F.2A, 18/07/2016
Versão do SMBIOS 2.7
Versão do Controlador Incorporado 57.53
Modo da BIOS UEFI
Fabricante da BaseBoard Hewlett-Packard
Produto BaseBoard 184B
Versão da BaseBoard 57.35
Função da Plataforma Móvel
Estado da Inicialização Segura Desativado
Configuração PCR7 Ligação Impossível
Pasta do Windows C:\Windows
Pasta do sistema C:\Windows\system32
Dispositivo de inicialização \Device\HarddiskVolume1
Localidade Brasil
Camada de Abstração de Hardware Versão = "10.0.19041.3636"

@eNV25
Copy link
Author

eNV25 commented Dec 8, 2023

You should search your serial code in the HP drivers and firmware website. You will find the update file there.

@5cover
Copy link

5cover commented Jan 1, 2024

In the "Complete BIOS update using HP Hardware Diagnostics" section:

Are you sure the /efi/ESP/HP/BIOS/New path is correct? Isn't it /efi/EFI/HP/BIOS/New?

@eNV25
Copy link
Author

eNV25 commented Jan 1, 2024

That's a typo. Fixed.

@matez0
Copy link

matez0 commented Jan 5, 2024

BIOS update for HP ProBook x360 435 G8

  • Download the BIOS firmware package (sp*.exe) of the product from HP.
  • Unzip (7zip) the .exe file.
  • Copy the .bin file (T80_*.bin) into the path /HP/DEVFW/firmware.bin of a FAT32 formatted USB stick.
  • Reboot and press ESC key.
  • Select "Update System and Supported Device Firmware" menu.

Note: if the .bin file is copied with the same name to the folder required by the BIOS update tool, it will not find that. The filename firmware.bin is important. 🙈

@berarma
Copy link

berarma commented Jan 7, 2024

Newer updates only contain the file WinFlash.exe. How can we proceed in this case?

@eNV25
Copy link
Author

eNV25 commented Jan 8, 2024

Try running in wine like wine WinFlash.exe /?. It might list options and give a hint.

@berarma
Copy link

berarma commented Jan 8, 2024

Try running in wine like wine WinFlash.exe /?. It might list options and give a hint.

Thanks. It immediately tries to upgrade the BIOS and fails.

I've found this thread recommending to create a Windows recovery disk and use it to execute the file and update the BIOS. I'll try this but I would prefer the EFI method if it could work again.

@dmitrmax
Copy link

dmitrmax commented Jan 8, 2024

Try running in wine like wine WinFlash.exe /?. It might list options and give a hint.

Thanks. It immediately tries to upgrade the BIOS and fails.

It is OK, that it tries and fails. But do not acknowledge error message and don't finish the application. Until you accept error message, it will keep its files unpacked in the temporary folder. You can find the folder, copy all files and the finish the app by accepting its error message.

@berarma
Copy link

berarma commented Jan 8, 2024

It doesn't show any window, only messages in the terminal. It looks for a driver with a name that seems related to BIOS and then exits with an error.

@UbayGD
Copy link

UbayGD commented Jan 15, 2024

Although I have not yet been able to update the BIOS (rather I have not dared to update it) I want to thank you for this guide because I was already imagining having to deal with USB or similar devices.

The only "problem" I've had is that when I extract the update files I get 3 different ones (each one with its own .bin, .s12 and .sig) and then I don't know which one to choose :') And I'm afraid of leaving the laptop as a paperweight or something similar.

@dmitrmax
Copy link

@UbayGD the later two files are digital signature of .bin blob. You just couldn't flash them instead of the right binary.

@eNV25
Copy link
Author

eNV25 commented Jan 15, 2024

@UbayGD Just copy all of those files to the directory depending on the method.

@UbayGD
Copy link

UbayGD commented Jan 15, 2024

@UbayGD the later two files are digital signature of .bin blob. You just couldn't flash them instead of the right binary.

@UbayGD Just copy all of those files to the directory depending on the method.

The thing is that I have 3 .bin to flash and I'm afraid to select the wrong one :')

  • 089A0ME0.bin
  • 08A1EME0.bin
  • 08A1DME0.bin

@eNV25
Copy link
Author

eNV25 commented Jan 15, 2024

@UbayGD Where did these come from? Were all of these from your device specific BIOS update?

I think the HP PC Hardware Diagnostics 4-IN-1 USB KEY files should have a .csv file somewhere. That might help.

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