]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - man/crypttab.xml
travis: use UBSan checks from OSS-Fuzz
[thirdparty/systemd.git] / man / crypttab.xml
index 1de834a045847a9bfa8d090a64d126f3ed3b77d5..5eb1c12232c784a554362e3908a27f3bed7fdbe4 100644 (file)
@@ -1,50 +1,20 @@
 <?xml version="1.0"?>
 <!--*-nxml-*-->
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 <!--
-  This file is part of systemd.
-
-  Copyright 2012 Lennart Poettering
-
-  systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published by
-  the Free Software Foundation; either version 2.1 of the License, or
-  (at your option) any later version.
-
-  systemd is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  SPDX-License-Identifier: LGPL-2.1+
 
   This is based on crypttab(5) from Fedora's initscripts package, which in
   turn is based on Debian's version.
 
   The Red Hat version has been written by Miloslav Trmac <mitr@redhat.com>.
-
 -->
 <refentry id="crypttab" conditional='HAVE_LIBCRYPTSETUP'>
 
   <refentryinfo>
     <title>crypttab</title>
     <productname>systemd</productname>
-
-    <authorgroup>
-      <author>
-        <contrib>Documentation</contrib>
-        <firstname>Miloslav</firstname>
-        <surname>Trmac</surname>
-        <email>mitr@redhat.com</email>
-      </author>
-      <author>
-        <contrib>Documentation</contrib>
-        <firstname>Lennart</firstname>
-        <surname>Poettering</surname>
-        <email>lennart@poettering.net</email>
-      </author>
-    </authorgroup>
   </refentryinfo>
 
   <refmeta>
 
     <para>Empty lines and lines starting with the <literal>#</literal>
     character are ignored. Each of the remaining lines describes one
-    encrypted block device, fields on the line are delimited by white
-    space. The first two fields are mandatory, the remaining two are
+    encrypted block device. Fields are delimited by white space.</para>
+
+    <para>Each line is in the form<programlisting><replaceable>name</replaceable> <replaceable>encrypted-device</replaceable> <replaceable>password</replaceable> <replaceable>options</replaceable></programlisting>
+    The first two fields are mandatory, the remaining two are
     optional.</para>
 
     <para>Setting up encrypted block devices using this file supports
@@ -93,7 +65,7 @@
     field is not present or the password is set to
     <literal>none</literal> or <literal>-</literal>, the password has
     to be manually entered during system boot. Otherwise, the field is
-    interpreted as a absolute path to a file containing the encryption
+    interpreted as an absolute path to a file containing the encryption
     password. For swap encryption, <filename>/dev/urandom</filename>
     or the hardware device <filename>/dev/hw_random</filename> can be
     used as the password file; using <filename>/dev/random</filename>
 
     <variablelist class='fstab-options'>
 
-      <varlistentry>
-        <term><option>discard</option></term>
-
-        <listitem><para>Allow discard requests to be passed through
-        the encrypted block device. This improves performance on SSD
-        storage but has security implications.</para></listitem>
-      </varlistentry>
-
       <varlistentry>
         <term><option>cipher=</option></term>
 
         recommended.</para></listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><option>discard</option></term>
+
+        <listitem><para>Allow discard requests to be passed through the encrypted block
+        device. This improves performance on SSD storage but has security implications.
+        </para></listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><option>hash=</option></term>
 
         option.</para></listitem>
       </varlistentry>
 
-      <varlistentry>
-        <term><option>offset=</option></term>
-
-        <listitem><para>Start offset in the backend device, in 512-byte sectors.
-        This option is only relevant for plain devices.
-        </para></listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>skip=</option></term>
-
-        <listitem><para>How many 512-byte sectors of the encrypted data to skip
-        at the beginning. This is different from the <option>--offset</option>
-        option with respect to the sector numbers used in initialization vector
-        (IV) calculation. Using <option>--offset</option> will shift the IV
-        calculation by the same negative amount.  Hence, if <option>--offset n</option> is given,
-        sector n will  get a sector number of 0 for the IV calculation.
-        Using <option>--skip</option> causes sector n to also be the first
-        sector of the mapped device, but with its number for IV generation being n.</para>
-
-        <para>This option is only relevant for plain devices.</para>
-        </listitem>
-      </varlistentry>
-
       <varlistentry>
         <term><option>keyfile-offset=</option></term>
 
         <option>size=</option>.</para></listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><option>_netdev</option></term>
+
+        <listitem><para>Marks this cryptsetup device as requiring network. It will be
+        started after the network is available, similarly to
+        <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+        units marked with <option>_netdev</option>. The service unit to set up this device
+        will be ordered between <filename>remote-fs-pre.target</filename> and
+        <filename>remote-cryptsetup.target</filename>, instead of
+        <filename>cryptsetup-pre.target</filename> and
+        <filename>cryptsetup.target</filename>.</para>
+
+        <para>Hint: if this device is used for a mount point that is specified in
+        <citerefentry project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+        the <option>_netdev</option> option should also be used for the mount
+        point. Otherwise, a dependency loop might be created where the mount point
+        will be pulled in by <filename>local-fs.target</filename>, while the
+        service to configure the network is usually only started <emphasis>after</emphasis>
+        the local file system has been mounted.</para>
+        </listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><option>noauto</option></term>
 
-        <listitem><para>This device will not be automatically unlocked
-        on boot.</para></listitem>
+        <listitem><para>This device will not be added to <filename>cryptsetup.target</filename>.
+        This means that it will not be automatically unlocked on boot, unless something else pulls
+        it in. In particular, if the device is used for a mount point, it'll be unlocked
+        automatically during boot, unless the mount point itself is also disabled with
+        <option>noauto</option>.</para></listitem>
       </varlistentry>
 
       <varlistentry>
         <term><option>nofail</option></term>
 
-        <listitem><para>The system will not wait for the device to
-        show up and be unlocked at boot, and not fail the boot if it
-        does not show up.</para></listitem>
+        <listitem><para>This device will not be a hard dependency of
+        <filename>cryptsetup.target</filename>. It'll be still pulled in and started, but the system
+        will not wait for the device to show up and be unlocked, and boot will not fail if this is
+        unsuccessful. Note that other units that depend on the unlocked device may still fail. In
+        particular, if the device is used for a mount point, the mount point itself is also needs to
+        have <option>noauto</option> option, or the boot will fail if the device is not unlocked
+        successfully.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>offset=</option></term>
+
+        <listitem><para>Start offset in the backend device, in 512-byte sectors. This
+        option is only relevant for plain devices.</para></listitem>
       </varlistentry>
 
       <varlistentry>
         mode.</para></listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><option>same-cpu-crypt</option></term>
+
+        <listitem><para>Perform encryption using the same cpu that IO was submitted on. The default is to use
+        an unbound workqueue so that encryption work is automatically balanced between available CPUs.</para>
+        <para>This requires kernel 4.0 or newer.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>submit-from-crypt-cpus</option></term>
+
+        <listitem><para>Disable offloading writes to a separate thread after encryption. There are some
+        situations where offloading write bios from the encryption threads to a single thread degrades
+        performance significantly. The default is to offload write bios to the same thread because it benefits
+        CFQ to have writes submitted using the same context.</para>
+        <para>This requires kernel 4.0 or newer.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>skip=</option></term>
+
+        <listitem><para>How many 512-byte sectors of the encrypted data to skip at the
+        beginning. This is different from the <option>offset=</option> option with respect
+        to the sector numbers used in initialization vector (IV) calculation. Using
+        <option>offset=</option> will shift the IV calculation by the same negative
+        amount. Hence, if <option>offset=<replaceable>n</replaceable></option> is given,
+        sector <replaceable>n</replaceable> will get a sector number of 0 for the IV
+        calculation. Using <option>skip=</option> causes sector
+        <replaceable>n</replaceable> to also be the first sector of the mapped device, but
+        with its number for IV generation being <replaceable>n</replaceable>.</para>
+
+        <para>This option is only relevant for plain devices.</para>
+        </listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><option>size=</option></term>
 
         option.</para></listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><option>sector-size=</option></term>
+
+        <listitem><para>Specifies the sector size in bytes. See
+        <citerefentry project='die-net'><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+        for possible values and the default value of this
+        option.</para></listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><option>swap</option></term>
 
         option implies <option>tcrypt</option>.</para></listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><option>tcrypt-veracrypt</option></term>
+
+        <listitem><para>Check for a VeraCrypt volume.  VeraCrypt is a fork of
+        TrueCrypt that is mostly compatible, but uses different, stronger key
+        derivation algorithms that cannot be detected without this flag.
+        Enabling this option could substantially slow down unlocking, because
+        VeraCrypt's key derivation takes much longer than TrueCrypt's.  This
+        option implies <option>tcrypt</option>.</para></listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><option>timeout=</option></term>
 
         indefinitely (which is the default).</para></listitem>
       </varlistentry>
 
-      <varlistentry>
-        <term><option>x-systemd.device-timeout=</option></term>
-
-        <listitem><para>Specifies how long systemd should wait for a
-        device to show up before giving up on the entry. The argument
-        is a time in seconds or explicitly specified units of
-        <literal>s</literal>,
-        <literal>min</literal>,
-        <literal>h</literal>,
-        <literal>ms</literal>.
-        </para></listitem>
-      </varlistentry>
-
       <varlistentry>
         <term><option>tmp</option></term>
 
         typos.</para></listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><option>x-systemd.device-timeout=</option></term>
+
+        <listitem><para>Specifies how long systemd should wait for a device to show up
+        before giving up on the entry. The argument is a time in seconds or explicitly
+        specified units of
+        <literal>s</literal>,
+        <literal>min</literal>,
+        <literal>h</literal>,
+        <literal>ms</literal>.
+        </para></listitem>
+      </varlistentry>
+
     </variablelist>
 
     <para>At early boot and when the system manager configuration is
@@ -407,6 +448,7 @@ hidden     /mnt/tc_hidden  /dev/null    tcrypt-hidden,tcrypt-keyfile=/etc/keyfil
       <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>systemd-cryptsetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
       <citerefentry project='die-net'><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry project='man-pages'><refentrytitle>mkswap</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry project='man-pages'><refentrytitle>mke2fs</refentrytitle><manvolnum>8</manvolnum></citerefentry>