How to upgrade BIOS on a Lenovo laptop running linux
Usually, Lenovo releases BIOS updates in two formats: a single .EXE file, that needs to be executed on a Windows OS, and a .ISO file that needs to be burned on a CD.
But, how can i perform the upgrade if my laptop doesn’t have the CD reader and my OS is Linux?
My solution is burn the ISO file on a bootable USB stick.
How? Very simple, the keyword is El Torito!
What is El Torito?
The El Torito Bootable CD Specification is an extension to the ISO 9660 CD-ROM specification, introduced in the 90’s and designed to allow a computer to boot from a CD-ROM.
This specification is used till today for bootable ISO images.
In order to convert a ISO file into an image suitable to make a bootable USB stick, we need to extract from the ISO the ElTorito virtual disk section, that contains the bootable image:
~$ isoinfo -i g6uj32us.iso -d CD-ROM is in ISO 9660 format System id: Volume id: G6ETC5WW Volume set id: Publisher id: Data preparer id: Application id: NERO BURNING ROM Copyright File id: Abstract File id: Bibliographic File id: Volume set size is: 1 Volume set sequence number is: 1 Logical block size is: 2048 Volume size is: 16566 El Torito VD version 1 found, boot catalog is in sector 20 Joliet with UCS level 3 found NO Rock Ridge present Eltorito validation header: Hid 1 Arch 0 (x86) ID 'NERO BURNING ROM' Key 55 AA Eltorito defaultboot header: Bootid 88 (bootable) Boot media 4 (Hard Disk Emulation) Load segment 7C0 Sys type 6 Nsect 1 Bootoff 1B 27
Few simple steps…
- First, find on Lenovo support website the correct iso download (in this example I’m using an X1 Carbon 1st Gen):
- Download the ISO file:
$ wget https://download.lenovo.com/pccbbs/mobiles/g6uj32us.iso
- (Optional) If not already present on your system, install the correct ISO tools.
For example, on my Debian 10:
$ sudo apt install genisoimage
- Extract the image using geteltorito utility:
$ geteltorito -o lenovo.img g6uj32us.iso
- Finally, write the image on a USB stick:
$ sudo dd if=lenovo.img of=/dev/sdb bs=64K status=progress
Now, simply restart the laptop, boot from USB and start the upgrade process.
That’s all, folks!