tpm2_startup(1)
π tpm2_startup(1) β the general commands manual page, bestie edition
okay so this is tpm2_startup(1) from the General Commands Manual and it's literally just about sending a startup command to the TPM. short page, big energy. let's get into it π«Ά
β¨ NAME β¨
tpm2_startup(1) β Send a startup command to the TPM. that's it. that's the whole job. π«
π¦ SYNOPSIS π¦
tpm2_startup [OPTIONS]
πΈ DESCRIPTION πΈ
tpm2_startup(1) sends a TPM2_Startup command, and it's gonna be either TPM_SU_CLEAR or TPM_SU_STATE. pick your fighter, we'll get to how. π
π OPTIONS π
-c,--clearβ sends the startup type asTPM_SU_CLEARinstead ofTPM2_SU_STATE. lowkey a whole vibe change, no cap.
References
(this is a heading that exists in the original with nothing under it β yes really, we're keeping it, we don't skip parts around here π)
π COMMON OPTIONS π
okay these are the options a bunch of the tools share, the little communal closet of flags that many users may expect:
-h,--help=[man|no-man]β shows you the tool's manpage. by default it tries to invoke the manpager for the tool, but if that fails it'll output a short tool summary instead. same behavior if you pass themanoption argument β BUT if you explicitly ask forman, the tool will give you errors from man on stderr. if you specify theno-manoption, or if the manpager fails, the short options get output to stdout.
to actually use the manpages feature, the manpages need to be installed or onMANPATH. seeman(1)for more deets. π
-v,--versionβ displays version info for this tool plus the supported tctis, then exits. slay and goodbye βοΈ-V,--verboseβ makes the tool print more info to the console while it runs. when you use this one, the file and line number get printed too. very "show your work" of it.-Q,--quietβ silences normal tool output to stdout. shhh π€«-Z,--enable-errataβ enables applying errata fixups. useful if an errata fixup needs to be applied to commands sent to the TPM. defining the environment variableTPM2TOOLS_ENABLE_ERRATAis equivalent. same thing, different font.-z,--pwd-sessionβ uses a password session instead of a HMAC session for authentication. a clear text password gets passed to the TPM to authorize the action. this option can be used to avoid problems when unsalted sessions are used in OpenSSL FIPS mode. if auth values are used, a salted session should be used for authentication. π©·-R,--autoflushβ enables autoflush for transient objects created by the command. if a parent object is loaded from a context file, the transient parent object will be flushed too. autoflush can also be activated if the environment variableTPM2TOOLS_AUTOFLUSHis set toyesortrue. (yes, the original says "is is" β we're keeping the spirit, it's giving typo, love that for us π) β information many users may expect. π§
π TCTI Configuration π
the TCTI, aka the "Transmission Interface", is the communication mechanism with the TPM. TCTIs can be changed so you can talk to TPMs across different mediums. versatile icon.
to control the TCTI, the tools respect:
- the command line option
-Tor--tcti - the environment variable:
TPM2TOOLS_TCTI
note: the command line option always overrides the environment variable. always. periodt. π
the current known TCTIs are:
tabrmdβ the resource manager, called tabrmd. note thattabrmdandabrmdas a tcti name are synonymous.mssimβ typically used for communicating to the TPM software simulator. simulator girlie behavior.deviceβ used when talking directly to a TPM device file. no middleman, main character energy.noneβ do not initalize a connection with the TPM. some tools allow for off-tpm options and thus support not using a TCTI. tools that do not support it will error when attempted to be used without a TCTI connection. does not support ANY options and MUST BE presented as the exact text ofnone.
β οΈ like, literally the exact text none. no decor, no extra options, doesn't support ANY. don't try it.
the arguments to either the command line option or the environment variable are in the form:
<tcti-name>:<tcti-option-config>
specifying an empty string for either the <tcti-name> or <tcti-option-config> results in the default being used for that portion respectively. convenient!
π TCTI Defaults
when a TCTI is not specified, the default TCTI is searched for using dlopen(3) semantics. the tools will search for tabrmd, device and mssim TCTIs IN THAT ORDER and USE THE FIRST ONE FOUND. order matters bestie, do not come for me.
you can query what TCTI will be chosen as the default by using the -v option to print the version information. the default-tcti key-value pair will indicate which of the aforementioned TCTIs is the default. cute lil detective work π
π¦ Custom TCTIs
any TCTI that implements the dynamic TCTI interface can be loaded. the tools internally use dlopen(3), and the raw tcti-name value is used for the lookup. so this could be a path to the shared library, or a library name as understood by dlopen(3) semantics. bring your own, we love a custom moment.
β TCTI OPTIONS β
this collection of options configures the various known TCTI modules available:
device: for the device TCTI, the TPM character device file for use by the device TCTI can be specified. the default is/dev/tpm0.
example: -T device:/dev/tpm0 or export TPM2TOOLS_TCTI=βdevice:/dev/tpm0β
mssim: for the mssim TCTI, the domain name or IP address and port number used by the simulator can be specified. the defaults are127.0.0.1and2321.
example: -T mssim:host=localhost,port=2321 or export TPM2TOOLS_TCTI=βmssim:host=localhost,port=2321β
abrmd: for the abrmd TCTI, the configuration string format is a series of simple key value pairs separated by a,character. each key and value string are separated by a=character.- the TCTI abrmd supports two keys:
bus_name: the name of the tabrmd service on the bus (a string).bus_type: the type of the dbus instance (a string) limited tosessionandsystem.
- the TCTI abrmd supports two keys:
specify the tabrmd tcti name and a config string of bus_name=com.example.FooBar:
\--tcti=tabrmd:bus_name=com.example.FooBar
specify the default (abrmd) tcti and a config string of bus_type=session:
\--tcti:bus_type=session
NOTE: abrmd and tabrmd are synonymous. the various known TCTI modules. π«Ά
π₯ EXAMPLES π₯
Send a TPM Startup Command with flags TPM2_SU_STATE
tpm2_startup
Send a TPM Startup Command with flags TPM2_SU_CLEAR
tpm2_startup -c
π NOTES π
typically a Resource Manager (like tpm2-abrmd) or low-level/boot software will have already sent this command. so likeβ¦ check before you go doing it again, bestie. π
π Returns π
tools can return any of the following codes:
0β Success. we love a win π1β General non-specific error.2β Options handling error.3β Authentication error.4β TCTI related error.5β Non supported scheme. applicable totpm2_testparams.
π BUGS π
Github Issues. (that's the whole thing. go file one, i believe in you.)
π¬ HELP π¬
See the Mailing List.
π License π
this work is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0). iconic of them, honestly.
and that's the page!! π this whole thing comes to you from tpm2-tools, and it's the tpm2_startup(1) page β ok bye bestie, go start some TPMs responsibly π
β¨π
π¦ where this page comes from
- arch rolling: tpm2-tools 5.8-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms