mirror of
https://github.com/systemd/systemd.git
synced 2026-11-06 05:17:24 +00:00
This is a small service that hooks into factory-reset.target, similar to systemd-tpm2-clear.service, and sets the LoaderFactoryResetVariables EFI variable, asking systemd-boot to erase its EFI variables on the next boot. Or in other words: a factory reset now resets the TPM *and* the EFI variables owned by systemd. The operation can be turned off via systemd.efivars_allow_clear= on the kernel command line or $SYSTEMD_EFIVARS_ALLOW_CLEAR. With --graceful the tool exits cleanly if the boot loader doesn't support the request. "systemd-factory-reset cancel" now also withdraws the request, and "bootctl remove" removes the variable too.