Creating a DOS USB bootdisk under linux

June 10, 2009 – 12:00 pm

Every now and then I need a DOS bootdisk to flash a BIOS or similar, and I only have linux with which to create it. I can never remember the quickest way to do this, so I’m documenting it here:

Lifted entirely from this webpage. I’m only archiving it here because content disappears over time.

I needed to upgrade the bios of my Computer (Intel).

But how to do it without windows?

In my case, Intel has many options for bios upgrading and one is the plain old DOS method. This is the best and fastest way to upgrade your bios with linux.
Create a FreeDOS based bootable usb-stick

* Download a FreeDOS image, i’ll use Balder for now.
* Prepare the usb-stick
o check partition (e.g cfdisk /dev/sda)
o mkfs.msdos /dev/sda1


qemu -boot a -fda balder10.img -hda /dev/sda
A:\> sys c:
A:\> xcopy /E /N a: c:

Check with

qemu -hda /dev/sda

There are, of course, many ways to do this. With recent VirtualBox versions supporting USB passthrough, I could do it entirely from a windows VM. Several other websites suggest installing grub onto the USB disk and having it boot a floppy disk image directly, which also seems like it would work. Your FAT-formatted USB drive would appear as C:, and you can just copy whatever content you like straight onto that.

  1. 11 Responses to “Creating a DOS USB bootdisk under linux”

  2. Something incredibly useful I found: a HP utility for making DOS boot USB keys. (Runs under Windows, not sure if it will work under Wine, etc.) Run this, put your drivers onto your USB key, no floppy needed.

    By crb on Jun 10, 2009

  3. Perfect!! This is the simplest way I’ve seen to create a USB Stick with full access to the Stick’s storage space instead of being limited to 1.44MB or 2.88MB within the image. Thanks!

    By LJ on Oct 11, 2009

  4. many thanks.

    By madmac on Oct 25, 2009

  5. THANKS for your hints above.

    It didn’t work like you described but gave enough to get me there. I kept having problems with MBR data either being wrong or missing and just went in circles between your creative solution of using QEMU and others who tried to use all linux tools.

    I finally resorted to a QEMU only solution.

    nuking anything on the drive with something like:
    dd if=/dev/zero of=/dev/sdd bs=512 count=1000
    this gets the MBR as well.

    then going straight into qemu like you suggest

    qemu -boot a -fda balder10.img -hda /dev/sdd

    fdisk (create primary drive)
    exiting from qemu

    starting qemu again
    qemu -boot a -fda balder10.img -hda /dev/sdd
    format c:
    sys c:
    xcopy /E /N a: c

    By Mike on Sep 7, 2010

  6. I found this very helpful. Also gave me a moment of nostalgia as I was reminded of booting my school’s old machine from a DOS floppy.

    Thank you!

    By cong on Sep 21, 2011

  7. Thanks for your instructions and especially for comments from Mike (Sep 7 2010). Only worked when I followed Mike’s routine (because I think the partition needed to be made active/bootable, and I forgot this in GParted).

    Now I have my Dell Q15R N5110 with the latest BIOS (A10), by running the utility within a Freedos USB key and without installing Windows 7, Yay!

    By Cefn Hoile on Jul 31, 2012

  8. Perfect, worked first time!


    By Steven C on Aug 22, 2012

  9. Check this out:

    It worked on my openSuse 11.4

    By Erty on Nov 20, 2012

  10. It looks like, that over the intervening years the qemu command has been changed to:


    at least on my fedora disto!

    By henry florencre on Feb 8, 2014

  1. 2 Trackback(s)

  2. Jul 19, 2009: Flashing, futzing and finishing « Bobulate
  3. Jul 11, 2012: Arnaud Quette: Definitive solution to IPMI over LAN with Dell iDrac Express |

Post a Comment