Backup of nekr0z/linux-on-huawei-matebook-13-2019
Please check there first to see if more recent method is available.
Backup date: 22-05-2019
Huawei provides downloadable BIOS updates packaged for Windows. With some effort, these can be installed from Linux.
To update BIOS, make sure fwupd
is installed. You'll also need firmware-packager script and gcab
that it depends on. I strongly advice having a bootable USB drive for bootloader recovery close at hand, too. Laptop should be on AC power for firmware updater to work.
PLEASE read through all the steps before you start and make sure you have at least a vague understanding of the process! Don't hold me responsible if you trash your system or brick your BIOS!!!
-
Download BIOS from Huawei website. Version 1.0.5 (we'll use it as an example) comes in a
.zip
file that contains a signature and another.zip
file with the same name. You need that second.zip
file, so extract it to the directory you havefirmware-packager
script in. -
./firmware-packager --firmware-name HuaweiBIOS --device-guid 4ab52f4e-04c0-47ec-af33-a4f5c28ce0b7 --developer-name Huawei --release-version 0.1.0.5 --exe ./MateBook_13_BIOS_1.05.zip --bin ./MateBook_13_BIOS_1.05/WRIWU105.bin --out bios.cab
-
fwupdmgr install bios.cab
-
Reboot (or hibernate) and hold F12 upon boot to select updater from list of devices. It reboots again during the process, so make sure to press F12 during the second reboot, too, for the process to continue.
-
Now your new BIOS is installed and you may check its version holding F2 during the next reboot. However, your UEFI boot record is likely messed up as the result of Step 4, so your system won't boot from SSD any longer.
-
Fix your bootloader using the bootable USB drive. I used a Debian Live image with persistence that had
grub-efi-amd64
and its dependencies pre-installed, so it was only a matter of mounting/boot
and/boot/efi
to/mnt/system/
and issuingsudo grub-install --boot-directory=/mnt/system/boot --bootloader-id=debian --target=x86_64-efi --efi-directory=/mnt/system/boot/efi
Your mileage may vary.