How to perform a HP BIOS upgrade with only Ubuntu?
Solution 1
This method worked fine on an HP EliteDesk 800 G2 TWR when I tested. I guess this method is not supported by HP, so I add this warning: a BIOS upgrade, if failed, can break your computer!
Requirements
- Operating system: Ubuntu (installed in UEFI mode)
- Hardware: HP EliteDesk 800 G2 TWR (L1G77AV)
Maybe this method might work for other HP computer models too?
Note: A USB stick is not required.
Method
Detect information about your computer
This was done on an Ubuntu 18.10 computer.
linux@desktop:~$ lsb_release -d
Description: Ubuntu 18.10
linux@desktop:~$
Most computers nowadays use UEFI
linux@desktop:~$ if [ -d /sys/firmware/efi ]; then echo UEFI is active; fi
UEFI is active
linux@desktop:~$
Check that there is enough disk space free under /boot/efi to be able to store the BIOS binary file.
linux@desktop:~$ df -h /boot/efi/
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 1,9G 23M 1,9G 2% /boot/efi
linux@desktop:~$
Detect the HP serial number
linux@desktop:~$ sudo cat /sys/class/dmi/id/product_serial
XXXXXXXXXX
linux@desktop:~$
(In this example the HP serial number was replaced by XXXXXXXXXX)
Detect the current BIOS version and date
linux@desktop:~$ sudo cat /sys/class/dmi/id/bios_version
N01 Ver. 02.36
linux@desktop:~$ sudo cat /sys/class/dmi/id/bios_date
07/18/2018
linux@desktop:~$
Download the latest BIOS
To download the latest BIOS from hp.com:
- Click Support
- Click Support & troubleshooting
- In the web form copy and paste the previously detected HP serial number (XXXXXXXXXX) and search for it.
- Click Software and Drivers.
- As operating system select Windows.
- As operating system version select Window 10 (64-bit).
- Check that the latest available BIOS version is newer than what is already installed on the computer.
- Download the latest BIOS. (For me the BIOS file was called sp90164.exe)
Extract the BIOS binary file
linux@desktop:~$ which 7z
linux@desktop:~$ sudo apt-get install -y p7zip-full
linux@desktop:~$ which 7z
/usr/bin/7z
linux@desktop:~$ mkdir /tmp/test
linux@desktop:~$ cd /tmp/test
linux@desktop:/tmp/test$ 7z e ~/Downloads/sp90164.exe
linux@desktop:/tmp/test$ sudo mkdir -p /boot/efi/EFI/HP/BIOS/New
linux@desktop:/tmp/test$ ls /boot/efi/EFI/HP/BIOS/New | wc -l
0
linux@desktop:/tmp/test$ sudo cp *.bin /boot/efi/EFI/HP/BIOS/New
linux@desktop:/tmp/test$ ls /boot/efi/EFI/HP/BIOS/New | wc -l
1
linux@desktop:/tmp/test$
Update the BIOS
- Reboot the computer and go into the BIOS (usually by pressing the Esc key soon after the computer is starting up).
- Select BIOS Setup
- Select Update System BIOS
- Select Update BIOS Using Local Media.
Solution 2
You can use file-roller
(in Nautilus: right click > open with… > archive manager) or cabextract
to unpack HP's BIOS update packages. The one I just tried contains two identical MS-DOS executables that are in turn self-extracting archives. They contain a .bin
files which is the BIOS update you're looking for. Put it on a USB drive and you should be able to instruct the EFI BIOS to update itself from that drive.
Solution 3
Here's what I did to update the bios on my HP x2 210 G2 running only Ubuntu 20.04 LTS.
Note that this does require another windows pc to open the bios-update executable, but there is no need to install windows on the target pc, nor do you need a windows recovery disk or windows-pe or any such thing.
The solution is based on this HP support answer, the HP docs for creating a bios recovery drive, and a bit of trial-and-error with fingers crossed.
-
Use a separate Windows system to download the correct bios-update executable for your system from the HP support site. In my case the file was called
sp95703.exe
(HP Notebook System BIOS Update, version F.35 Rev.A). -
Run the executable on the Windows system. Don't worry, it will not try to install the update, but it will open a utility that creates a bios recovery drive, as explained on the HP site. Follow the steps to create the USB recovery drive.
-
Turn off the target system, in my case an HP X2 210 G2, insert the recovery USB drive, and start it up again.
-
In my case, the device did not boot from USB automatically, so I hit esc immediately after turning on, to enter the "startup menu". Here I chose F9 "Boot Device Options", then "Boot from EFI file". Select the file system named
HP_TOOLS
, navigate toHewlett-Packard
,BIOSUpdate
, and finally select theHpBiosMgmt.efi
.
This started the update process.
Solution 4
In my case, for a HP ProDesk 400 G4 Desktop Mini PC
with Ubuntu 20.04 on it, I had to unzip the .exe (7z x spxxx.exe) file and move the *.bin to:
/boot/efi/EFI/HP/DEVFW/firmware.bin
. I had to rename the *.bin file to firmware.bin. After restart the bios update worked. I should mention that moving the *.bin to /boot/efi/EFI/HP/BIOS/New
did not worked for me. Hope this helps someone.
Related videos on Youtube
![dargaud](https://i.stack.imgur.com/Re0W1.png?s=256&g=1)
dargaud
Updated on September 18, 2022Comments
-
dargaud almost 2 years
I have a HP Spectre XT netbook. The installed BIOS is F14 and the latest one on their website is F26. I'd like to do an upgrade but they only provide a Windows executable. I tried booting with FreeDOS (using the Ultimate Boot CD), but the executable won't run in DOS, only Windows. I don't want to install Windows anywhere (I don't have it, I replaced it off the system disk with Ubuntu). So how can I upgrade with only Ubuntu installed on my system ? I haven't tried Wine, does it work for that purpose ?
-
Admin over 9 yearsI would not upgrade the bios using wine but it's probably doable. But if anything goes wrong you could be out a computer.
-
Admin over 9 years@daniel: Usually that doesn't work as wine can't give direct hardware access which a BIOS update needs. If it does, I fond it dangerous as many things work differently with Wine than Windows, which the updater was tested against.
-
Admin over 9 yearsMy apologies I figured it would
-
Admin over 9 yearsThat windows executable is a self-extracting archive and you do NOT need Windows for it; freedos is enough. All it holds is a .BIN file. So the procedure would be: download file, unzip it, put .BIN file on a fat32 partition. Use that to have it update.
-
Admin over 9 yearsIt depends on the BIOS, some "modern" bios will not upgrade outside of windows. In that event you may have to write your own - see bios-mods.com
-
Admin over 3 years@Panther I've written (very simple) BIOSes for ARM embedded systems but I'm not touching an x86 one with a ten foot pole.
-
-
Pilot6 almost 9 yearsWill you give a link to "hp PC diagnostics tool" and how to install it to USB?
-
Fabby almost 9 yearsPlease update...
-
MATT W almost 9 yearsHi ,sorry for Delay but had to get to my own PC
-
MATT W almost 9 yearsPOSTED ALL LINKS NEEDED ,FEEDBACK ON HOW YOU GET ON WELCOME :)
-
Fabby almost 9 years1/ DON'T SHOUT! 2/ Don't post links! Look at my edited answer of yours and then fit it in there... Edit, don't add... This is still a terrible answer. Please look at the site and have a close look at how answers are written.
-
Ivan Kozik over 6 yearsNote that the Hewlett-Packward/BIOS/New/ files may have to be renamed for the update to work: h30434.www3.hp.com/t5/Notebook-Hardware-and-Upgrade-Questions/…
-
Sufian about 5 yearsYou also need to copy the BIOSUpdate folder as stated in this solution. Thanks Arch Wiki (I'm not using Arch, btw).
-
dargaud about 4 yearsOK, fine, except... what if the system is not UEFI ? Can you still update the BIOS in UEFI mode if the system is in legacy mode ?
-
dargaud about 4 yearsAlso there is no such thing as "Update System BIOS" in the BIOS setup.
-
dargaud about 4 yearsI've spent the entire afternoon on this. Your answer gets me close but no dice. I created the USB key, when I boot with it it says to use ESC+F2, but when I do so, all I see is a choice between Memory Test, Hard Disk Check, Language and Exit. That's it
-
dargaud about 4 yearsYes, I tried that method, but it doesn't apply to my model. There's no automated update from the BIOS itself done by providing a file at a given location. Booting with the full HP Bios Configuration Utility fails too (errors, model not supported). Only method: reinstall Windows. Shame on HP for that. I've given up and that should be my marked answer.
-
user68186 over 3 yearsCan you add in your answer what you actually did after you bought the USB C to Ethernet adapter? After connecting your laptop to the home network do you just wait?