When I flashed the Mini 2140 yesterday I used a Windows laptop to create a bootable flash drive with the BIOS utility and update on it.
I didn't really need to use a non-free operating system, as HP provide a tiny bootable ISO image with FreeDOS, but using that means wasting a CD-R. It's not that those are expensive, but they do end up in landfill.
Instead, I'd like to be able to simply use a USB key. I found some help on the FreeDOS wiki and I thought I'd document the steps I followed on Ubuntu.
You will need to install the syslinux and cabextract packages and obtain a copy of mkbootfat. The latter was not packaged, so I created source and binary packages for Intrepid and Jaunty. You will also need to download some FreeDOS files and the ROMPaq update executable from the HP website. Download the FreeDOS bootable media file, not the Windows HPQFlash one.
Finally, you will need a USB key. It will be erased during this process, so make sure you backup any data it currently contains.
Create a directory that you will work from and cd into it. Then create a directory that will eventually be the root filesystem on the USB key.
$ mkdir 2140 $ cd 2140 2140$ mkdir rootfs
Install syslinux and cabextract
2140$ sudo aptitude install syslinux cabextract
Download and install mkbootfat:
2140$ wget -c http://ubuntu.cafuego.net/pool/jaunty-cafuego/makebootfat/makebootfat_1.4-0cafuego0_i386.deb 2140$ sudo dpkg -i makebootfat_1.4-0cafuego0_i386.deb
Download the required FreeDOS files:
2140$ wget -c http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/pkgs/kernels.zip 2140$ wget -c http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/pkgs/commandx.zip 2140$ wget -c http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/pkgs/unstablx.zip
Extract command.com from commandx.zip to the rootfs directory:
2140$ unzip -d rootfs -j commandx.zip bin/command.com
Extract kernel.sys from unstablx.zip to the rootfs directory:
2140$ unzip -d rootfs -j unstablx.zip bin/kernel.sys
Extract the required files from kernels.zip to the current directory:
2140$ unzip -j kernels.zip source/ukernel/boot/fat12.bin source/ukernel/boot/fat16.bin source/ukernel/boot/fat32lba.bin
Copy mbr.bin from the syslinux package to the current directory
2140$ cp /usr/lib/syslinux/mbr.bin .
Now extract the BIOS update you downloaded from HP via cabextract and copy the update files to the rootfs directory:
2140$ cabextract sp43583.exe 2140$ cp Rompaq/68DGU.BIN rootfs 2140$ cp Rompaq/config.sys rootfs 2140$ cp Rompaq/gpl2.txt rootfs 2140$ cp Rompaq/Rompaq.exe rootfs
Note that my download was called sp43583.exe, yours may be named differently.
2) Create the Boot Device
Insert your USB key and check the output of dmesg to see what its device name is.
2140$ dmesg [ 9.348395] usb-storage: device scan complete [ 9.349611] scsi 6:0:0:0: Direct-Access Imation Imation USB PMAP PQ: 0 ANSI: 0 CCS [ 9.351075] sd 6:0:0:0: [sdb] 996864 512-byte hardware sectors: (510 MB/486 MiB) [ 9.351694] sd 6:0:0:0: [sdb] Write Protect is off [ 9.351706] sd 6:0:0:0: [sdb] Mode Sense: 23 00 00 00 [ 9.351715] sd 6:0:0:0: [sdb] Assuming drive cache: write through [ 9.353699] sd 6:0:0:0: [sdb] 996864 512-byte hardware sectors: (510 MB/486 MiB) [ 9.354319] sd 6:0:0:0: [sdb] Write Protect is off [ 9.354330] sd 6:0:0:0: [sdb] Mode Sense: 23 00 00 00 [ 9.354340] sd 6:0:0:0: [sdb] Assuming drive cache: write through [ 9.354354] sdb: sdb1 [ 9.355653] sd 6:0:0:0: [sdb] Attached SCSI removable disk [ 9.355767] sd 6:0:0:0: Attached scsi generic sg1 type 0
Mine is /dev/sdb. It has one partition on it currently. I will delete this and blank the MBR on the USB key via dd:
2140$ sudo dd if=/dev/zero of=/dev/sdb bs=512 count=1
This will write zeroes to the first sector of the USB key, which is where both its master boot record and partition map live.
Warning: This process essentially wipes the USB key. Make sure the data on it is backed up and that you are using the correct device name.
Unplug and replug the USB key to ensure the kernel is no longer using the old partition map. After plugging it back in, recheck the device file name. It should not have changed, but it may have.
Finally, use makebootfat to make this device bootable and copy the rootfs to it:
2140$ sudo makebootfat -o /dev/sdb -E 255 -1 fat12.bin -2 fat16.bin -3 fat32lba.bin -m mbr.bin rootfs
You should now have a bootable USB key with the BIOS update tools on it.
Boot your Mini 2140 using the key you just created. After a short moment, the Rompaq utility should start and you can upgrade your BIOS.
makebootfat appears to be somewhat temperamental with regards to USB keys and BIOSes. This HOWTO works fine if I run all commands on the Mini 2140, but if I create the boot device on my workstation, the result is not bootable. I've only tried it with a single old USB key though.
I strongly suggest crossing your fingers when executing each step.