units: make use of nvpcrs only after the NV anchor completion measurement is done

This makes sure we don't use the "hardware" or "verity" nvpcrs before
the NV anchor measurement is done.

This is mostly to avoid confusing output, and to indirectly ensure the
nvpcr allocation in tpm2-setup is the load bearing one, but it should
not be load bearing for security afaics.
This commit is contained in:
Lennart Poettering
2026-03-26 16:11:34 +01:00
parent 7c27f9f594
commit eaeeae6598
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ Documentation=man:systemd-pcrnvdone.service(8)
DefaultDependencies=no
Conflicts=shutdown.target
After=systemd-tpm2-setup-early.service systemd-tpm2-setup.service
Before=sysinit.target shutdown.target
Before=sysinit.target cryptsetup-pre.target cryptsetup.target shutdown.target
ConditionSecurity=measured-os
ConditionPathExists=!/etc/initrd-release
FailureAction=reboot-force
+1 -1
View File
@@ -12,7 +12,7 @@ Description=TPM NvPCR Product ID Measurement
Documentation=man:systemd-pcrproduct.service(8)
DefaultDependencies=no
Conflicts=shutdown.target
After=tpm2.target
After=tpm2.target systemd-pcrnvdone.service
Before=sysinit.target shutdown.target
RequiresMountsFor=/var/lib/systemd/nvpcr
ConditionPathExists=!/etc/initrd-release