]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd-veritysetup-generator.xml
Merge pull request #30614 from yuwata/udev-event-take-worker
[thirdparty/systemd.git] / man / systemd-veritysetup-generator.xml
1 <?xml version="1.0"?>
2 <!--*-nxml-*-->
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
4 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
5 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
6 <refentry id="systemd-veritysetup-generator" conditional='HAVE_LIBCRYPTSETUP'
7 xmlns:xi="http://www.w3.org/2001/XInclude">
8
9 <refentryinfo>
10 <title>systemd-veritysetup-generator</title>
11 <productname>systemd</productname>
12 </refentryinfo>
13
14 <refmeta>
15 <refentrytitle>systemd-veritysetup-generator</refentrytitle>
16 <manvolnum>8</manvolnum>
17 </refmeta>
18
19 <refnamediv>
20 <refname>systemd-veritysetup-generator</refname>
21 <refpurpose>Unit generator for verity protected block devices</refpurpose>
22 </refnamediv>
23
24 <refsynopsisdiv>
25 <para><filename>/usr/lib/systemd/system-generators/systemd-veritysetup-generator</filename></para>
26 </refsynopsisdiv>
27
28 <refsect1>
29 <title>Description</title>
30
31 <para><command>systemd-veritysetup-generator</command> is a generator that translates kernel command line
32 options configuring verity protected block devices into native systemd units early at boot and when
33 configuration of the system manager is reloaded. This will create
34 <citerefentry><refentrytitle>systemd-veritysetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
35 units as necessary.</para>
36
37 <para>Currently, only two verity devices may be set up with this generator, backing the root and <filename>/usr</filename> file systems of the
38 OS.</para>
39
40 <para><command>systemd-veritysetup-generator</command> implements
41 <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
42 </refsect1>
43
44 <refsect1>
45 <title>Kernel Command Line</title>
46
47 <para><command>systemd-veritysetup-generator</command>
48 understands the following kernel command line parameters:</para>
49
50 <variablelist class='kernel-commandline-options'>
51 <varlistentry>
52 <term><varname>systemd.verity=</varname></term>
53 <term><varname>rd.systemd.verity=</varname></term>
54
55 <listitem><para>Takes a boolean argument. Defaults to <literal>yes</literal>. If
56 <literal>no</literal>, disables the generator entirely. <varname>rd.systemd.verity=</varname> is
57 honored only by the initrd while <varname>systemd.verity=</varname> is honored by both the host
58 system and the initrd.</para>
59
60 <xi:include href="version-info.xml" xpointer="v233"/></listitem>
61 </varlistentry>
62
63 <varlistentry>
64 <term><varname>roothash=</varname></term>
65
66 <listitem><para>Takes a root hash value for the root file system. Expects a hash value formatted in hexadecimal
67 characters of the appropriate length (i.e. most likely 256 bit/64 characters, or longer). If not specified via
68 <varname>systemd.verity_root_data=</varname> and <varname>systemd.verity_root_hash=</varname>, the hash and
69 data devices to use are automatically derived from the specified hash value. Specifically, the data partition
70 device is looked for under a GPT partition UUID derived from the first 128-bit of the root hash, the hash
71 partition device is looked for under a GPT partition UUID derived from the last 128-bit of the root hash. Hence
72 it is usually sufficient to specify the root hash to boot from a verity protected root file system, as
73 device paths are automatically determined from it — as long as the partition table is properly set up.</para>
74
75 <xi:include href="version-info.xml" xpointer="v233"/>
76 </listitem>
77 </varlistentry>
78
79 <varlistentry>
80 <term><varname>systemd.verity_root_data=</varname></term>
81 <term><varname>systemd.verity_root_hash=</varname></term>
82
83 <listitem><para>These two settings take block device paths as arguments and may be used to explicitly
84 configure the data partition and hash partition to use for setting up the verity protection for the root file
85 system. If not specified, these paths are automatically derived from the <varname>roothash=</varname> argument
86 (see above).</para>
87
88 <xi:include href="version-info.xml" xpointer="v233"/></listitem>
89 </varlistentry>
90
91 <varlistentry>
92 <term><varname>systemd.verity_root_options=</varname></term>
93
94 <listitem><para>Takes a comma-separated list of dm-verity options. Expects the following options
95 <option>superblock=<replaceable>BOOLEAN</replaceable></option>,
96 <option>format=<replaceable>NUMBER</replaceable></option>,
97 <option>data-block-size=<replaceable>BYTES</replaceable></option>,
98 <option>hash-block-size=<replaceable>BYTES</replaceable></option>,
99 <option>data-blocks=<replaceable>BLOCKS</replaceable></option>,
100 <option>hash-offset=<replaceable>BYTES</replaceable></option>,
101 <option>salt=<replaceable>HEX</replaceable></option>, <option>uuid=<replaceable>UUID</replaceable></option>,
102 <option>ignore-corruption</option>, <option>restart-on-corruption</option>, <option>ignore-zero-blocks</option>,
103 <option>check-at-most-once</option>, <option>panic-on-corruption</option>,
104 <option>hash=<replaceable>HASH</replaceable></option>, <option>fec-device=<replaceable>PATH</replaceable></option>,
105 <option>fec-offset=<replaceable>BYTES</replaceable></option>, <option>fec-roots=<replaceable>NUM</replaceable></option> and
106 <option>root-hash-signature=<replaceable>PATH</replaceable>|base64:<replaceable>HEX</replaceable></option>. See
107 <citerefentry project='die-net'><refentrytitle>veritysetup</refentrytitle><manvolnum>8</manvolnum></citerefentry> for more
108 details.</para>
109
110 <xi:include href="version-info.xml" xpointer="v248"/></listitem>
111 </varlistentry>
112
113 <varlistentry>
114 <term><varname>usrhash=</varname></term>
115 <term><varname>systemd.verity_usr_data=</varname></term>
116 <term><varname>systemd.verity_usr_hash=</varname></term>
117 <term><varname>systemd.verity_usr_options=</varname></term>
118
119 <listitem><para>Equivalent to their counterparts for the root file system as described above, but
120 apply to the <filename>/usr/</filename> file system instead.</para>
121
122 <xi:include href="version-info.xml" xpointer="v250"/></listitem>
123 </varlistentry>
124 </variablelist>
125 </refsect1>
126
127 <refsect1>
128 <title>See Also</title>
129 <para><simplelist type="inline">
130 <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
131 <member><citerefentry><refentrytitle>systemd-veritysetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
132 <member><citerefentry project='die-net'><refentrytitle>veritysetup</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
133 <member><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
134 </simplelist></para>
135 </refsect1>
136
137 </refentry>