summaryrefslogtreecommitdiff
path: root/man/systemd-veritysetup-generator.xml
blob: bf5e705f830e0c5b66c8a7ab0d52654ecddf0f40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?xml version="1.0"?>
<!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
<refentry id="systemd-veritysetup-generator" conditional='HAVE_LIBCRYPTSETUP'>

  <refentryinfo>
    <title>systemd-veritysetup-generator</title>
    <productname>systemd</productname>
  </refentryinfo>

  <refmeta>
    <refentrytitle>systemd-veritysetup-generator</refentrytitle>
    <manvolnum>8</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>systemd-veritysetup-generator</refname>
    <refpurpose>Unit generator for integrity protected block devices</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <para><filename>/usr/lib/systemd/system-generators/systemd-veritysetup-generator</filename></para>
  </refsynopsisdiv>

  <refsect1>
    <title>Description</title>

    <para><filename>systemd-veritysetup-generator</filename> is a generator that translates kernel command line options
    configuring integrity-protected block devices (verity) into native systemd units early at boot and when
    configuration of the system manager is reloaded. This will create
    <citerefentry><refentrytitle>systemd-veritysetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
    units as necessary.</para>

    <para>Currently, only a single verity device may be set up with this generator, backing the root file system of the
    OS.</para>

    <para><filename>systemd-veritysetup-generator</filename> implements
    <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
  </refsect1>

  <refsect1>
    <title>Kernel Command Line</title>

    <para><filename>systemd-veritysetup-generator</filename>
    understands the following kernel command line parameters:</para>

    <variablelist class='kernel-commandline-options'>
      <varlistentry>
        <term><varname>systemd.verity=</varname></term>
        <term><varname>rd.systemd.verity=</varname></term>

        <listitem><para>Takes a boolean argument. Defaults to <literal>yes</literal>. If <literal>no</literal>,
        disables the generator entirely. <varname>rd.systemd.verity=</varname> is honored only by the initial RAM disk
        (initrd) while <varname>systemd.verity=</varname> is honored by both the host system and the
        initrd.</para></listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>roothash=</varname></term>

        <listitem><para>Takes a root hash value for the root file system. Expects a hash value formatted in hexadecimal
        characters of the appropriate length (i.e. most likely 256 bit/64 characters, or longer). If not specified via
        <varname>systemd.verity_root_data=</varname> and <varname>systemd.verity_root_hash=</varname>, the hash and
        data devices to use are automatically derived from the specified hash value. Specifically, the data partition
        device is looked for under a GPT partition UUID derived from the first 128bit of the root hash, the hash
        partition device is looked for under a GPT partition UUID derived from the last 128bit of the root hash. Hence
        it is usually sufficient to specify the root hash to boot from an integrity protected root file system, as
        device paths are automatically determined from it — as long as the partition table is properly set up.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>systemd.verity_root_data=</varname></term>
        <term><varname>systemd.verity_root_hash=</varname></term>

        <listitem><para>These two settings take block device paths as arguments and may be used to explicitly
        configure the data partition and hash partition to use for setting up the integrity protection for the root file
        system. If not specified, these paths are automatically derived from the <varname>roothash=</varname> argument
        (see above).</para></listitem>
      </varlistentry>

      <varlistentry>
        <term><varname>systemd.verity_root_options=</varname></term>

        <listitem><para>Takes a comma-separated list of dm-verity options. Expects the following options
        <option>ignore-corruption</option>, <option>restart-on-corruption</option>, <option>ignore-zero-blocks</option>,
        <option>check-at-most-once</option>, <option>panic-on-corruption</option> and
        <option>root-hash-signature</option>. See
        <citerefentry project='die-net'><refentrytitle>veritysetup</refentrytitle><manvolnum>8</manvolnum></citerefentry> for more
        details.</para></listitem>
      </varlistentry>

    </variablelist>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
      <citerefentry><refentrytitle>systemd-veritysetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
      <citerefentry project='die-net'><refentrytitle>veritysetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
      <citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
    </para>
  </refsect1>

</refentry>