Friday, May 23, 2008

HP BIOS update madness

Say you wanted to update the BIOS on a colleague's HP nc6230. You go to the HP website to find a "ROMPaq for HP Notebook System BIOS (68DTA) – FreeDOS Bootable Diskette", which sounds exactly like what you'd want to download.
Well, follow that link and you'll get a file called sp35281.exe. Does not look like a floppy image at all.
So let's find out what it is:

~> file sp35281.exe
sp35281.exe: MS-DOS executable PE for MS Windows (GUI) Intel 80386 32-bit

Damn. A Windows executable, just to create a floppy image...
But there is always wine, so we'll start it with that...

...long story short: it is some kind of self-extracting archive, which extracts an executable (of course for Windows, not DOS...), which then will write the image to the floppy disk.

There would probably be the possibility to configure wine to use a floppy image as drive A:, but fortunately this was not necessary. Examining the rom.exe, not even too closely gives:

~> du -b .wine/drive_c/SWSetup/sp35281/rom.exe
1502208 .wine/drive_c/SWSetup/sp35281/rom.exe

Which is exactly the size of a floppy disk image (1474560 Bytes) plus 27kB.
Just guessing, i extracted the last 1440kB from the executable:

tux@d173:~> dd of=floppy.img bs=1k skip=27
tux@d173:~> file floppy.img
floppy.img: DOS floppy 1440k, x86 hard disk boot sector

Voilá - a bootable floppy image. Now i only hope for HP to start recognizing that they are doing no favour to their customers by obfuscating their BIOS updates like that...


  1. Truth be told though, the fact of the matter is that most desktop users have no idea what a floppy disk image is (or probably don't even have floppy drives, today). An obfuscated EXE file is, in fact, the simplest and most uncomplex way for them to update their BIOSes on (mostly) Windows PCs.

    I consider myself relatively proficient in basic computer use, or I wouldn't even be trying to use linux -- and the idea of using dd to do _anything_ is intimidating. Having flashbacks of trying to pull together disk images for a Slackware install when I was 13 years old and having no clue what I was doing...

  2. Yes, of course it is ridiculous that i had to do all this just to be able to get a floppy image. And i do not complain that they offer this to the Windows users. However, looking at e.g. IBM / now Lenovo who manage to provide ISO images in addition to their Windows-only BIOS update tool (such a beast is also available from HP), they can clearly do better.
    I mean - that machine has no floppy, but it has an optical drive, so an ISO image would be even better for the users. And i guess that a CD writing software was included on the Windows installation anyway (never saw it, but i'm quite sure it was) ;)

  3. It sounds like the firmware-tools suite ( could use to grow a new helper, akin to the existing firmware-addon-dell package, which can extract these HP floppy image payloads. f-a-d does so for most of the Dell BIOS packages on, and with the firmware-extract and dell-repo-tools packages, turns these into BIOS payloads which can be installed from a running Linux instance.

  4. Great post, actually I need to update BIOS on my HP nx6110 and I was wondering, where the hell I will find PC with Windows:) It's good to hear I don't need them. But my machine has no floppy too, so can you please tell me if it's possible to make boot CD with this image? Or there is only possibility to get USB external floppy? Thank you in advance!

  5. Just make a bootable cdrom from that floppy image with k3b or another CD burning application (you can also do it manually with genisoimage and wodim, but you'll have to look up the options by yourself ;) )

  6. Thanks, BIOS updated:)

  7. I found your site on technorati and read a few of your other posts. Keep up the good work. I just added your RSS feed to my Google News Reader. Looking forward to reading more from you down the road!