| 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>[email protected]</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 in the initrd while <varname>systemd.verity=</varname> is honored by both the main |
| 58 |
system and in the initrd.</para> |
| 59 |
|
| 60 |
<xi:include href="version-info.xml" xpointer="v233"/></listitem> |
| 61 |
</varlistentry> |
| 62 |
|
| 63 |
<varlistentry> |
| 64 |
<term><varname>veritytab=</varname></term> |
| 65 |
<term><varname>rd.veritytab=</varname></term> |
| 66 |
|
| 67 |
<listitem><para>Takes a boolean argument. Defaults to <literal>yes</literal>. If |
| 68 |
<literal>no</literal>, causes the generator to ignore any devices configured in |
| 69 |
<filename>/etc/veritytab</filename>. <varname>rd.veritytab=</varname> is honored only in the initrd |
| 70 |
while <varname>veritytab=</varname> is honored by both the main system and in the initrd.</para> |
| 71 |
|
| 72 |
<xi:include href="version-info.xml" xpointer="v248"/></listitem> |
| 73 |
</varlistentry> |
| 74 |
|
| 75 |
<varlistentry> |
| 76 |
<term><varname>roothash=</varname></term> |
| 77 |
|
| 78 |
<listitem><para>Takes a root hash value for the root file system. Expects a hash value formatted in hexadecimal |
| 79 |
characters of the appropriate length (i.e. most likely 256 bit/64 characters, or longer). If not specified via |
| 80 |
<varname>systemd.verity_root_data=</varname> and <varname>systemd.verity_root_hash=</varname>, the hash and |
| 81 |
data devices to use are automatically derived from the specified hash value. Specifically, the data partition |
| 82 |
device is looked for under a GPT partition UUID derived from the first 128-bit of the root hash, the hash |
| 83 |
partition device is looked for under a GPT partition UUID derived from the last 128-bit of the root hash. Hence |
| 84 |
it is usually sufficient to specify the root hash to boot from a verity protected root file system, as |
| 85 |
device paths are automatically determined from it — as long as the partition table is properly set up.</para> |
| 86 |
|
| 87 |
<xi:include href="version-info.xml" xpointer="v233"/> |
| 88 |
</listitem> |
| 89 |
</varlistentry> |
| 90 |
|
| 91 |
<varlistentry> |
| 92 |
<term><varname>systemd.verity_root_data=</varname></term> |
| 93 |
<term><varname>systemd.verity_root_hash=</varname></term> |
| 94 |
|
| 95 |
<listitem><para>These two settings take block device paths as arguments and may be used to explicitly |
| 96 |
configure the data partition and hash partition to use for setting up the verity protection for the root file |
| 97 |
system. If not specified, these paths are automatically derived from the <varname>roothash=</varname> argument |
| 98 |
(see above).</para> |
| 99 |
|
| 100 |
<xi:include href="version-info.xml" xpointer="v233"/></listitem> |
| 101 |
</varlistentry> |
| 102 |
|
| 103 |
<varlistentry> |
| 104 |
<term><varname>systemd.verity_root_options=</varname></term> |
| 105 |
|
| 106 |
<listitem><para>Takes a comma-separated list of dm-verity options. Expects the following options |
| 107 |
<option>superblock=<replaceable>BOOLEAN</replaceable></option>, |
| 108 |
<option>format=<replaceable>NUMBER</replaceable></option>, |
| 109 |
<option>data-block-size=<replaceable>BYTES</replaceable></option>, |
| 110 |
<option>hash-block-size=<replaceable>BYTES</replaceable></option>, |
| 111 |
<option>data-blocks=<replaceable>BLOCKS</replaceable></option>, |
| 112 |
<option>hash-offset=<replaceable>BYTES</replaceable></option>, |
| 113 |
<option>salt=<replaceable>HEX</replaceable></option>, <option>uuid=<replaceable>UUID</replaceable></option>, |
| 114 |
<option>ignore-corruption</option>, <option>restart-on-corruption</option>, <option>ignore-zero-blocks</option>, |
| 115 |
<option>check-at-most-once</option>, <option>panic-on-corruption</option>, |
| 116 |
<option>hash=<replaceable>HASH</replaceable></option>, <option>fec-device=<replaceable>PATH</replaceable></option>, |
| 117 |
<option>fec-offset=<replaceable>BYTES</replaceable></option>, <option>fec-roots=<replaceable>NUM</replaceable></option> and |
| 118 |
<option>root-hash-signature=<replaceable>PATH</replaceable>|base64:<replaceable>HEX</replaceable></option>. See |
| 119 |
<citerefentry project='man-pages'><refentrytitle>veritysetup</refentrytitle><manvolnum>8</manvolnum></citerefentry> for more |
| 120 |
details.</para> |
| 121 |
|
| 122 |
<xi:include href="version-info.xml" xpointer="v248"/></listitem> |
| 123 |
</varlistentry> |
| 124 |
|
| 125 |
<varlistentry> |
| 126 |
<term><varname>usrhash=</varname></term> |
| 127 |
<term><varname>systemd.verity_usr_data=</varname></term> |
| 128 |
<term><varname>systemd.verity_usr_hash=</varname></term> |
| 129 |
<term><varname>systemd.verity_usr_options=</varname></term> |
| 130 |
|
| 131 |
<listitem><para>Equivalent to their counterparts for the root file system as described above, but |
| 132 |
apply to the <filename>/usr/</filename> file system instead.</para> |
| 133 |
|
| 134 |
<xi:include href="version-info.xml" xpointer="v250"/></listitem> |
| 135 |
</varlistentry> |
| 136 |
</variablelist> |
| 137 |
</refsect1> |
| 138 |
|
| 139 |
<refsect1> |
| 140 |
<title>See Also</title> |
| 141 |
<para><simplelist type="inline"> |
| 142 |
<member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 143 |
<member><citerefentry><refentrytitle>[email protected]</refentrytitle><manvolnum>8</manvolnum></citerefentry></member> |
| 144 |
<member><citerefentry project='man-pages'><refentrytitle>veritysetup</refentrytitle><manvolnum>8</manvolnum></citerefentry></member> |
| 145 |
<member><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry></member> |
| 146 |
</simplelist></para> |
| 147 |
</refsect1> |
| 148 |
|
| 149 |
</refentry> |