BIOS Update

From Gentoo Wiki
Jump to: navigation, search
This page contains changes which are not marked for translation.

Other languages:
English • ‎français • ‎日本語 • ‎한국어 • ‎русский • ‎中文(中国大陆)‎

Hardware manufactures often provide updates for their BIOS and firmware. To apply (often referred to as to flash) the updates is sometimes not straight forward and requires some work.

If the hardware works, there is often no need to upgrade the BIOS. If something goes wrong, this might cause permanent damage to your BIOS and you might lose your warranty.

Getting BIOS

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 sys-apps/dmidecode to retrieve some info.

root #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.

Accessing the motherboard of a computer may cause loss of warranty!

After some searching on manufacturer site you can get BIOS update as zip-, exe- or iso-file.

user $unzip
   creating: 7235v1A/
inflating: 7235v1A/7235v1x.txt
inflating: 7235v1A/AWFL865.EXE
inflating: 7235v1A/How to flash the BIOS.DOC
inflating: 7235v1A/W7235IMS.1A0

BIOS Option

Many BIOS have an option to read the new binary image from an external memory stick or floppy disk. All you need to do is to go into your BIOS setup and look for the option.


Often the manufaturer offers a CD-Rom image to download as a boot medium. The file should have the extension .iso, to burn the image to an empty CD-R:

root #cdrecord BOOT-CD.iso
cdrecord is provided by two packages (you only need to install one of them): app-cdr/cdrtools and app-cdr/cdrkit

Now you can choose in your BIOS to boot from CD and follow the instructions on your manufacturers website.

FreeDOS Environment

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 one of the methods shown here.

Download FreeDOS and tools:

  • FreeDOS - download the fdboot.img file
  • FreeDOS bootsector - download the file
  • The DOS-Flash program and new BIOS from your manufacturers website

Create Custom FreeDOS Image

First we need to install and download the required software and enable the loopback device in our kernel:

KERNEL enable loopback device
Device Drivers  --->
    [*] Block devices  --->
        <M>   Loopback device support

If the module isn't loaded yet:

root #modprobe loop

Install required software:

root #emerge --ask dev-lang/nasm
This template uses deprecated syntax.

Create an image file of ~20MB using dd (the name needs to be freedos.img if you will be replacing the one on the SystemRescueCD):

root #dd if=/dev/null of=freedos.img bs=1024 seek=20480

Write a file system to the image:

root #mkfs.msdos freedos.img

Write the bootsector to the image file:

root #unzip && ./ --disk=freedos.img

Now we need to copy the FreeDOS files to our new image.
Create the mountpoints:

root #mkdir -p /mnt/freedos /mnt/freedos_new

Mount the original image:

root #mount -o loop fdboot.img /mnt/freedos

Mount the new image:

root #mount -o loop freedos.img /mnt/freedos_new

Copy the FreeDOS system files to our new image:

root #cp -ar /mnt/freedos/* /mnt/freedos_new/

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

root #cp -ar FLASH-PROGRAM BIOS-UPDATE /mnt/freedos_new

Unmount both images:

root #umount /mnt/freedos_new /mnt/freedos
DOS can only display names up to a length of 8 characters, you probably want to rename some of the files

Using SystemRescueCD to boot FreeDOS

The SystemRescueCD comes with a version of FreeDOS, we can replace the original image and create a bootable memory stick which contains the needed programs to flash our BIOS.

Download SystemRescueCD and prepare LiveUSB

Create Bootable Memory Stick

We use the default method to create the SystemRescueCD boot medium, the script will guide through the installation.

This will delete any data on the memory stick

Create the folder in /mnt:

root #mkdir /mnt/SysRescueCD

Mount the CD image:

root #mount -o loop systemrescuecd-x86-VERSION.iso /mnt/SysRescueCD

Start the installation script:

root #/mnt/SysRescueCD/

Unmount the CD image:

root #umount /mnt/SysRescueCD

Replace the FreeDOS image

We are going to replace the original FreeDOS image on the SystemRescueCD memory stick.
Mount the SystemRescueCD memory stick (/dev/sdX1 needs to be replaced by the device name of your memory stick):

root #mount /dev/sdX1 /mnt/SysRescueCD

Replace the freedos.img file:

root #cp freedos.img /mnt/SysRescueCD/bootdisk/

Unmount the SystemRescueCD memory stick:

root #umount /mnt/SysRescueCD

Booting the FreeDOS image from GRUB directly

If you would like to boot FreeDOS without any external media, you can use the "memdisk" tool from syslinux to allow grub (or another bootloader) to boot your FreeDOS image directly.

root #emerge --ask sys-boot/syslinux

Mount your /boot partition (if needed):

root #mount /boot

Copy the memdisk binary, and your newly built FreeDOS image to /boot:

root #cp /usr/share/syslinux/memdisk /boot
root #cp freedos.img /boot

Edit /boot/grub/grub.conf and add an entry for FreeDOS:

FILE /boot/grub/grub.conf Example grub.conf entry
title FreeDOS (BIOS update)
kernel /boot/memdisk floppy
initrd /boot/freedos.img

BIOS Update

Restart and choose to boot from the USB memory stick OR your new grub entry. If using SystemRescueCD, in the GRUB command line type:


This should boot you into our new FreeDOS image and you are greeted by the DOS prompt:


Now you can start your BIOS update by following the manufacturers instructions. Some useful commands in DOS:

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