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:

  1. Click Support
  2. Click Support & troubleshooting
  3. In the web form copy and paste the previously detected HP serial number (XXXXXXXXXX) and search for it.
  4. Click Software and Drivers.
  5. As operating system select Windows.
  6. As operating system version select Window 10 (64-bit).
  7. Check that the latest available BIOS version is newer than what is already installed on the computer.
  8. 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

  1. Reboot the computer and go into the BIOS (usually by pressing the Esc key soon after the computer is starting up).
  2. Select BIOS Setup
  3. Select Update System BIOS
  4. 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.

  1. 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).

  2. 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.

  3. Turn off the target system, in my case an HP X2 210 G2, insert the recovery USB drive, and start it up again.

  4. 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 to Hewlett-Packard, BIOSUpdate, and finally select the HpBiosMgmt.efi.

This started the update process.