SYSTEMD-TPM2-GENERATOR(8)

๐Ÿ’– NAME ๐Ÿ’–

okay bestie, so systemd-tpm2-generator โ€” it's the generator that plants a TPM2 synchronization point in your boot process. that's the whole gig. slay. โœจ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

/usr/lib/systemd/system-generators/systemd-tpm2-generator

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so here's the tea, systemd-tpm2-generator is a generator (yes, like systemd.generator(7) โ€” we'll get there) and what it does is: it looks around, and if it spots that the firmware found a TPM2 device but the OS kernel hasn't shown one yet? it goes ahead and adds a Wants= dependency from sysinit.target to tpm2.target. literally just drops it in there. ๐Ÿ’…

and why do we care? because tpm2.target is the moment in boot that's supposed to act as a synchronization point for every single service that needs to touch the TPM2 device. like, everybody wait up, the TPM isn't ready yet. peek systemd.special(7) for the deets on that. ๐Ÿ‘‘

๐ŸŽ€ the kernel command line overrides ๐ŸŽ€

ngl, these are the fun part. you can boss the generator around from the kernel command line.
  • systemd.tpm2_wait= โ€” this one overrides how the generator behaves. it takes a boolean value:
    • if true, then tpm2.target gets added as a synchronization point even if the firmware hasn't detected a TPM2 device at all. like, we're waiting no matter what, bestie.
    • if false, then the target will not be inserted, even if the firmware did report a device but the OS kernel isn't exposing a device for it yet. when is this useful? in environments where a suitable TPM2 driver for the hardware you've got justโ€ฆ isn't available. sad but real. ๐Ÿ˜ญ
  • systemd.tpm2_software_fallback= โ€” this one takes a boolean argument too, and it defaults to false. turn it on and you get an automatic software TPM fallback in case a hardware TPM isn't detected and swtpm(8) is available. and because it's a package deal, this pulls in the systemd-tpm2-swtpm.service(8) service. obsessed. ๐Ÿซถ

also just so we're clear: systemd-tpm2-generator implements systemd.generator(7). no cap.


๐ŸŒˆ SEE ALSO ๐ŸŒˆ


okay that's the whole page, you ate it up fr fr ๐Ÿ’– this little icon was brought to you by systemd 262.1 โ€” the systemd-tpm2-generator manual, page 8, dated whenever this version dropped. go forth and synchronize, bestie ๐ŸŽ€โœจ

๐Ÿ“ฆ where this page comes from
  • arch rolling: systemd 262.1-1 ยท LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms