BIOSing away

On my so-called dayjob (that more than often ends up keeping me up late at night), I often have to update motherboards’ BIOS data — it happened more than once that USB didn’t really work correctly with some device until the BIOS was updated. I have written about it before and fortunately since then, flashrom started supporting a huge number of motherboards, making it the first choice to update BIOS chips, when they are supported.

Now, when they aren’t, I’m not much of an expert in adding support for them; I have been able to send one patch (which hasn’t been applied still unfortunately) to simply list an extra motherboard, but since most of the boards I have at hand are not mine, too often I cannot go on and try — most of the time I don’t even have the time to do so.

The procedure I have written two and a half years ago would still produce a working bootable USB sticks, but it’s messy; googling around I found an (italian) tutorial (Update (2016-04-29): this has been replaced by an English tutorial) that based itself on installing FreeDOS itself on an USB stick through qemu. And that gave me a very nice idea to solve this cleanly without requiring strange software or dd commands.

For completeness sake, I’d like to add that SysRescueCD’s FreeDOS bootable image seems to crash with invalid instruction errors on almost all the systems I tried it on. No clue as to why.

You need an USB stick of at most 2GB; this ensures that it can be used with FAT16, for maximum compatibility, and the trick will only work properly on systems that can properly boot an USB strick in HDD compatibility mode, which seems to be any system capable of starting off an USB stick at all. In 2GB you can easily add quite a few firmware files, which is something I’m happy with, even if most of the time I don’t need them again after the first time.

For what concerns software, you only need qemu, a copy of FreeDOS (both the Full and Base versions would do), and some good old remembrance of DOS commands). Start up QEmu with the USB stick as the harddrive:

# qemu -hda /dev/sdm -cdrom fdbasecd.iso -boot d

Then use FDISK (the DOS variant) to create a single primary partition in the drive. Using the DOS FDISK command ensures that you will have a DOS-compatible partition without having to deal with sizes, alignments, types, and so on.

After re-booting FreeDOS from the CD with the newly-created partition, simply format it, from FreeDOS, and make it bootable:


This copies the minimum required files to boot the disk up, which are well enough to actually update a BIOS. Contrarily to the tutorial I linked above, I don’t have any intention to install FreeDOS, which then would require editing the startup files to disable things. The straight boot is just what I need.

Also, a little funny note here. Today’s box to set up had a MSI motherboard; beside “International” being spelt wrong in the original 1.00 BIOS’s vendor strings, the specs page of the board on MSI’s site states very clearly that “for chipset limitations” neither Windows 98 nor ME can be used on the board… given it’s a Pentium4-era board, that went without saying for me. But on the BIOS update documentation, they still insist on telling you to use a Windows 98 or ME boot disk! Isn’t that lovely?

At any rate, now I have my BIOS update stick, and I’m pretty happy with it. Love FreeDOS.

9 thoughts on “BIOSing away

  1. Concerning spelling mistakes: Asus has been carrying for a long time the spelling mistake where exactly two options have “Disbaled” instead of “Disabled”.I even reported it to them at some point, but that made no impression.I am rather scared thinking what the fact that not only they misspelled something that every spell checker would catch but also that only two of the 50 or so places where “Disabled” appears are misspelled.No wonder they need larger and larger ROMs if they obviously implement the Enable/Disabled selection as separate code for every single option.


  2. I often have to do this outside of my personal network, so using netboot systems is not a good choice either. Thus why I went for the USB stick.


  3. Despite its name, unetbootin is a program to make bootable USB-sticks. it automatically downloads the necessary files for many different systems.However I expect it will create a full freedos install which you explicitly didn’t want.


  4. “it happened more than once that USB didn’t really work correctly with some device until the BIOS was updated”How is this possible/What shenanigans are the motherboard vendors pulling?! Once the OS starts accessing the USB controllers, the BIOS is directly out the loop (they only get involved in USB anyway to offer some exceptionally dodgy support for USB keyboards, mice and booting from mass storage devices)


  5. As far as I can see the BIOS is still to initialise USB controllers. It can be seen by the fact that it’s the BIOS to decide whether to support Legacy (1.1) USB, and the speed of the ports (12Mbps or 480Mbps).In my case, I have had a couple of BIOSes forgetting to initialise to 480Mbps the front panel’s ports.


  6. I’ve found that its quite easy to install grub2 to a USB stick. You can then just alter grub.cfg to boot off an iso on the stick.The advantages are that once grub is installed, you can just copy / update as many isos as will fit without having to reinstall.


  7. That doesn’t help to add BIOSes to that, unfortunately: ISOs can only be mounted read only, and in general FreeDOS doesn’t seem to access USB sticks unless it is booted by those.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s