1CRYPTTAB(5)                        crypttab                        CRYPTTAB(5)
2
3
4

NAME

6       crypttab - Configuration for encrypted block devices
7

SYNOPSIS

9       /etc/crypttab
10

DESCRIPTION

12       The /etc/crypttab file describes encrypted block devices that are set
13       up during system boot.
14
15       Empty lines and lines starting with the "#" character are ignored. Each
16       of the remaining lines describes one encrypted block device, fields on
17       the line are delimited by white space. The first two fields are
18       mandatory, the remaining two are optional.
19
20       Setting up encrypted block devices using this file supports three
21       encryption modes: LUKS, TrueCrypt and plain. See cryptsetup(8) for more
22       information about each mode. When no mode is specified in the options
23       field and the block device contains a LUKS signature, it is opened as a
24       LUKS device; otherwise, it is assumed to be in raw dm-crypt (plain
25       mode) format.
26
27       The first field contains the name of the resulting encrypted block
28       device; the device is set up within /dev/mapper/.
29
30       The second field contains a path to the underlying block device or
31       file, or a specification of a block device via "UUID=" followed by the
32       UUID.
33
34       The third field specifies the encryption password. If the field is not
35       present or the password is set to "none" or "-", the password has to be
36       manually entered during system boot. Otherwise, the field is
37       interpreted as a absolute path to a file containing the encryption
38       password. For swap encryption, /dev/urandom or the hardware device
39       /dev/hw_random can be used as the password file; using /dev/random may
40       prevent boot completion if the system does not have enough entropy to
41       generate a truly random encryption key.
42
43       The fourth field, if present, is a comma-delimited list of options. The
44       following options are recognized:
45
46       discard
47           Allow discard requests to be passed through the encrypted block
48           device. This improves performance on SSD storage but has security
49           implications.
50
51       cipher=
52           Specifies the cipher to use. See cryptsetup(8) for possible values
53           and the default value of this option. A cipher with unpredictable
54           IV values, such as "aes-cbc-essiv:sha256", is recommended.
55
56       hash=
57           Specifies the hash to use for password hashing. See cryptsetup(8)
58           for possible values and the default value of this option.
59
60       header=
61           Use a detached (separated) metadata device or file where the LUKS
62           header is stored. This option is only relevant for LUKS devices.
63           See cryptsetup(8) for possible values and the default value of this
64           option.
65
66       keyfile-offset=
67           Specifies the number of bytes to skip at the start of the key file.
68           See cryptsetup(8) for possible values and the default value of this
69           option.
70
71       keyfile-size=
72           Specifies the maximum number of bytes to read from the key file.
73           See cryptsetup(8) for possible values and the default value of this
74           option. This option is ignored in plain encryption mode, as the key
75           file size is then given by the key size.
76
77       key-slot=
78           Specifies the key slot to compare the passphrase or key against. If
79           the key slot does not match the given passphrase or key, but
80           another would, the setup of the device will fail regardless. This
81           option implies luks. See cryptsetup(8) for possible values. The
82           default is to try all key slots in sequential order.
83
84       luks
85           Force LUKS mode. When this mode is used, the following options are
86           ignored since they are provided by the LUKS header on the device:
87           cipher=, hash=, size=.
88
89       _netdev
90           Marks this cryptsetup device as requiring network. It will be
91           started after the network is available, similarly to
92           systemd.mount(5) units marked with _netdev. The service unit to set
93           up this device will be ordered between remote-fs-pre.target and
94           remote-cryptsetup.target, instead of cryptsetup-pre.target and
95           cryptsetup.target.
96
97           Hint: if this device is used for a mount point that is specified in
98           fstab(5), the _netdev option should also be used for the mount
99           point. Otherwise, a dependency loop might be created where the
100           mount point will be pulled in by local-fs.target, while the service
101           to configure the network is usually only started after the local
102           file system has been mounted.
103
104       noauto
105           This device will not be automatically unlocked on boot.
106
107       nofail
108           The system will not wait for the device to show up and be unlocked
109           at boot, and not fail the boot if it does not show up.
110
111       plain
112           Force plain encryption mode.
113
114       read-only, readonly
115           Set up the encrypted block device in read-only mode.
116
117       size=
118           Specifies the key size in bits. See cryptsetup(8) for possible
119           values and the default value of this option.
120
121       swap
122           The encrypted block device will be used as a swap device, and will
123           be formatted accordingly after setting up the encrypted block
124           device, with mkswap(8). This option implies plain.
125
126           WARNING: Using the swap option will destroy the contents of the
127           named partition during every boot, so make sure the underlying
128           block device is specified correctly.
129
130       tcrypt
131           Use TrueCrypt encryption mode. When this mode is used, the
132           following options are ignored since they are provided by the
133           TrueCrypt header on the device or do not apply: cipher=, hash=,
134           keyfile-offset=, keyfile-size=, size=.
135
136           When this mode is used, the passphrase is read from the key file
137           given in the third field. Only the first line of this file is read,
138           excluding the new line character.
139
140           Note that the TrueCrypt format uses both passphrase and key files
141           to derive a password for the volume. Therefore, the passphrase and
142           all key files need to be provided. Use tcrypt-keyfile= to provide
143           the absolute path to all key files. When using an empty passphrase
144           in combination with one or more key files, use "/dev/null" as the
145           password file in the third field.
146
147       tcrypt-hidden
148           Use the hidden TrueCrypt volume. This option implies tcrypt.
149
150           This will map the hidden volume that is inside of the volume
151           provided in the second field. Please note that there is no
152           protection for the hidden volume if the outer volume is mounted
153           instead. See cryptsetup(8) for more information on this limitation.
154
155       tcrypt-keyfile=
156           Specifies the absolute path to a key file to use for a TrueCrypt
157           volume. This implies tcrypt and can be used more than once to
158           provide several key files.
159
160           See the entry for tcrypt on the behavior of the passphrase and key
161           files when using TrueCrypt encryption mode.
162
163       tcrypt-system
164           Use TrueCrypt in system encryption mode. This option implies
165           tcrypt.
166
167       timeout=
168           Specifies the timeout for querying for a password. If no unit is
169           specified, seconds is used. Supported units are s, ms, us, min, h,
170           d. A timeout of 0 waits indefinitely (which is the default).
171
172       x-systemd.device-timeout=
173           Specifies how long systemd should wait for a device to show up
174           before giving up on the entry. The argument is a time in seconds or
175           explicitly specified units of "s", "min", "h", "ms".
176
177       tmp
178           The encrypted block device will be prepared for using it as /tmp;
179           it will be formatted using mke2fs(8). This option implies plain.
180
181           WARNING: Using the tmp option will destroy the contents of the
182           named partition during every boot, so make sure the underlying
183           block device is specified correctly.
184
185       tries=
186           Specifies the maximum number of times the user is queried for a
187           password. The default is 3. If set to 0, the user is queried for a
188           password indefinitely.
189
190       verify
191           If the encryption password is read from console, it has to be
192           entered twice to prevent typos.
193
194       At early boot and when the system manager configuration is reloaded,
195       this file is translated into native systemd units by systemd-
196       cryptsetup-generator(8).
197

EXAMPLE

199       Example 1. /etc/crypttab example
200
201       Set up four encrypted block devices. One using LUKS for normal storage,
202       another one for usage as a swap device and two TrueCrypt volumes.
203
204           luks       UUID=2505567a-9e27-4efe-a4d5-15ad146c258b
205           swap       /dev/sda7       /dev/urandom       swap
206           truecrypt  /dev/sda2       /etc/container_password  tcrypt
207           hidden     /mnt/tc_hidden  /dev/null    tcrypt-hidden,tcrypt-keyfile=/etc/keyfile
208

SEE ALSO

210       systemd(1), systemd-cryptsetup@.service(8), systemd-cryptsetup-
211       generator(8), fstab(5), cryptsetup(8), mkswap(8), mke2fs(8)
212
213
214
215systemd 219                                                        CRYPTTAB(5)
Impressum