10
February
2026
How to update your computer's BIOS/EFI/firmware in Linux
15:11

How to update your computer's BIOS/EFI/firmware in Linux

10 February 2026 15:11

How to flash the BIOS in a Linux system? Instructions for updating the BIOS/EFI/firmware of a personal computer from Linux operating system.

Introduction

Updating your computer's BIOS is necessary to support new processor models. For example, updating the BIOS must be done before installing a more modern, powerful processor that is not supported by the original BIOS version.

Sometimes the developer company releases new BIOS versions to eliminate errors or add new functions (for example, the ability to “overclock” the processor).

The update is always available on the motherboard manufacturer's website on the Internet in the form of a self-extracting archive (EXE) file, which contains the utility (executable EXE file) for the firmware, the firmware itself (binary file) and autoexec.bat (command file).

The usual method of updating the BIOS with a DOS boot disk has now become inconvenient, as it takes a long time:

  • First you need to buy a flash drive,
  • download FreeDOS,
  • burn the FreeDOS IMG file using Rufus to a USB drive,
  • then extract the utility EXE file and the firmware file from the archive with the BIOS firmware onto a bootable USB flash drive,
  • boot from a USB flash drive with firmware, and the EXE utility will automatically flash the computer's ROM.

If your PC has LInux installed, there is a time-saving way to flash a new BIOS version into your computer's ROM from a Terminal window.

1. Preparation

1.1 Find out the motherboard model

There are two ways to find out the motherboard model:
1) hardware. Open the computer case, find on the motherboard and read the inscription - manufacturer and model of the motherboard,
2) software - install the lshw package and run the utility of the same name with the "-C system" switch.

sudo apt install lshw
sudo lshw -C system | head -7

Where "head -7" limits the output to the first 7 lines.

sudo lshw -C system | head -7
green-pro
   Description: Desktop Computer
   Product: H55M-S2H
   Manufacturer: Gigabyte Technology Co., Ltd.
   Bit depth: 64-bit
   Features: smbios-2.4 dmi-2.4 smp vsyscall32
   Configuration: boot=normal chassis=desktop uuid=

In my case, the product is H55M-S2H from Gigabyte Technology Co., Ltd..

1.1 Find out the BIOS firmware version number

The dmidecode utility with the -t bios switch shows the BIOS firmware version.

sudo apt install dmidecode
sudo dmidecode -t bios | head -12

before_flashing

1.2 Download the firmware version from the manufacturer’s website

On the Internet, go to the website of the manufacturer of your motherboard - section Support, enter or find your model - download the BIOS update.
Naturally, you need to download the latest version of the BIOS firmware.

gigabyte

1.2 Extract the binary firmware file from the update archive

Right-click on the EXE file - Extract here.
unzip1
Go to the folder
unzip2
We notice the firmware file. His name can be copied to the clipboard. Using the right mouse button - "Rename" - select the file name - copy to the clipboard.
unzip3

1.3 Installing the firmware utility

Need to install package flashrom.

sudo apt install flashrom

Flashrom application description:

Identify, read, write, erase and test BIOS/ROM/flash memory chips.
flashrom is a tool for identifying, reading, writing, checking and erasing flash memory chips.
It is often used to flash BIOS/EFI/coreboot/firmware/optionROM images on a system using a supported motherboard, but also supports flashing network interface cards (NICs), SATA controllers, and other external devices that can program flash memory chips.

It supports a wide range of DIP32, PLCC32, DIP8, SO8/SOIC8, TSOP32/40/48 and BGA chips using various protocols such as LPC, FWH, parallel flash or SPI.

The tool can be used, for example, to flash BIOS/firmware images - be it proprietary BIOS images or coreboot images (formerly known as LinuxBIOS).

It can also be used to read the current existing BIOS/firmware from the flash memory chip.

Home page:http://www.flashrom.org.

2. BIOS/EFI/firmware

2.1 Reading from ROM and saving an old version of BIOS/EFI/firmware to disk

ROM is the read-only memory or flash memory of a computer. I read the old version of the firmware using the utility flashrom:

cd Downloads
sudo flashrom -p internal -r h55ms2h.f1

where h55ms2h.f1- the name of the firmware file of the first version, in this case “F1”, which I save on disk. (For simplicity, you can use the file name "bios.old")

read

2.2 Writing a new version of BIOS/EFI/firmware to ROM

In my case, the firmware version F7 has the file name h55ms2h.f7

Before writing firmware to ROM, make sure that the firmware file matches the model of the motherboard.

If the PC has a small amount of RAM, close all unnecessary programs except Terminal so that swapping does not occur, i.e. dumping the contents of memory onto the hard disk into the swap file.

Launching the firmware using the flashrom utility:

sudo flashrom -p internal -w h55ms2h.f7

We will never turn off the computer during the firmware installation! We are waiting for the inscriptions “Erase/write done” and “Verifying flash... VERIFIED” to appear.
write

3. Reboot the PC

sudo reboot

or

sudo shutdown -r now

4. Checking the BIOS/EFI/firmware version

sudo dmidecode -t bios | head -12

after_flashing

5. Problems and Solutions

5.1 FlashROM Error: mmap "Operation not permitted"

Depending on the memory chip with the BIOS, when reading the ROM using the read command
sudo flashrom -p internal -r bios.old
the error "mmap failed: Operation not permitted" may occur.

Found chipset "Intel ICH7/ICH7R".
Enabling flash write... Error accessing ICH RCRB, 0x4000 bytes at 0x00000000fed1c000
/dev/mem mmap failed: Operation not permitted
FAILED!
FATAL ERROR!
Error: Programmer initialization failed.

Solution:

Add the kernel parameter

iomem=relaxed

To do this, after the "Grub loading." message appears on the screen. and "Welcome to Grub."
In the Grub2 menu, press "e" and add the Linux kernel parameter:

linux /boot/vmlinuz-x.xx.xx ... ro quiet iomem=relaxed

And press F10 to continue booting Linux.

5.2 If the BIOS has two chips, how to flash both chips

The "shadow" BIOS uses two ROM chips.
The flashrom -p utility will report this when called without the -c parameter.
To read or write, you need to specify the additional -c "chip name" switch.
I flashed both chips.

Example:

sudo flashrom -p internal -w 1394.ROM -c "Pm25LD040(C)"
sudo flashrom -p internal -w 1394.ROM -c "Pm25LV040"

Free illustration: publicdomainvectors.org.