-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Description
Issue description
This is coming from an upstream perspective in fwupd. I don't have any experience directly with NixOS. I also haven't reproduced this on my own.
I've however seen reports from our reporting system come in that fwupd fails to install updates on the XPS 9360.
Example:
UpdateError=UEFI firmware update failed: {error #0} libfwup.c:1479 get_fd_and_media_path(): open of /nix/store/v2rcywfc2gvxqrbcx24afgmidxyfv9yd-fwupdate-10/boot/EFI/debian/fw/fwupdate-MLI3SW.cap failed: No such file or directory {error #1} libfwup.c:1513 get_fd_and_media_path(): mkostemps(/nix/store/v2rcywfc2gvxqrbcx24afgmidxyfv9yd-fwupdate-10/boot/EFI/nixos/fw/fwupdate-qR3wd9.cap) failed: Read-only file system, UpdateState=failed, VersionNew=0.2.6.2, VersionOld=0.2.4.2
This is with fwupd 1.0.5 and fwupdate 10.
There's two different errors, so let me unpack them.
- The first error is because the person had Debian installed and fwupdate/libfwup tried to re-use the location of the capsule on the ESP last used for Debian (
boot/EFI/debian/fw/fwupdate-MLI3SW.cap)
this didn't exist so it tried to make a new one. - The second error is the attempt to create a new capsule but unable to create one as that directory is read only. The capsule needs to live in the EFI system partition for this to succeed.
I can't emphasize enough the importance of relying on the real path to the ESP. As you can read in the documentation for fwupdate the capsule must be staged on the ESP to be installed on the next boot. The EFI application to install it must be on the ESP as well.
If the application can't find the real location to the ESP it will fail.
So your package will need to either:
- Make a directory symlink to the real ESP location.
- Customize the ESP location in the conf file for the UEFI plugin.
https://github.com/hughsie/fwupd/blob/master/plugins/uefi/uefi.conf
Steps to reproduce
- Run a UEFI update on fwupd
- Observe failure.