it-at-tridauto

updated

6 months ago

IA

it-at-tridauto

2 Intern

•

16 Posts

•

2 Points

0

2622

November 18th, 2025 14:48

How to manage Secure Boot key files on "BIOS Type 2" machines?

I'm trying to update a few older machines so they will support the Microsoft 2023 UEFI secure boot certificates. These machines include Optiplex 7040s and Precision 7530s, machines with a BIOS type that Dell calls "Type 2" according to this KB:

https://www.dell.com/support/kbdoc/en-us/000368610/

The Precision 7530, for instance, won't be getting any BIOS updates that include the new keys and certificates, but Windows can update them and store them in NVRAM on the machine. I can verify this using some Secure Boot tools from GitHub:

https://github.com/cjee21/Check-UEFISecureBootVariables

These tools will show the default stored certs and the current stored certs. With this I can make a Precision 7530 with an 8th gen Intel CPU boot using an updated Windows bootloader signed with the new certs.

However, if I ever need to BIOS reset one of these machines. I'd need to be able to replace the certs. BIOS Setup has a "Custom Mode" for managing Secure Boot keys, and I can save the four "variables" to disk files. I can actually export these without turning Custom Mode on. If I want to re-import them again, I would turn Custom Mode on and then "Replace from file" all four key files. But I can't.

Attempting to do so gives me a prompt: "Error replacing key: Please make sure that the new key is properly formatted with signature list and serialization headers."

I would have expected that files I just exported from the same machine would already be properly formatted. But the import process probably requires extra steps that I missed.

A cursory search on this only brought up documents on the upcoming June 2026 expiration of the existing Secure Boot certs, some general BIOS management instructions, and other nonsense, but no guide on how to construct key files that I can import using the BIOS "Custom Mode." It's also possible that the BIOS tool just doesn't work - Secure Boot was still fairly new and key management might not have been fully tested.

If I need to generate other files or if I need to use external tools like OpenSSL, I can do that. But I don't even know where to start.

  • it-at-tridauto

    2 Intern

    •

    16 Posts

    •

    2 Points

    0

    1

    Posted February 20th, 2026 15:36

    Seeing there seems to be no way outside of Windows itself to update the Secure Boot certificates and keys, I ended up preparing a bootable USB device with Windows 11 Pro on it. As long as I add the right storage and network drivers for the machines I need, such as a Precision 7530 which has a Type 2 BIOS on it, I could do these things:

    • Turn off the internal storage devices
    • Make sure Secure Boot is in Deployed mode and not in Custom Mode
    • Start the machine with my Win11 USB device
    • Run the scheduled task called "PI" to populate the Secure Boot portions of the Registry with current info
    • After a reboot or two, tell the USB Win11 to update the Secure Boot certificates using instructions here:
      https://github.com/cjee21/Check-UEFISecureBootVariables
    • I ended up using the setting "1844," which tells the PI scheduled task to:
      Apply the Microsoft Corporation KEK 2K CA 2023 to the KEK
      Apply the Windows UEFI CA 2023 to the DB
      Apply the Microsoft Option ROM UEFI CA 2023 to the DB
      Apply the Microsoft UEFI CA 2023 to the DB
    • Finally turn the internal storage devices back on and test.

    A couple of reboots and re-running of this scheduled task later, I could run the "Check UEFI PK, KEK, DB and DBX.cmd" script and it would show me the Current KEK and DB with the 2023 versions of the certificates. 

    I could then test this using a 2023-signed version of a Windows USB device to make sure it boots. If this fails to boot it usually complains about a Secure Boot violation, but if it succeeds then I'm done.

    Researching this took me down a rabbit hole of Linux Live Boot images, Windows-to-Go, EFI shells, and a whole mess of tools, none of which I could get to work. If this becomes a popular problem I might put together a YouTube video explaining the process I went through.

  • anne_droid

    6 Operator

    •

    2669 Posts

    •

    9800 Points

    1

    0

    Posted November 18th, 2025 23:25

    Hi

    Well LLM Perplexity reports....

    Dell systems typically expect the keys in .auth file format, which is a signed EFI Secure Boot key file. Incorrect file types (.key, .crt, .cer) will not work correctly for enrolling KEK keys.

      Kind Regards  

                                         

      anne_droid

     

    User uploaded image

     

  • it-at-tridauto

    2 Intern

    •

    16 Posts

    •

    2 Points

    1

    0

    Posted November 19th, 2025 13:57

    OK so the output of exporting from the BIOS is .esl apparently.

    At least the .auth file clue pointed me at a tutorial for preparing self-signed UEFI Secure Boot keys:

    https://github.com/DimitriDokuchaev/ConfiguringSecureBootWithSelfSigningKeys

    That at least provided links and hints for tools that I already know, like OpenSSL.

    (edited)

  • anne_droid

    6 Operator

    •

    2669 Posts

    •

    9800 Points

    0

    0

    Posted November 19th, 2025 21:55

    Magic.

      Kind Regards  

                                         

      anne_droid

     

    User uploaded image

     

  • it-at-tridauto

    2 Intern

    •

    16 Posts

    •

    2 Points

    0

    0

    Posted February 20th, 2026 15:45

    Since I can't edit the original post due to its age, I want to make my thoughts clear on why I wanted to do this.

    I work with other engineers, some of which like to tinker with their machines more than the average user. This might lead them to clearing their BIOSes or resetting other settings, and if a Windows 11 installation uses the 2023-signed boot loaders this will fail to start if the updated certificates are missing.

    I wanted a way to update the Secure Boot certs without needing to reinstall Windows. I would have preferred some way to do this in the Windows Preinstall Environment, but the "PI" scheduled task that does this is not available in WinPE and I can't seem to figure out what this task actually does. I know it has something to do with Trusted Platform Module management, but that's it and I don't see a way to invoke whatever it does outside a complete Windows installation.

    If you attempt this yourself, be sure to use a USB 3 device of some kind as your target for your portable Windows installation. Be familiar with your target device's network and storage drivers and know how to load those to an external Windows installation.

    I haven't been able to get Rufus to make a Windows-to-Go install, but I was able to restore my standard Win11 disk image to a USB device and then add drivers to it.

    Make sure this device is using the 2011-signed boot loader so it can boot from a machine without the 2023 certs.

    This was a pain to do.

  • mihi934827

    1 Rookie

    •

    2 Posts

    •

    2 Points

    0

    1

    Posted March 15th, 2026 18:16

    Lot easier solution: Take c:\windows\boot\efi\securebootrecovery.efi and put it as EFI\boot\bootx64.efi on a FAT32 formatted USB drive. Boot from it and the 2023 Windows cert is back in DB. The rest of the certs can be handled from the already installed Windows version which will now boot again. No need to fiddle with firmware setup or .auth files.

  • it-at-tridauto

    2 Intern

    •

    16 Posts

    •

    2 Points

    0

    0

    Posted March 16th, 2026 18:48

    @mihi934827 That makes a little more sense, though it looks like Windows generates this for every PC. This also makes sense as every PC is going to have a different Platform Key (PK).

    I think the 2023 Key Exchange Key (KEK) needs to be signed by the machine's PK, so I don't expect one PC's securebootrecovery boot loader to work on another. I can test this when I get back in office. Right now I'm snowed in.

  • mihi934827

    1 Rookie

    •

    2 Posts

    •

    2 Points

    0

    0

    Posted March 16th, 2026 22:29

    As that file has been signed by Microsofts 2011 CA (or else it won't boot on those systems), I'm pretty sure it is the same for everybody. It also only includes a signature for the 2023 Windows PCA certificate (to be placed into DB) signed by the 2011 KEK. It will not install any other certificates to either DB or KEK. But that is sufficient to get the system booting again, the KEK update will be performed once the normal system is booted up again.

    And even if you wanted to automate the KEK updates, "C:\Windows\System32\SecureBootUpdates\KEKUpdateCombined.bin" is less than 900KB and contains all the KEK updates up until now.

    I can understand Microsoft did not bake this into SecureBootRecovery.efi, as there might come more KEK later, even after the 2011 cert expired and Microsoft won't be able to update SecureBootRecovery.efi any longer.

    But yes, good luck getting out of the snow, and testing it yourself :)

  • Railgun_Orphen

    1 Rookie

    •

    1 Message

    •

    2 Points

    0

    1

    Posted April 15th, 2026 01:55

    Hello, it-at-tridauto, I've been following your post about updating the CA 2023 Certificates, and I noticed that you were also attempting to do that on a Dell Optiplex 7040. Were you able to get any luck with that? Right now, I'm attempting to do that, but every time I run the task for Secure-Boot-Update on the Scheduler, the entire PC freezes, have to force-restart the PC and then check the event viewer to see that there's a TPM Error 1801 (TPM-WMI).

    (edited)

  • it-at-tridauto

    2 Intern

    •

    16 Posts

    •

    2 Points

    1

    0

    Posted April 15th, 2026 13:02

    > Right now, I'm attempting to do that, but every time I run the task for Secure-Boot-Update on the Scheduler, the entire PC freezes, have to force-restart the PC and then check the event viewer to see that there's a TPM Error 1801 (TPM-WMI)

    @Railgun_Orphen This is exactly what I ran into.

    Something happens when this model of machine tries to update the Key Exchange Key (KEK). The only thing I know that will avoid a PC lock-up is shoe-horning Windows 11 on there and attempting the Secure Boot updates from within that. The KEK still doesn't update, but at least it doesn't lock up.

    It's possible the Optiplex 7040 and similar models just won't support Secure Boot updates without firmware fixes from Dell. Given that this is only running a 6th gen Core CPU with no Win11 support, Dell isn't likely to fix this. Perhaps some other OS or some third-party EFI tools might manage it, but Windows won't.

    I've gone down enough rabbit holes at this point that, if I can't do Secure Boot updates, even from within a USB-installed Win11, the machine isn't worth supporting anymore. But at least from a workplace view replacing machines isn't difficult. I understand home users won't have this luxury.