July 28, 2024, 4:50 PM
You will need:
A few years ago my brother's Lenovo Flex 5 laptop stopped working. When powered on, the lights on the Esc and Caps Lock keys would turn on, but the screen would remain off. This is a well known issue with this laptop. Lenovo had pushed a BIOS update through Windows update, which if interrupted would corrupt the BIOS and brick the laptop.
The laptop was unceremoniously added to our pile of dead laptops until recently when I was looking to salvage some laptop DDR4. When I saw the RAM on the laptop was soldered I decided to give fixing it a shot instead. This is my first attempt at BIOS flashing so I documented my steps in this post.
The laptop model is the IdeaPad Flex 5 14ARE05 Type 81X2 with AMD Ryzen 5 4500U and 16GB RAM. Some of the steps in this post are model specific, namely the specific regions to copy when patching the BIOS and the voltage to use for the BIOS chip (using the wrong voltage can fry the chip). If you have a different model you can still follow these steps this as a general guide, but you will need to look online to find the appropriate values for your model.
To repair the BIOS we need a non-corrupted copy of the BIOS. The latest BIOS installer can be downloaded from the Lenovo website. As of writing the latest BIOS version is EECN44WW.
Lenovo provides the BIOS only in the form of an installer runs on Lenovo laptops. This isn't going to work for us since the laptop is bricked. We need to get the BIOS firmware from the installer in order to flash it. First we will extract the UEFI capsule from the installer using innoextract:
cd /home/[username]/Desktop/innoextract-1.9-linux
./innoextract /home/[username]/Desktop/eecn44ww.exe
mv ./code\$GetExtractPath/EECN44WW.cap ../EECN44WW.cap
We now have the UEFI capsule, but we cannot flash it directly. We will use UEFITool to extract the BIOS firmware from the UEFI capsule:
sudo apt-get update && sudo apt install qt6-base-dev
In order to flash the BIOS chip we need to connect the working computer to the BIOS chip on the bricked laptop. We will do this using a CH341A programmer.
Assemble the programmer:
This is what the fully assembled CH341A programmer looks like:
Connect the programmer to the bricked laptop:
Before we flash the BIOS we need a copy of the corrupted BIOS so we can copy some values from it. We will do this using flashrom:
sudo apt-get update && sudo apt-get install flashrom
cd /home/[username]/Desktop/
sudo flashrom --programmer ch341a_spi -r backup.bin
cp backup.bin backup2.bin
We will now copy the BIOS regions containing system specific information (serial number, Windows license key, etc.) from the corrupted BIOS to the BIOS we extracted from the Lenovo installer. We will do this using GNOME Hex Editor:
sudo apt install ghex
We will now write our patched BIOS to the chip using flashrom:
cd /home/[username]/Desktop/
sudo flashrom --programmer ch341a_spi -w patched.bin
Reading old flash chip contents... done. Erasing and writing flash chip... Erase/write done. Verifying flash... VERIFIED.
After flashing the BIOS, the first time I started the laptop it briefly showed two lines referencing the CMOS being cleared (from the battery being unpluged) before returning to a black screen. Starting the laptop for a second time resulted in a successful boot.
Press F2 to enter the BIOS and ensure the serial number matches what is on the bottom of the laptop. If they match, you have successfully repaired your laptop!
I would have not been able to write this post without the knowledge from these two posts on the Win-Raid Forum: