BXG Blog

Updating an HP HPE-170f BIOS from Linux

My desktop machine is an HP Pavilion Elite HPE-170f.  It’s a few years old now, but it still works fine, and it has good Linux support.  Lately, I’ve been running a lot of KVM guests, so I’ve decided that it’s time to add some RAM.  Normally, that would just be a matter of buying a few DIMMs and putting them in, but this time I found a warning to make sure I’ve installed the newest BIOS before upgrading the RAM.

I hunted down the BIOS update on HP’s web site, and sure enough, one of the changes is listed as “Updates Intel memory reference code.”  I guess that’s what the memory retailers were referring to. Unfortunately, HP only supplies their BIOS updates in the form of a Windows executable, and I’ve long-since removed Windows from this computer.

After doing a little research, I found a great tool called flashrom.  It’s easily installable on Fedora with the typical yum install flashrom, and it supports my BIOS just fine.  For future reference, here are the steps to upgrade an HP BIOS from Linux (caveat: Other HP models may work differently.  Be careful and do your own research if you’re trying this yourself):

  1. Use sudo dmidecode --type bios to extract your current BIOS info, including the version.  You may also want to take note of the values in the other dmidecode sections in case you need them later.
  2. Find the HP BIOS installer file on hp.com and download it.  You should end up with a file called sp49903.exe or similar.  Take note of which version it’s supposed to be.
  3. Extract the files.  You might have luck with unzip, but I used 7z e spp49903.exe.  The actual BIOS file will be named something like TRU5.29.  The file command should indicate that this is a flash image.  Mine returns TRU5.29: Intel serial flash for ICH/PCH ROM <= 5 or 3400 series A-step.
  4. Run sudo flashrom --programmer internal to see which flash chip(s) are in your computer.  Mine shows a SST25VF080B.
  5. Run  flashrom --programmer internal -L | grep SST25VF080B and make sure your chip is included in the supported list.
  6. Back up your current BIOS with sudo flashrom -r bios.bak
  7. Double-check that it worked if you like with sudo flashrom -v bios.bak
  8. Flash the new BIOS with sudo flashrom -w TRU5.29.  If something goes wrong, re-flash your backup and try again.
  9. Double-check that it worked with sudo flashrom -v TRU5.29.
  10. Reboot.  The BIOS update seems to reset various settings, so go into the BIOS and make sure things are set how you like before you boot back to your OS.  For example, I had to turn virtualization extensions back on.
  11. Run sudo dmidecode --type bios again and verify that you’re running the new version.

If that all worked, congratulations!  You’ve updated the BIOS from Linux without going through the hassle of getting the machine back into Windows.

One thing I have noticed is that my chassis and base board sections in dmidecode no longer show the correct serial number.  This isn’t really a problem for me, but it’s probably an indicator that the HP Windows updater is doing something extra in the process of flashing the update.