Charlène's

... it's worse than your datacenter.


Create a custom FreeDOS USB live media on OpenBSD

Latest update: 2021-01-11

While modern BIOSes are actually tiny operating systems that can update themself through the net, i still have a number of old machines that requires either Windows or a MS-DOS 'floppy' to update their bios.

I'll show here how you can create a custom FreeDOS image on OpenBSD, a very straightforward process. You'll need an usb flashdrive with a size greater or equal to 32MB -- all data will be wiped on it!

At first, prepare a working directory and download FreeDOS:

$ doas pkg_add unzip
$ cd; mkdir dosimg
$ ftp https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.2/FD12LITE.zip
$ unzip FD12LITE.zip

Next, mount the raw image:

$ doas mount_vnd FD12LITE.img vnd0
$ doas mount /dev/vnd0i /mnt
$ cd /mnt

Remove the base packages since we're not installing FreeDOS anyway, and create a directory for our bios files:

$ doas rm -rf fdsetup/packages/
$ mkdir bios

Download your bios update zip file and extract it in /mnt/bios. Note that in Asus' case, you need the companion utility as well. Shuttle provides all in one bundles (thanks!). In the end you should have some EXE file along your BIOS rom.

Once done, it's time to close our image file:

$ cd ~/dosimg
$ doas umount /mnt
$ doas vnconfig -u vnd0
$ doas vnconfig -l # if you want to check

It's time to put our modified image file to our usb flashdrive. Be sure to not overwrite the wrong device by checking the output of dmesg after plugging it, or by using sdd instead of dd(1):

$ doas umount /dev/sd(Xn) # if you have some automount on your system
$ doas dd if=FD12LITE.img of=/dev/rsd(Xn)c bs=1M

You can now boot using your usb flash drive, the FreeDOS installer will then ask you for your language then you will be able to return to DOS.

If you've forgotten MS-DOS basics, here is (approximately) how to run the BIOS update (here an Asus one):

C:\> cd bios
C:\> bupdater.exe /iBIOS1201.ROM

Hope it helps :)