Share via

fwupdmgr KEK 2011→2023 update fails with "efivarsfs: Invalid argument" on Trusted Launch Linux VM

Dovid Gross 0 Reputation points
2026-06-16T20:57:33.1933333+00:00

I'm following KB 5103014 ("Secure Boot certificate updates for Linux on Azure virtual machines") to replace the expiring Secure Boot 2011 certificates with 2023 on a Trusted Launch Linux VM. The fwupd update consistently fails when writing the KEK to the UEFI variable store. The VM still boots normally on the existing 2011 certificates, so nothing is currently degraded — I need the supported procedure to complete the update.

Environment

  • Azure Trusted Launch VM (Secure Boot + vTPM), Gen2, East US
  • Ubuntu 22.04.3 LTS, kernel 6.8.0-1031-azure
  • VM created 2023-10-19 (pre-April 2024, in scope per KB 5103014)
  • fwupd 2.1.4

Confirmed 2023 certs are absent

  • mokutil --db | grep "UEFI CA 2023" → no output
  • mokutil --kek | grep "KEK 2K CA 2023" → no output

Checks already done (rules out the common causes)

  • efivarfs mounted rw: efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
  • ESP mounted: /boot/efi on /dev/sdb15 (vfat, rw)
  • KEK variable is not immutable — lsattr shows no i flag

The failure sudo fwupdmgr refresh succeeds. sudo fwupdmgr update correctly offers "Upgrade KEK CA from 2011 to 2023 … signed by Microsoft Corporation Third Party Marketplace PCA", I confirm, and the write fails:

WARNING: UEFI ESP partition not detected or configured
...
failed to write-firmware: failed to write (null): failed to write data to efivarsfs: Error writing to file descriptor: Invalid argument

This matches a known fwupd issue reported across several platforms (e.g. fwupd GitHub issues #9483, #9191), with one report attributing it to an EFI variable-store space limitation.

Questions

  1. What's the supported way to complete the KEK/db 2023 update on a Trusted Launch Linux VM when fwupd fails this way?
  2. If the cause is EFI variable-store space, what's the safe, supported way to free space on a Trusted Launch VM without risking boot? (I'd rather not manually delete UEFI variables unless confirmed safe for this config.)
  3. Will the efitools / efi-updatevar manual method in KB 5103014 succeed where fwupd fails, or hit the same limit?
  4. Any vTPM / measured-boot impact from the recommended procedure?

I have a pre-change disk snapshot in place. Happy to provide fwupdmgr get-devices or dmesg'm following KB 5103014 ("Secure Boot certificate updates for Linux on Azure virtual machines") to replace the expiring Secure Boot 2011 certificates with 2023 on a Trusted Launch Linux VM. The fwupd update consistently fails when writing the KEK to the UEFI variable store. The VM still boots normally on the existing 2011 certificates, so nothing is currently degraded — I need the supported procedure to complete the update.

Environment

  • Azure Trusted Launch VM (Secure Boot + vTPM), Gen2, East US
  • Ubuntu 22.04.3 LTS, kernel 6.8.0-1031-azure
  • VM created 2023-10-19 (pre-April 2024, in scope per KB 5103014)
  • fwupd 2.1.4

Confirmed 2023 certs are absent

  • mokutil --db | grep "UEFI CA 2023" → no output
  • mokutil --kek | grep "KEK 2K CA 2023" → no output

Checks already done (rules out the common causes)

  • efivarfs mounted rw: efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
  • ESP mounted: /boot/efi on /dev/sdb15 (vfat, rw)
  • KEK variable is not immutable — lsattr shows no i flag

The failure sudo fwupdmgr refresh succeeds. sudo fwupdmgr update correctly offers "Upgrade KEK CA from 2011 to 2023 … signed by Microsoft Corporation Third Party Marketplace PCA", I confirm, and the write fails:

WARNING: UEFI ESP partition not detected or configured
...
failed to write-firmware: failed to write (null): failed to write data to efivarsfs: Error writing to file descriptor: Invalid argument

This matches a known fwupd issue reported across several platforms (e.g. fwupd GitHub issues #9483, #9191), with one report attributing it to an EFI variable-store space limitation.

Questions

  1. What's the supported way to complete the KEK/db 2023 update on a Trusted Launch Linux VM when fwupd fails this way?
  2. If the cause is EFI variable-store space, what's the safe, supported way to free space on a Trusted Launch VM without risking boot? (I'd rather not manually delete UEFI variables unless confirmed safe for this config.)
  3. Will the efitools / efi-updatevar manual method in KB 5103014 succeed where fwupd fails, or hit the same limit?
  4. Any vTPM / measured-boot impact from the recommended procedure?

I have a pre-change disk snapshot in place. Happy to provide fwupdmgr get-devices or dmesg

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.


1 answer

Sort by: Most helpful
  1. Dovid Gross 0 Reputation points
    2026-06-16T22:36:10.1766667+00:00

    Hi Jose, thank you for the guidance - it got us further than fwupd did.

    Following your recommendation, I skipped fwupd entirely and used the efi-updatevar method from KB 5103014. Results:

    • sudo efi-updatevar -a -f DBUpdate3P2023.bin db - silent success (no output, no error)
    • sudo efi-updatevar -a -f KEKUpdate_Microsoft_PK1.bin KEK - Failed to update KEK: Invalid argument

    The db update appears to have applied. The KEK update fails with the same "Invalid argument" error as fwupd, suggesting this is not a tooling issue but a platform-level rejection of KEK writes on this VM.

    This VM matches the symptom description in the Known Issues article (KB 5085790) - "certain long-running Azure Trusted Launch Gen2 VMs where Secure Boot variables are maintained by the platform firmware." That article currently states "no required customer action; a resolution will be delivered through future updates."

    A few questions - I know you are not MS support, but perhaps you know, or an MS engineer might chime in:

    1. Is there any customer-actionable path to complete the KEK update on a Trusted Launch VM where the platform firmware is blocking KEK writes?
    2. Given the db update succeeded but KEK did not, is the VM in a consistent/safe state, or is a partial update problematic?
    3. Is the incoming platform fix expected before June 26?

    VM details if helpful: Ubuntu 22.04.3, kernel 6.8.0-1031-azure, fwupd 2.1.4, Trusted Launch Gen2, created October 2023.Hi

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.