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 if=.wine/drive_c/SWSetup/sp35281/rom.exe 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…