Renamed "External links" to "External Links" and moved it under the "See Also" heading/level.
Added link to debian.org[Debian] and changed the content format.
|Deletions are marked like this.||Additions are marked like this.|
|Line 1:||Line 1:|
|Line 3:||Line 9:|
|This page describes how to flash a BIOS, using Debian,||This page describes how to flash a BIOS, using [[http://debian.org/| Debian]],|
|Line 16:||Line 22:|
== Identifying the motherboard ==
= Identifying the motherboard =
|Line 39:||Line 45:|
|== FreeDOS ==||= FreeDOS =|
|Line 45:||Line 51:|
|=== Download FreeDOS and tools ===||== Download FreeDOS and tools ==|
|Line 51:||Line 57:|
|=== Create a custom FreeDOS image ===||== Create a custom FreeDOS image ==|
|Line 203:||Line 209:|
|== See Also ==||= See Also =|
|Line 210:||Line 216:|
|=== External Links ===||== External Links ==|
Flashing a BIOS with FreeDOS and Grml
This allows the use of >1.2MB files in the FreeDOS image. Where other methods would not work with files >1.2MB. Since 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:
# 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.
Make a directory to work in and change into it:
# mkdir -p /tmp/bios/ # cd /tmp/bios/
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
FreeDOS - download the fdboot.img file
FreeDOS bootsector - download the file sys-freedos-linux.zip
- The DOS-Flash program and new BIOS from your motherboard's manufacturers website
Create a custom FreeDOS image
# aptitude install dosfstools nasm unzip
Create an image file of ~20MB using dd:
# dd if=/dev/null of=freedos.img bs=1024 seek=20480
Write a file system to the image:
# mkfs.msdos freedos.img
Write the bootsector to the image file:
# unzip sys-freedos-linux.zip && ./sys-freedos.pl --disk=freedos.img
Now we need to copy the FreeDOS files to our new image. Create the mountpoints:
# mkdir freedos freedos-new
Mount the original image:
# mount -o loop fdboot.img freedos/
Mount the new image:
# mount -o loop freedos.img freedos-new/
Copy the FreeDOS system files to our new image:
# cp -a freedos/* freedos-new/
Now you should also copy your flash program and the new BIOS to the image file:
# cp -a FLASH-PROGRAM BIOS-UPDATE freedos-new/
List freedos-new to make sure the files are there:
# ls -la freedos-new/
Unmount both images:
# umount /tmp/bios/freedos/ /tmp/bios/freedos-new/
Using Grml on a usb stick to boot FreeDOS
Download a Grml iso.
Use either the dd command or the grml2usb package to install Grml to a usb stick.
NOTE: ANY existing data on your USB device will be destroyed when using the dd approach.
# dd if=grml96-full_2013.02.iso of=/dev/sdX
# grml2usb grml96-full_2013.02.iso /dev/sdX1
- Where /dev/sdX is your USB device. And 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.
After Grml is installed on a usb stick and mounted. Copy the freedos.img to Grml:
# cp freedos.img /media/usb0/boot/addons/
Now backup the Grml FreeDOS version:
# cd /media/usb0/boot/addons/ # mv balder10.imz balder10.imz.org
Use gzip to create a balder10.imz file using the freedos.img we created earlier:
# gzip <freedos.img >balder10.imz
Optionally now test with kvm:
$ kvm -hdb /dev/sdX1
After booting Grml, select FreeDOS from the menu:
Addons => Run FreeDOS
2. FreeDOS Safe Mode (don't load any drivers)
If after testing with kvm, Grml boots the custom FreeDOS image and your BIOS files are present. Now you can flash your BIOS by using the Grml usb stick. Following the manufacturers instructions.
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
When done flashing the BIOS. Mount the Grml usb stick, remove freedos.img and balder10.imz. Move balder10.imz.org back to balder10.imz:
# cd /media/usb0/boot/addons/
# rm freedos.img balder10.imz
# mv balder10.imz.org balder10.imz
- Flashing a BIOS with FreeDOS and Grml, was adapted from: