Lenovo V570 Can Not Open Firmware Device File
Flash your Lenovo Ideapad laptop BIOS from Linux using UEFI capsule updates
I’thou the happy owner of a Lenovo Ideapad laptop (model
710S-13IKB). It’s comparable to the
Dell XPS 13
and runs beautifully under Linux, merely ane detail has e’er been bugging me: Lenovo merely provides BIOS updates for its Ideapad laptops in the form of Windows 10 executable files. System firmware updates are important, particularly to mitigate newly found vulnerabilities similar
Meltdown and Spectre. Since I wiped Windows off my automobile a long time ago, I was wondering if there was an alternative (and secure) fashion to wink firmware updates on it.
And it turns out at that place is! After months of investigation, I found an elegant and stable update procedure
which doesn’t require Windows at all. It doesn’t even need the creation of a bootable USB primal: everything is done from the existing Linux installation. How is that possible? Let me introduce y’all to an interesting new characteristic of the
UEFI specification.
Different machines, different firmware updates
Many latop brands like
Dell
or
Asus
provide firmware files that you can put on a USB key and flash from an update application located in the BIOS menu itself.
Lenovo
does not. Instead, they requite you 2 options:
- For the higher-stop
ThinkPad
serial inherited from IBM, they provide bootable CD images that tin can be turned into bootable USB keys. That’s another good OS-agnostic solution. - For the
Ideapad
and
Yoga
series, you’re stuck with a Windows executable file. The contents of this file and the bodily flashing procedure varies depending on the BIOS/Firmware brand.
If y’all have a mod machine with a
Phoenix
firmware, chances are that the Windows executable contains the update in the form of an
UEFI Sheathing Update.
Capsule what?
When a firmware is distributed in that form, the update plan won’t wink it directly nether Windows. Instead, it volition delegate the task to the standard
UEFI
update mechanism chosen Capsule Update. In practice, it will inquire the operating organisation to copy an update file to the system sectionalisation and so plan the UEFI to verify this update and install information technology after the next reboot of the machine, before the operating system starts.
This standard update system is part of the
UEFI 2.five specification
released in 2015 and is also
available for Linux
thank you to efforts from Intel and Cerise Hat. To be able to use it, your Linux distribution must already boot in UEFI mode from a disk including an
EFI arrangement partition.
Uniform models
I compiled the following listing of
Lenovo
laptops which come up with a firmware update in the form of a Sheathing Update installer. If you discover more (including from other brands), please mention them in the comments.
700–15ISK, 700–17ISK
710S-13ISK, 710S-13IKB
720S-15IKB, 720S Touch-15IKB
E42–80, E52–80, E53–lxxx
300S-14ISK, 500S-14ISK, Edge ii–1580, Flex 3–1480, Flex 3–1580, Yoga 500–14ISK, Yoga 500–15ISK
720–15IKB (Type 81AG)
K21–lxxx, K22–80, K32–lxxx
K41–80/M41–fourscore
XiaoXin Rui7000
Rescuer E520–15IKB
V110–14IAP, V110–15IAP
V110–15IKB, V110–15ISK
V310–14IKB, V310–15IKB, V510–14IKB, V510–15IKB
V310–14ISK, V310–15ISK
V330–15IKB, V330–15ISK
V730–13IKB, V730–13ISK
V730–15IKB
Footstep 1: locate and extract the firmware update file
Go to the
Lenovo support website
and download the latest BIOS executable file for your machine. This is actually a Windows self-extracting annal built using
Inno Setup. You can extract the files in these archives using the control line tool
innoextract
which is bachelor for many Linux distributions. I’chiliad using Arch Linux then I install it using
pacman
:
pacman -S innoextract
Now let’s extract the files:
Alarm:
Brand sure y’all use the latest version of
innoextract
which is uniform with BIOS update executable files generated past Inno Setup version 6.0.0, the version that Lenovo is currently using.
If you have a uniform model y’all volition observe a
.cap
file, which is the file format for UEFI Capsule Updates. Keep that file and delete the residual.
Step two: install the UEFI Linux firmware update tools
There is a high-level tool chosen
fwupd
which allows to automatically detect, download and install updates from the
Linux Vendor Firmware Service. This tool also integrates with the
Gnome Software
graphical user interface in order to display firmware updates next to regular software updates.
Unfortunately, there are simply
a handful of machines
supported on that site at the time of this writing, mostly from Dell. Other vendors don’t (yet) make the try of publishing their software updates for Linux users.
Instead of the fwupd daemon and its companion tool
fwupdmgr
, we’re going to use a lower-level tool chosen
fwupdate
. It’s normally installed along with fwupd, just on some Linux distributions yous may have to install it separately.
pacman -S fwupd
On Curvation Linux,
fwupdate
is located in:
/usr/lib/fwupd/fwupdate
.
We tin employ this tool to check if our machine provides a firmware compatible with Sheathing Updates:
If nothing shows up for you, your firmware or your Linux kernel is not compatible and you can’t go any farther. Otherwise,
copy the GUID number
of your arrangement firmware for the next pace.
Pace 3: wink the firmware!
Now information technology’s time to prepare and schedule the update for the next arrangement reboot, using our extracted
.cap
file and the GUID noted above:
sudo fwupdate -a {e20bafd3-9914-4f4f-9537-3129e090eb3c} ./3HCN24WW.cap --esp-path=/kick
Note that I manually specify the ESP path which defaults to
/kick/efi
. Apply the appropriate path for your Linux installation.
If you see no error message, all went well. Y’all can cheque that the update is pending using the post-obit command:
Plug your laptop to a ability source
before rebooting or the update will be cancelled and yous’ll accept to echo the last footstep.
Reboot. Now go to the BIOS setup card of your machine (for Lenovo laptops, press
F2
or
Fn + F2
at boot fourth dimension) and make sure the “Linux-Firmware-Updater” entry is moved kickoff in the “Boot Priority Order”.
Relieve and go out. Now the updater will kicking in, load the Sheathing Update file into RAM, verify it and restart the auto again.
Hold your breath during the actual flashing procedure.
Success!
Your auto has simply been updated to its latest firmware.
Footstep four: reconfigure the BIOS to kick Linux once more
At present the system won’t kicking. Don’t panic, it’due south just because the BIOS settings have been reset to the factory defaults. You need to configure a few things to put Linux dorsum in charge. At boot, enter the BIOS menu by pressing Fn + F2.
In the “Configuration” tab, put the “SATA Controller Manner” back to AHCI because Linux tin’t boot in RAID style. You can likewise enable “Intel Virtual Technology” if you’re using KVM (information technology’south used by virtualization and emulation software).
Next, in the “Security” tab disable “Secure Boot”. Simply Windows and a few Linux distributions provide a suitably signed boot loader.
In the “Boot” tab, you’ll notice that the Linux boot loader entry is gone as well, merely that shouldn’t be a problem because near systems will endeavour to notice previously installed UEFI kick loaders automatically from the disks. Save and go out and your machine should kick back into your Linux installation. If it doesn’t, you can e’er employ a bootable Linux USB stick for the next stride.
Step five: restore the UEFI kicking entry
If you lot want to add dorsum the Linux option in your UEFI boot bill of fare, the simplest way is to reinstall your kicking loader. Check the documentation of your Linux distribution to discover the correct procedure, which commonly consists of a single command line. Many distributions install GRUB2 by default; I adopt using
systemd-boot
for simplicity.
Everything is back to normal.
I’m excited to come across that in that location are now better options to safely and apace update our auto firmwares from Linux. I’m waiting for more manufacturers to publish their updates on the
Linux Vendor Firmware Service
or for a community effort to appear. In the meantime, y’all tin always apply this procedure to download, extract and install the update files yourself, if you own a compatible organisation. Happy flashing!