0

Is there a way to flash a motherboard from UEFI from Ubuntu directly? I downloaded an exe from HP.com and ran the self-extractor from Wine. It failed when trying to put it on a USB key. Here is the directory structure after I run the .exe and extract it with Wine.

sp57762/
├── BiosUpdate
│   ├── CryptRSA32.efi
│   ├── CryptRSA.efi
│   ├── HpBiosUpdate32.efi
│   ├── HpBiosUpdate32.s09
│   ├── HpBiosUpdate32.s12
│   ├── HpBiosUpdate32.sig
│   ├── HpBiosUpdate.efi
│   ├── HpBiosUpdate.s09
│   ├── HpBiosUpdate.s12
│   └── HpBiosUpdate.sig
├── FirmwareUpdate.exe
├── FreeDOS
│   ├── KERNEL.SYS
│   └── kernels.zip
├── hpqFlash.exe
├── HPUSBFW.exe
├── Installer.exe
├── KERNELS.ZIP
├── ROM.CAB
├── Rompaq
│   ├── 68AHH.BIN
│   ├── config.sys
│   ├── EROMPAQ.EXE
│   ├── EROMPAQ.zip
│   ├── gpl2.txt
│   └── KERNEL.SYS
└── WSSP57762.rtf

I just want to know if I can meaningfully throw the 68AHH.BIN or the .efi at the underlying hardware and get something more useful.

Background

I have an HP laptop, the instructions to flash the bios are not applicable. My BIOS simply lacks File > Flash System ROM, just like this guy. I can boot the HpBiosUpdate.efi from the EFI, but that also doesn't work and it gives me an error though different from the one he got:

The System Bios Update Failed

I tried multiple different methods, including this one.

6
  • I do not have an HP, but I put the new UEFI file in the ESP. The ESP only reads FAT32 partitions and that was the only FAT32 partition I have. My older BIOS systems would read from a FAT32 formatted flash drive, but I have not tried that from UEFI.
    – oldfred
    Jun 27, 2017 at 22:48
  • @oldfred I tried that too, I just get The System Bios Update Failed. I think you have to boot into 68AHH.BIN and then give that the HpBiosUpdate.efi. It just doesn't seem to work. Jun 27, 2017 at 23:17
  • You could try running the EXE from Windows PE Jun 27, 2017 at 23:24
  • 1
    I always get nervous when flashing the BIOS from Linux. See wiki.archlinux.org/index.php/Flashing_BIOS_from_Linux
    – Panther
    Jun 28, 2017 at 0:44
  • I use FreeDOS but no experience with UEFI and flashing BIOS
    – Panther
    Jun 28, 2017 at 0:44

3 Answers 3

1

There are some relatively new tools and protocols that are designed to address this issue, but they require support in the computer's firmware, and that support is still fairly uncommon. You can see if your computer supports this feature by typing:

fwupdate -s

Unfortunately, the feature is rather poorly documented, so even if your computer supports it, I'm not 100% sure how it works. Based on the scant documentation, I think that you pass fwupdate the name of a firmware file (such as firmware.cap):

sudo fwupdate firmware.cap

I think that this tool is dependent on a matching EFI program, fwupx64.efi, which does the actual firmware update when you reboot.

If your system doesn't support this mechanism, then you may just need to follow whatever instructions the manufacturer provides. I have an old HP ProBook 6470b that was particularly obnoxious to update: I had to install Windows on a spare hard disk, in BIOS/CSM/legacy mode, and run the firmware update tool from there. Based on the page to which you linked, it looks like your HP may be from a similar era and may need a similar approach -- or some obscure procedure I never discovered.

I have seen systems that provide undocumented, but obvious, firmware update options in their setup utilities that will work when fed the right file extracted from a DOS or Windows .exe file provided by the manufacturer. I never discovered such an option on my HP 6470b, though.

1

I don't know of a general way to flash HP consumer machine firmware directly from Linux, but as a second-best, it is at least possible on the machine that I needed to update (an HP Envy 700-060ea) without the use of Windows (e.g. with only Linux installed on the machine).

First I extracted the HP softpaq:

wine Downloads/sp72302.exe /e /f z:hpbios

... and then extracted files from the self-extracting zip exe:

cd hpbios && unzip Kai_8024.exe

I examined the hpbios/Flash.bat which was amongst the files extracted...

The batch file included a commandline which updates the Intel ME firmware with the file ME9_1482.BIN. The HP tool included the Windows ME flashing tool "FWUpdLcl.exe", but it should be possible to flash the same file with Intel's EFI flash tool (FWUpdLcl.efi) from the UEFI shell.

Newer ME versions can also be updated directly from Linux using the Linux flashing tool from the "Intel CSME System Tools" FWUpdate/LINUX64/FWUpdLcl, but I wasn't able to find an equivalent for ME 9.x systems.

The main BIOS file in this case is called KAI_8024.bin - I copied this to the efi boot partition into the EFI/HP/BIOS/New/ folder then I then rebooted the machine (into an EFI shell) and ran the EFI binary: EFI/HP/BiosUpdate/HpBiosUpdate.efi from the shell command line.

n.b. instead of using the EFI shell, you can probably run it directly from grub using the chainloader command with the appropriate path to HpBiosUpdate.efi, followed by the boot command.

To obtain the EFI shell (open source included in the TianoCore project, as well as various forks), you can use one of the many online tutorials to either install an EFI shell boot entry from grub, or create a bootable USB drive etc. I used: https://github.com/tianocore/edk/blob/master/Other/Maintained/Application/UefiShell/bin/x64/Shell_Full.efi ).

n.b. The EFI/HP/BiosUpdate/ directory was factory-installed, but you can probably find a suitable copy in an HP support file download (e.g. see the original question for a possible source - although I don't know if there are different versions of HpBiosUpdate.efi for different machine types).

HpBiosUpdate.efi looks for a firmware update file in EFI/HP/BIOS/New/ and writes out a log file at EFI/HP/BiosUpdate/HpBiosUpdate.log with debug messages, as well as displaying a simple mouse-driven GUI. After the flashing was completed, the machine power cycled several times, and then after booting Linux, the expected new BIOS version 80.24 was displayed in the output of dmidecode under Linux (previously 80.13 was installed).

The log file is reasonably clear and useful, so I recommend viewing that file from Linux, to check that the contents look sensible.

0

As already indicated, Ubuntu supports firmware updates on a number of machines. In my particular case, my Dell XPS 9560 has received at least one BIOS firmware update since the start of this year (I'm running Gnome Ubuntu 17.04).

Interestingly, these updates are not picked up through the normal software update process (e.g., apt-get update and apt-get upgrade).

Instead, I've only seen firmware update checks made via the Details GUI (which is part of the gnome-control-center application). By clicking the Check for Updates button I'll see relevant firmware updates.

To date, firmware updates have worked with no problems.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .