table of contents
- bookworm 252.30-1~deb12u2
- bookworm-backports 254.16-1~bpo12+1
SYSTEMD-PCRPHASE.SERVICE(8) | systemd-pcrphase.service | SYSTEMD-PCRPHASE.SERVICE(8) |
NAME¶
systemd-pcrphase.service, systemd-pcrphase-sysinit.service, systemd-pcrphase-initrd.service, systemd-pcrphase - Measure boot phase into TPM2 PCR 11
SYNOPSIS¶
systemd-pcrphase.service
systemd-pcrphase-sysinit.service
systemd-pcrphase-initrd.service
/lib/systemd/system-pcrphase STRING
DESCRIPTION¶
systemd-pcrphase.service, systemd-pcrphase-sysinit.service and systemd-pcrphase-initrd.service are system services that measure specific strings into TPM2 PCR 11 during boot at various milestones of the boot process.
These services require systemd-stub(7) to be used in a unified kernel image (UKI) setup. They execute no operation when invoked when the stub has not been used to invoke the kernel. The stub will measure the invoked kernel and associated vendor resources into PCR 11 before handing control to it; once userspace is invoked these services then will extend certain literal strings indicating various phases of the boot process into TPM2 PCR 11. During a regular boot process the following strings are extended into PCR 11.
During a regular system lifecycle, the strings "enter-initrd" → "leave-initrd" → "sysinit" → "ready" → "shutdown" → "final" are extended into PCR 11, one after the other.
Specific phases of the boot process may be referenced via the series of strings measured, separated by colons (the "boot path"). For example, the boot path for the regular system runtime is "enter-initrd:leave-initrd:sysinit:ready", while the one for the initrd is just "enter-initrd". The boot path for the the boot phase before the initrd, is an empty string; because that's hard to pass around a single colon (":") may be used instead. Note that the aforementioned six strings are just the default strings and individual systems might measure other strings at other times, and thus implement different and more fine-grained boot phases to bind policy to.
By binding policy of TPM2 objects to a specific boot path it is possible to restrict access to them to specific phases of the boot process, for example making it impossible to access the root file system's encryption key after the system transitioned from the initrd into the host root file system.
Use systemd-measure(1) to pre-calculate expected PCR 11 values for specific boot phases (via the --phase= switch).
OPTIONS¶
The /lib/systemd/system-pcrphase executable may also be invoked from the command line, where it expects the word to extend into PCR 11, as well as the following switches:
--bank=
--tpm2-device=PATH
--graceful
-h, --help
--version
SEE ALSO¶
systemd 252 |