Windows-free BIOS Update

A new-to-me Dell Optiplex 9020 needed a BIOS update, which, as always, arrives in a Windows / DOS EXE file. Because I’d already swapped in an SSD and installed Manjaro, I had to (re-)discover how to put the EXE file on a bootable DOS USB stick.

The least horrible way seemed to be perverting a known-good FreeDOS installation image:


Unzip it to get the USB image file, then find the partition offset:

fdisk -l FD12FULL.img
Disk FD12FULL.img: 512 MiB, 536870912 bytes, 1048576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device        Boot Start     End Sectors   Size Id Type
FD12FULL.img1 *       63 1048319 1048257 511.9M  6 FAT16

Mount the partition as a loop device:

sudo mount -o loop,offset=$((63*512)),uid=ed FD12FULL.img /mnt/loop

See how much space is left:

df -h /mnt/loop
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0      512M  425M   87M  84% /mnt/loop

The image file is 512 MB and has 87 MB available. The BIOS file is 9.5 MB, so copy the file to the “drive”:

cp O9020A25.exe /mnt/loop

Which knocks the available space down by about what you’d expect:

df -h /mnt/loop
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0      512M  435M   78M  85% /mnt/loop

Unmount the image “drive”:

sudo umount /mnt/loop

Copy the image file to a USB stick:

sudo dcfldd status=progress bs=1M if=FD12FULL.img of=/dev/sdg
512 blocks (512Mb) written.
512+0 records in
512+0 records out

Pop the USB stick in the Optiplex, set the BIOS to boot from “Legacy” ROMs, whack F12 during the reboot, pick the USB stick from the list, and It Just Works™:

BIOS Update screen
BIOS Update screen

We have a couple of other 9020s around that need the same treatment, so the effort won’t go to waste.