Translation(s): none

Flashing a BIOS with FreeDOS and Grml

This page describes how to flash a BIOS, using Debian, FreeDOS and Grml Live Linux. No matter what Operating System is installed. And without using a Windows Operating System.

This allows the use of >1.2MB files in the FreeDOS image, where other methods would not work with files >1.2MB. Most 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!

Identifying the motherboard

First you should find the motherboard's manufacturer and the model. Check the user's Manual that comes with your computer, usually there you'll find all needed information.

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

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

Make a directory to work in and change into it:


You can use FreeDOS to run the DOS-based BIOS utility from your manufacturer. You must first create a custom FreeDOS image which includes the necessary BIOS tools, and then boot this image via Grml.

Download FreeDOS and tools

Create a custom FreeDOS image

Install the dosfstools,nasm and unzip packages, if not already installed:

Create an image file of ~20MB using dd:

Write a file system to the image:

Write the bootsector to the image file:

Now we need to copy the FreeDOS files to our new image. Create the mount-points:

Mount the original image:

Mount the new image:

Copy the FreeDOS system files to our new image:

Now you should also copy your flash program and the new BIOS to the image file:

List freedos-new to make sure the files are there:

Unmount both images:

Using Grml on a usb stick to boot FreeDOS

Download a Grml iso.

Although it is possible to copy the Grml ISO directly:

# dd if=grml96-full_2013.02.iso of=/dev/sdX

..this is not suitable for our purposes, since the iso9660 filesystem which is created can only be mounted read-only, and we require read-write access to copy in extra files. NOTE: also ANY existing data on your USB device will be destroyed when using the dd approach.

Instead, use the grml2usb package to install Grml to a usb stick:

For more information on grml2usb, usage and FAQ:

Also available at the grml2usb page.

After Grml is installed on a usb stick and mounted, copy the freedos.img to Grml:

Now backup the Grml FreeDOS version:

Use gzip to create a balder10.imz file using the freedos.img we created earlier:

Optionally now test with kvm:

After booting Grml, select FreeDOS from the menu:

Then, select:

If you see a message about 'cannot find' then try instead:

Check that the BIOS files are present. Now you can reboot and flash your BIOS by using the Grml usb stick. You will 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:

When done flashing the BIOS. Mount the Grml usb stick, remove freedos.img and balder10.imz. Move back to balder10.imz:

See Also