Differences between revisions 8 and 9
Revision 8 as of 2017-01-22 21:47:29
Size: 4497
Editor: ?RickHull
Comment: revised to just edit the balder10.img inside Grml. the fdboot/freedos image did not boot properly
Revision 9 as of 2017-01-22 21:51:10
Size: 4508
Editor: ?RickHull
Comment:
Deletions are marked like this. Additions are marked like this.
Line 28: Line 28:
You should know your motherboard and have the BIOS file available. If you have not identified your motherboard, you should do so now for reference and any potential troubleshooting later. 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 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. 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.

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. 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:

  •  # dmidecode -t bios -t baseboard

Lastly, 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:

  •  # mkdir -p /tmp/bios/
     # cd /tmp/bios/

Grml

Prepare USB stick

Download a Grml iso.

Use grml2usb to install Grml to a usb stick:

  •  # grml2usb grml96-full_2013.02.iso /dev/sdX1
  • Where /dev/sdX1 is a partition on your USB device.

For more information on grml2usb, usage and FAQ:

  •  # man grml2usb

Also available at the grml2usb page.

Insert BIOS update into the Grml FreeDOS image

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

  •  # mount /dev/sdX1 /media/usb0

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

  •  # gunzip </media/usb0/boot/addons/balder10.imz >balder10.img
     # mkdir balder10
     # mount -o loop balder10.img balder10

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

  •  # cp -a FLASH-PROGRAM BIOS-UPDATE balder10/

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

  •  # umount balder10
     # cp /media/usb0/boot/addons/balder10.imz balder10.imz.bak
     # gzip <balder10.img >/media/usb0/boot/addons/balder10.imz

Test the FreeDOS image

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

  •  # umount /dev/sdX1
     # kvm -hdb /dev/sdX

After booting Grml, select FreeDOS from the menu:

  •  Addons => Run FreeDOS

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

  •  # instead of: kvm -hdb /dev/sdX
     # qemu-system-x86_64 -hda /dev/sdX

Check that the 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:

  •  cd <dir>
         change to the directory
     dir
         list the files in the current directory
     type
         display the contents of a file

For Example, flashing a Foxconn H67S motherboard:

  •  A:\dir
     A:\cd mebios\bios\
     A:\dir
     A:\fpt -f C33F1P02.BIN -y

See Also