Translation(s): none


Flashing a BIOS with FreeDOS and Grml via USB

Most BIOS update utilities for PCs expect to run in a DOS like environment. This page describes how to flash a BIOS, using Debian, FreeDOS, Grml Live Linux, and a USB stick, no matter what Operating System is installed, without using a Windows Operating System.

A USB stick allows the use of >1.2MB files in the FreeDOS image, where the traditional floppy based methods would not work. Many BIOS files and tools are bigger than can fit on a floppy image.

If the hardware works, there is often no need to flash the BIOS. If something goes wrong, this might cause permanent damage to your BIOS and you might lose your warranty. Flashing motherboard BIOS is a dangerous activity that can render your motherboard inoperable!

Preparation

Identifying the motherboard

You should know your motherboard and have any necessary BIOS files available. If you have not identified your motherboard, you should do so now for reference and any potential troubleshooting later. Check any manuals that came with the computer.

You can also use the dmidecode package to retrieve some info:

If you have physical access to the motherboard, you may find the required information directly on the motherboard itself.

Working directory

Make a directory to work in and change into it:

Move or copy your BIOS update files into your working dir.

USB stick

You need USB flash drive that can be completely overwritten. grml2usb should take care of any necessary formatting. Insert the stick, and it will be recognized in the /dev/ system, probably as /dev/sdb with primary partition /dev/sdb1 but this can vary based on your system config.

Note, we will assume that the USB stick is recognized as /dev/sdX with primary partition /dev/sdX1.

Packages

Grml

Install Grml to USB stick

Download a Grml iso. grml-small is fine. Use grml2usb to install Grml to a usb stick:

Try man grml2usb or see http://grml.org/grml2usb/ for more information.

Insert BIOS update into the Grml FreeDOS image

After Grml is installed on a usb stick, mount it, e.g.

Next we need to unzip and mount the embedded FreeDOS image:

Now, just copy any necessary BIOS update files into the mounted image:

Unmount FreeDOS, re-zip it, and put it back on the USB stick:

Test the FreeDOS image

Unmount the USB stick and test it with Qemu / KVM:

After booting Grml, select FreeDOS from the menu:

If you see a message about 'cannot find command.com' then try:

Boot into DOS / command.com and check that your BIOS files are present.

Perform the update

We can't flash the BIOS from within Qemu obviously. Now you can reboot from the Grml USB stick and flash your BIOS from FreeDOS running on the metal. You may need to press a key on boot to access the BIOS menu or a boot menu. When the motherboard powers on you ought to see a message about which buttons to press, or check your motherboard manual. Then you can boot into FreeDOS from the USB stick and run the BIOS update program.

Some useful commands in DOS:

For Example, flashing a Foxconn H67S motherboard:

See Also