I have an old motherboard that requires creating a DOS boot floppy in order to upgrade its BIOS. Fortunately, it's not too hard to do this with FreeDOS and a USB stick.

The instructions below are based on an FDos wiki article.

Downloading the dependencies

The first step is to download the required files from your motherboard manufacturer:

  • the latest BIOS image
  • the BIOS flashing program

and then install the tools you'll need:

apt-get install makebootfat syslinux

Preparing the "floppy" image

Start by collecting all of the files you need to install FreeDOS on the USB stick:

cd /tmp  

wget http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/pkgs/commandx.zip  
wget http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/pkgs/kernels.zip  
wget http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/pkgs/substx.zip  
wget http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/pkgs/unstablx.zip  

for ZIP in *.zip; do unzip $ZIP; done  

cp ./source/ukernel/boot/fat16.bin  .  
cp ./source/ukernel/boot/fat12.bin .  
cp ./source/ukernel/boot/fat32lba.bin .  

cp /usr/lib/syslinux/mbr.bin .

and then create a directory for the files that will end up in the root directory of the "floppy":

mkdir /tmp/fs-root  
cp ./bin/command.com /tmp/fs-root/  
cp ./bin/kernel.sys  /tmp/fs-root/  

and copy the BIOS image and update program into that same directory (/tmp/fs-root/).

Creating a bootable USB stick

Plug in a FAT-formatted USB stick and look for the device it uses (/dev/sdb in the example below).

Finally, run makebootfat:

/usr/bin/makebootfat -o /dev/sdb -E 255 -1 fat12.bin -2 fat16.bin -3 fat32lba.bin -m mbr.bin /tmp/fs-root
Usually I just run unetbootin, select "FreeDOS" and point it at a USB stick that is formatted with FAT12.
Comment by Anonymous

An alternative method to get a freebsd bootable usb-stick:

https://plus.google.com/101377063020971314139/posts/d5KMP7yBPRh

Comment by gebi
What about http://www.flashrom.org?
Comment by Anonymous
Also you can use Grml, which ships FreeDOS. To put it on USB stick, you can use dedicated grml2usb (available in Grml and Debian), or dd.
Comment by azhag