Flashing BIOS from Linux

From ArchWiki
Revision as of 04:15, 27 June 2010 by Inxsible (Talk | contribs) (Created page with 'Category:HOWTOs (English) This article aims on providing information on flashing your system BIOS under Linux. Most manufacturers provide a Windows executable or a BIOS execu…')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This article aims on providing information on flashing your system BIOS under Linux. Most manufacturers provide a Windows executable or a BIOS executable that can only be run under Windows. However, there are a few utilities, that allow you to upgrade your system BIOS under Linux.

Introduction

There are a couple of utilities that you can use to flash the system BIOS.

BiosDisk

BiosDisk BiosDisk simplifies the process of flashing your system BIOS under Linux

Installation

Method 1: AUR (Recommended)

BiosDisk is available from the Arch User Community Repositories.

Method 2: From Source

Grab the source from the biosdisk web page. Extract the source from the tar ball and run the install.sh file as root.

Usage

To use the biosdisk utility to create a BIOS flash image, first download the latest raw BIOS image for your system from your manufacturer's website. Make sure however, that you always get the BIOS executable and NOT the Windows executable. You then have one of several options: create a floppy, create a dd floppy image, create a user-installable distribution-specific package (e.g. RPM), or actually install the image for your bootloader.

  • The mkfloppy action will create the biosdisk image and write it directly to a floppy disk. Usage is the following:
    biosdisk mkfloppy [-o option] [-d device] [-k baseimage] /path/to/.exe 

  • The mkimage action will create a floppy image on the user's hard drive. Usage is the following:
    biosdisk mkimage [-o option] [-i destination] [-k baseimage] /path/to/.exe 

  • The mkpkg action will create the floppy image, and use it to create a user-installable package specific to the distribution (example: RPM). When the package is installed, it will use the distribution's built-in tools to update the system's bootloader so that the user can boot to the image from the hard drive to flash the BIOS, without needing a floppy drive. Currently only Red Hat/Fedora RPM packages are supported. Usage is as follows:
    biosdisk mkpkg [-o option] [--install] [--distro=] [--name=] [--version=] [--release=] /path/to/{.exe | .img}

  • The install action will create the biosdisk image, copy the image file to /boot, and then update the bootloader with an entry for the image. Then all the user has to do is boot the system and select the image to flash the BIOS; this will load the biosdisk image directly from the hard drive and flash the BIOS.
    biosdisk install [-o option] [--name=] /path/to/{.exe | .img}

Flashrom

Flashromis a utility for identifying, reading, writing, verifying and erasing flash chips. It is designed to flash BIOS/EFI/coreboot/firmware/optionROM images on mainboards, network/graphics/storage controller cards, and various programmer devices.

Installation

Method 1: Community Repo (Recommended)

sudo pacman -S flashrom

Method 2: AUR

Flashrom Flashrom Flashrom is also available from the Arch User Community Repositories.

Method 2: From Source

Grab the source from the Flashrom web page. Extract the source from the tar ball and run make and make install.

Usage

Find out if your motherboard and chipset is supported by flashrom at this website. Supported Hardware You can also find out if your hardware is supported by issuing the following command

sudo flashrom

The above command will tell you your motherboard and chipset. You can then find out if your's is supported by issuing this command

flashrom -L | grep whatevernameyougotfromthefirstcommand

Read the BIOS image into a file:

 $ flashrom -r backup.bin

Write a BIOS image (proprietary or LinuxBIOS) on the ROM chip:

 $ flashrom -wv newbios.bin

WARNING: This will overwrite your current BIOS! Make sure you know what you're doing! You've been forewarned !!

==