summaryrefslogtreecommitdiff
path: root/man/systemd.special.xml
diff options
context:
space:
mode:
authorJonathan Lebon <jonathan@jlebon.com>2020-10-20 16:30:20 -0400
committerLennart Poettering <lennart@poettering.net>2020-10-21 22:08:19 +0200
commit6c5496c492a8d74e54d22bf8824160cab1e63c10 (patch)
tree5dd28fa028c3d690e41449870037a24bac6a7152 /man/systemd.special.xml
parent69f30d4321c3bc8fa27270e3fd36a7a5b4d0a89e (diff)
downloadsystemd-6c5496c492a8d74e54d22bf8824160cab1e63c10.tar.gz
units: add initrd-cryptsetup.target
For encrypted block devices that we need to unlock from the initramfs, we currently rely on dracut shipping `cryptsetup.target`. This works, but doesn't cover the case where the encrypted block device requires networking (i.e. the `remote-cryptsetup.target` version). That target however is traditionally dynamically enabled. Instead, let's rework things here by adding a `initrd-cryptsetup.target` specifically for initramfs encrypted block device setup. This plays the role of both `cryptsetup.target` and `remote-cryptsetup.target` in the initramfs. Then, adapt `systemd-cryptsetup-generator` to hook all generated services to this new unit when running from the initrd. This is analogous to `systemd-fstab-generator` hooking all mounts to `initrd-fs.target`, regardless of whether they're network-backed or not.
Diffstat (limited to 'man/systemd.special.xml')
-rw-r--r--man/systemd.special.xml21
1 files changed, 17 insertions, 4 deletions
diff --git a/man/systemd.special.xml b/man/systemd.special.xml
index 1434ead7d5..fe40da7fbe 100644
--- a/man/systemd.special.xml
+++ b/man/systemd.special.xml
@@ -41,6 +41,7 @@
<filename>hybrid-sleep.target</filename>,
<filename>suspend-then-hibernate.target</filename>,
<filename>initrd.target</filename>,
+ <filename>initrd-cryptsetup.target</filename>,
<filename>initrd-fs.target</filename>,
<filename>initrd-root-device.target</filename>,
<filename>initrd-root-fs.target</filename>,
@@ -182,8 +183,10 @@
<varlistentry>
<term><filename>cryptsetup.target</filename></term>
<listitem>
- <para>A target that pulls in setup services for all
- encrypted block devices.</para>
+ <para>A target that pulls in setup services for local encrypted block devices.
+ See <filename>remote-cryptsetup.target</filename> below for the equivalent target for remote
+ volumes, and <filename>initrd-cryptsetup.target</filename> below for the equivalent target in the
+ initrd.</para>
</listitem>
</varlistentry>
<varlistentry>
@@ -352,13 +355,21 @@
<varlistentry>
<term><filename>initrd.target</filename></term>
<listitem>
- <para>This is the default target in the initramfs, similar to <filename>default.target</filename>
+ <para>This is the default target in the initrd, similar to <filename>default.target</filename>
in the main system. It is used to mount the real root and transition to it. See
<citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry> for
more discussion.</para>
</listitem>
</varlistentry>
<varlistentry>
+ <term><filename>initrd-cryptsetup.target</filename></term>
+ <listitem>
+ <para>A target that pulls in setup services for all encrypted block devices. See
+ <filename>cryptsetup.target</filename> and <filename>remote-cryptsetup.target</filename> for the
+ equivalent targets in the real root.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term><filename>initrd-fs.target</filename></term>
<listitem>
<para><citerefentry><refentrytitle>systemd-fstab-generator</refentrytitle><manvolnum>3</manvolnum></citerefentry>
@@ -549,7 +560,9 @@
<para>Similar to <filename>cryptsetup.target</filename>, but for encrypted
devices which are accessed over the network. It is used for
<citerefentry><refentrytitle>crypttab</refentrytitle><manvolnum>8</manvolnum></citerefentry>
- entries marked with <option>_netdev</option>.</para>
+ entries marked with <option>_netdev</option>.
+ See <filename>cryptsetup.target</filename> for the equivalent target for local volumes, and
+ <filename>initrd-cryptsetup.target</filename> for the equivalent target in the initrd.</para>
</listitem>
</varlistentry>
<varlistentry>