Creating a multi-floppy USB Key (for flashing HP DL140/145 G2 systems)

I'm a (not-so) proud owner of one HP ProLiant DL140 G2 (Intel-based) and one HP ProLiant DL145 G2 (AMD-based) machines. These were, at the time, good machines, not so expensive, and had two fixed 3.5" SATA drives, allowing for cheap disk upgrades. (BTW, this blog runs on one of these.)

HP had outfitted these machines with so-called "Lights-Out 100i management", basically delivering IPMI-based out-of-band management, with serial-over-LAN. If you take a look at what Supermicro delivers nowadays, you would not want the LO100i. I've also had lots of problems with the LO100i, so I stopped using it.

Few days ago I decided to give the LO100i a new try. In the meantime, HP issued firmware upgrades for both the system ROMs as well as for the LO100i management processor (BMC). The journey begins...

Interesting facts:
  • The DL140/145G2 were made in 2005, and were shipped without a floppy drive.
  • There is no way to add a floppy drive into the machine.
  • The EXE is a 16-bit DOS executable which runs in full-screen mode.
  • The downloaded EXE (containing the flash update) requires a floppy drive to write its self-contained floppy image to.
  • System ROM and BMC updates are seperate, so each one needs a seperate floppy disk.

What's not working:
  • 64bit Windows can NOT execute 16-bit DOS executables. All the Windows machines at work are 64bits. (They do not have a floppy drive anyway.)
  • Full-screen DOS applications can NOT run inside a terminal services connection.
  • DOSEMU does crash on my 64bit Linux desktop.
  • Unzipping the downloaded EXE ("SoftPAQ") file does not work, it's some kind of Compaq propietary tool.

Conclusions so far:
  • I've got one DL140 and one DL145, so I'd need 4 floppies.
  • I'd need a USB floppy drive. I checked at a local store, such a drive costs about 30 euros.
  • It would take lots of time in the data center.
  • I'd need even more than 4 floppies, because floppy disks are very unreliable.

I decided to use a single USB key instead. I've been recently given such a (very cheap) key from my employer - nothing to lose if something goes wrong with it.

  • Get a Windows desktop, install WinImage
  • Get a Linux desktop with the following software:
    • VirtualBox (Ubuntu: apt-get install virtualbox-ose and login again)
    • mkisofs
    • syslinux
    • The FreeDOS installation ISO. You'll only need the small base-cd ISO.
  • Download the relevant updates from For me those were:
    • DL140G2 BIOS: SP32670.EXE
    • DL140G2 BMC: SP33955.EXE
    • DL145G2 BIOS: SP33884.EXE
    • DL145G2 BMC: SP33956.EXE

Now lets do this:

1) Use WinImage to create an empty image of a 1.44MB floppy disk. Save it as floppy.img (select uncompressed before saving it). floppy.img will serve as a virtual floppy disk for the SoftPAQs.

2) Copy floppy.img to your Linux desktop, put the Windows machine aside.
Yes, you could use dd + mtools/mformat to do this, but it's so much easier with WinImage.

3) Create a ISO from the updates. mkdir temp_dir, copy all the EXEs into it; run:
mkisofs -o updates.iso temp_dir
This updates.iso will serve as the source for our DOS VM, so we don't have to set up networking inside the VM.

4) Start VirtualBox, create a new VM, profile type DOS. Create a virtual hard drive for it.

5) Add the floppy.img and the FreeDOS ISO to your newly created VirtualBOX VM.

6) Boot the VM, install FreeDOS to the virtual hard drive. Follow the on-screen instructions; xfdisk hanged for me at reboot time, resetting the VM worked fine.

7) Mount updates.iso in VirtualBox instead of the FreeDOS ISO.

8) Inside FreeDOS: mkdir c:\tmp ; copy all files from the virtual CD drive (usually D:) to c:\tmp (the ROMpaq stuff won't work properly from the virtual CD drive).

9) For every single update:
9a) format a:  (without this, the extractor will fail to recognize the floppy disk after the first run)
9b) run the SPxxxx.exe, type Agree and have it write the update to drive A:
9c) unmount the floppy.img from VirtualBox, save it away with a meaningful filename. We'll put these images onto the USB key later on.
9d) re-mount floppy.img in VirtualBox

10) Shut down VirtualBox. Save your VM for the future.

11) Prepare the USB key. If there's something on it, make a backup - we'll wipe it in the next step.

12) Write a superfloppy-style DOS filesystem onto the USB key. This will allow most BIOSes to boot from the key. Run:
mkdosfs -I /dev/sdX

13) Put the syslinux bootloader onto it:
syslinux /dev/sdX

14) Mount the new filesystem on your USB key, so we can copy more stuff onto it:
mount /dev/sdX /mnt

15) Copy the floppy images you created above to /mnt. Remember that you can't use long filenames (so 8.3 filenames must do; directories are okay).

16) Create /mnt/syslinux.cfg. This is the configuration file for the bootloader. We'll want syslinux to stop after loading and issue a prompt:
echo "PROMPT 1" >/mnt/syslinux.cfg

17) Copy the memdisk kernel. It's a floppy emulator (for A:), which operates in RAM.
cp /usr/lib/syslinux/memdisk /mnt/

18) For every floppy image you have, put the following lines into your syslinux.cfg. They will tell syslinux what to do with all the files:
    label IDENTIFIER
        kernel memdisk
        append initrd=FLOPPYIMAGE.NAME

Obviously, you need to replace FLOPPYIMAGE.NAME and IDENTIFIER. IDENTIFIER will be the string you type at the syslinux prompt after booting from the USB key, to select this particular floppy image.

19) umount /mnt and try your fresh 4floppy-in-1key.