Article Title: Use Flashrom to back up or fl the BIOS in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Flashrom is a tool from the Coreboot project (the famous LinuxBIOS ). With this tool, we can easily and conveniently back up or fl the BIOS in Linux.
Install Flashrom
Before using Flashrom, you must install it first. Currently, some popular Linux distributions can install Flashrom through their own package manager. For example, Debian/Ubuntu users can execute the following command:
$ Sudo apt-get install flashrom
The Fedora user must execute:
$ Sudo yum install flashrom
If you cannot install Flashrom through the Package Manager of the Linux release, you can choose to manually compile and install Flashrom. Run the following command:
$ Svn co svn: // coreboot.org/repos/trunk/util/flashrom
$ Cd flashrom
$ Make
$ Sudo make install
Note that you will need compilation tools, Subversion, dependency packages pciutils and zlib.
Flashrom usage
In addition to checking whether Flash ROM supports your current motherboard and chip on the Flash ROM official homepage, you can also directly use the Flash ROM tool for detection. After you use the root user permission to execute the flashrom command, Flashrom will output information similar to the following:
Calibrating delay loop... OK.
No coreboot table found.
Found chipset "Intel ICH7/icw.r", enabling flash write... OK.
Found chip "Winbond W39V040B" (512 KB) at physical address 0xfff80000.
No operations were specified.
To back up the current BIOS image, run the following command:
# Flashrom-r bios_image.bin
Similarly, Flashrom provides output information for reference:
Calibrating delay loop... OK.
No coreboot table found.
Found chipset "Intel ICH7/icw.r", enabling flash write... OK.
Found chip "Winbond W39V040B" (512 KB) at physical address 0xfff80000.
Reading flash... done.
Run the following command to fl the new BIOS:
# Flashrom-wv new_bios.bin
Some chip drivers need to be erased before writing:
# Flashrom-E
Warning flushing the BIOS is a dangerous operation. Do not try it easily unless you know exactly what you are doing.