Debian Codegraph @

upstream/debian-unstable/man5/veritytab.5

raw
1 '\" t
2 .TH "VERITYTAB" "5" "" "systemd 261~rc3" "veritytab"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 veritytab \- Configuration for verity block devices
24 .SH "SYNOPSIS"
25 .PP
26 /etc/veritytab
27 .SH "DESCRIPTION"
28 .PP
29 The
30 /etc/veritytab
31 file describes verity protected block devices that are set up during system boot\&.
32 .PP
33 Empty lines and lines starting with the
34 "#"
35 character are ignored\&. Each of the remaining lines describes one verity protected block device\&. Fields are delimited by white space\&.
36 .PP
37 Each line is in the form
38 .sp
39 .if n \{\
40 .RS 4
41 .\}
42 .nf
43 \fIvolume\-name\fR \fIdata\-device\fR \fIhash\-device\fR \fIroothash\fR [\fIoptions\fR]
44 .fi
45 .if n \{\
46 .RE
47 .\}
48 .sp
49 The first four fields are mandatory, the remaining one is optional\&.
50 .PP
51 The first field contains the name of the resulting verity volume; its block device is set up below
52 /dev/mapper/\&.
53 .PP
54 The second field contains a path to the underlying block data device, or a specification of a block device via
55 \fIUUID=\fR
56 followed by the
57 \fIUUID\fR\&.
58 .PP
59 The third field contains a path to the underlying block hash device, or a specification of a block device via
60 \fIUUID=\fR
61 followed by the
62 \fIUUID\fR\&.
63 .PP
64 The fourth field is the
65 \fIroothash\fR
66 in hexadecimal\&. If this field is specified as dash, it is attempted to read the root hash from the udev property
67 "ID_DISSECT_PART_ROOTHASH="
68 (encoded in hexadecimal) of the data device\&.
69 .PP
70 The fifth field, if present, is a comma\-delimited list of options\&. The following options are recognized:
71 .PP
72 \fBsuperblock=\fR\fB\fIBOOL\fR\fR
73 .RS 4
74 Use dm\-verity with or without permanent on\-disk superblock\&.
75 .sp
76 Added in version 254\&.
77 .RE
78 .PP
79 \fBformat=\fR\fB\fINUMBER\fR\fR
80 .RS 4
81 Specifies the hash version type\&. Format type
82 "0"
83 is original Chrome OS version\&. Format type
84 "1"
85 is modern version\&.
86 .sp
87 Added in version 254\&.
88 .RE
89 .PP
90 \fBdata\-block\-size=\fR\fB\fIBYTES\fR\fR
91 .RS 4
92 Used block size for the data device\&. (Note kernel supports only page\-size as maximum here; Multiples of 512 bytes\&.)
93 .sp
94 Added in version 254\&.
95 .RE
96 .PP
97 \fBhash\-block\-size=\fR\fB\fIBYTES\fR\fR
98 .RS 4
99 Used block size for the hash device\&. (Note kernel supports only page\-size as maximum here; Multiples of 512 bytes\&.)
100 .sp
101 Added in version 254\&.
102 .RE
103 .PP
104 \fBdata\-blocks=\fR\fB\fIBLOCKS\fR\fR
105 .RS 4
106 Number of blocks of data device used in verification\&. If not specified, the whole device is used\&.
107 .sp
108 Added in version 254\&.
109 .RE
110 .PP
111 \fBhash\-offset=\fR\fB\fIBYTES\fR\fR
112 .RS 4
113 Offset of hash area/superblock on
114 "hash\-device"\&. (Multiples of 512 bytes\&.)
115 .sp
116 Added in version 254\&.
117 .RE
118 .PP
119 \fBsalt=\fR\fB\fIHEX\fR\fR
120 .RS 4
121 Salt used for format or verification\&. Format is a hexadecimal string; 256 bytes long maximum;
122 "\-"
123 is the special value for empty\&.
124 .sp
125 Added in version 254\&.
126 .RE
127 .PP
128 \fBuuid=\fR\fB\fIUUID\fR\fR
129 .RS 4
130 Use the provided
131 \fIUUID\fR
132 instead of generating new one\&. The
133 \fIUUID\fR
134 must be provided in standard
135 UUID
136 format, e\&.g\&.
137 "12345678\-1234\-1234\-1234\-123456789abc"\&.
138 .sp
139 Added in version 254\&.
140 .RE
141 .PP
142 \fBignore\-corruption\fR, \fBrestart\-on\-corruption\fR, \fBpanic\-on\-corruption\fR
143 .RS 4
144 Defines what to do if a data verity problem is detected (data corruption)\&. Without these options kernel fails the
145 IO
146 operation with
147 I/O
148 error\&. With
149 \fB\-\-ignore\-corruption\fR
150 option the corruption is only logged\&. With
151 \fB\-\-restart\-on\-corruption\fR
152 or
153 \fB\-\-panic\-on\-corruption\fR
154 the kernel is restarted (panicked) immediately\&. (You have to provide way how to avoid restart loops\&.)
155 .sp
156 Added in version 248\&.
157 .RE
158 .PP
159 \fBignore\-zero\-blocks\fR
160 .RS 4
161 Instruct kernel to not verify blocks that are expected to contain zeroes and always directly return zeroes instead\&.
162 .if n \{\
163 .sp
164 .\}
165 .RS 4
166 .it 1 an-trap
167 .nr an-no-space-flag 1
168 .nr an-break-flag 1
169 .br
170 .ps +1
171 \fBWarning\fR
172 .ps -1
173 .br
174 Use this option only in very specific cases\&. This option is available since Linux kernel version 4\&.5\&.
175 .sp .5v
176 .RE
177 Added in version 248\&.
178 .RE
179 .PP
180 \fBcheck\-at\-most\-once\fR
181 .RS 4
182 Instruct kernel to verify blocks only the first time they are read from the data device, rather than every time\&.
183 .if n \{\
184 .sp
185 .\}
186 .RS 4
187 .it 1 an-trap
188 .nr an-no-space-flag 1
189 .nr an-break-flag 1
190 .br
191 .ps +1
192 \fBWarning\fR
193 .ps -1
194 .br
195 It provides a reduced level of security because only offline tampering of the data device\*(Aqs content will be detected, not online tampering\&. This option is available since Linux kernel version 4\&.17\&.
196 .sp .5v
197 .RE
198 Added in version 248\&.
199 .RE
200 .PP
201 \fBhash=\fR\fB\fIHASH\fR\fR
202 .RS 4
203 Hash algorithm for dm\-verity\&. This should be the name of the algorithm, like "sha1"\&. For default see
204 \fBveritysetup \-\-help\fR\&.
205 .sp
206 Added in version 254\&.
207 .RE
208 .PP
209 \fBfec\-device=\fR\fB\fIPATH\fR\fR
210 .RS 4
211 Use forward error correction (FEC) to recover from corruption if hash verification fails\&. Use encoding data from the specified device\&. The fec device argument can be block device or file image\&. If fec device path does not exist, it will be created as file\&. Note: block sizes for data and hash devices must match\&. Also, if the verity data_device is encrypted the fec_device should be too\&.
212 .sp
213 Added in version 254\&.
214 .RE
215 .PP
216 \fBfec\-offset=\fR\fB\fIBYTES\fR\fR
217 .RS 4
218 This is the offset, in bytes, from the start of the
219 FEC
220 device to the beginning of the encoding data\&. (Aligned on 512 bytes\&.)
221 .sp
222 Added in version 254\&.
223 .RE
224 .PP
225 \fBfec\-roots=\fR\fB\fINUM\fR\fR
226 .RS 4
227 Number of generator roots\&. This equals to the number of parity bytes in the encoding data\&. In RS(M, N) encoding, the number of roots is M\-N\&. M is 255 and M\-N is between 2 and 24 (including)\&.
228 .sp
229 Added in version 254\&.
230 .RE
231 .PP
232 \fBroot\-hash\-signature=\fR\fB\fIPATH\fR\fR\fB|base64:\fR\fB\fIBASE64\fR\fR\fB|auto\fR
233 .RS 4
234 A Base64 string encoding the root hash signature prefixed by
235 "base64:", or an absolute path to a root hash signature file used to verify the root hash (in kernel)\&. If the special string
236 "auto"
237 is specified, the root hash signature is attempted to be read from the udev property
238 "ID_DISSECT_PART_ROOTHASH_SIG="
239 (in Base64 format) of the data device\&. This feature requires Linux kernel version 5\&.4 or more recent\&.
240 .sp
241 Added in version 248\&.
242 .RE
243 .PP
244 \fB_netdev\fR
245 .RS 4
246 Marks this veritysetup device as requiring network\&. It will be started after the network is available, similarly to
247 \fBsystemd.mount\fR(5)
248 units marked with
249 \fB_netdev\fR\&. The service unit to set up this device will be ordered between
250 remote\-fs\-pre\&.target
251 and
252 remote\-veritysetup\&.target, instead of
253 veritysetup\-pre\&.target
254 and
255 veritysetup\&.target\&.
256 .sp
257 Hint: if this device is used for a mount point that is specified in
258 \fBfstab\fR(5), the
259 \fB_netdev\fR
260 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
261 local\-fs\&.target, while the service to configure the network is usually only started
262 \fIafter\fR
263 the local file system has been mounted\&.
264 .sp
265 Added in version 248\&.
266 .RE
267 .PP
268 \fBnoauto\fR
269 .RS 4
270 This device will not be added to
271 veritysetup\&.target\&. This means that it will not be automatically enabled on boot, unless something else pulls it in\&. In particular, if the device is used for a mount point, it\*(Aqll be enabled automatically during boot, unless the mount point itself is also disabled with
272 \fBnoauto\fR\&.
273 .sp
274 Added in version 248\&.
275 .RE
276 .PP
277 \fBnofail\fR
278 .RS 4
279 This device will not be a hard dependency of
280 veritysetup\&.target\&. It\*(Aqll still be pulled in and started, but the system will not wait for the device to show up and be enabled, and boot will not fail if this is unsuccessful\&. Note that other units that depend on the enabled device may still fail\&. In particular, if the device is used for a mount point, the mount point itself also needs to have the
281 \fBnofail\fR
282 option, or the boot will fail if the device is not enabled successfully\&.
283 .sp
284 Added in version 248\&.
285 .RE
286 .PP
287 \fBx\-initrd\&.attach\fR
288 .RS 4
289 Setup this verity protected block device in the initrd, similarly to
290 \fBsystemd.mount\fR(5)
291 units marked with
292 \fBx\-initrd\&.mount\fR\&.
293 .sp
294 Although it is not necessary to mark the mount entry for the root file system with
295 \fBx\-initrd\&.mount\fR,
296 \fBx\-initrd\&.attach\fR
297 is still recommended with the verity protected block device containing the root file system as otherwise systemd will attempt to detach the device during the regular system shutdown while it is still in use\&. With this option the device will still be detached but later after the root file system is unmounted\&.
298 .sp
299 All other verity protected block devices that contain file systems mounted in the initrd should use this option\&.
300 .sp
301 Added in version 248\&.
302 .RE
303 .PP
304 \fBtpm2\-measure\-nvpcr=\fR
305 .RS 4
306 Takes a boolean argument, or an NvPCR name as argument\&. May be used to enable automatic measurement of the volume name and Verity root hash, as well as the serials and issuers of the certificates used to generate the provided signatures (if any) will be measured\&. Passing false disables the mechanism\&. Passing true enables measurement into the
307 "verity"
308 NvPCR\&. If any other string is specified this selects the NvPCR to measure into by name\&.
309 .sp
310 Added in version 260\&.
311 .RE
312 .PP
313 At early boot and when the system manager configuration is reloaded, this file is translated into native systemd units by
314 \fBsystemd-veritysetup-generator\fR(8)\&.
315 .SH "EXAMPLES"
316 .PP
317 \fBExample\ \&1.\ \&/etc/veritytab example\fR
318 .PP
319 Set up two verity protected block devices\&. One using device blocks, another using files\&.
320 .sp
321 .if n \{\
322 .RS 4
323 .\}
324 .nf
325 usr PARTUUID=783e45ae\-7aa3\-484a\-beef\-a80ff9c19cbb PARTUUID=21dc1dfe\-4c33\-8b48\-98a9\-918a22eb3e37 36e3f740ad502e2c25e2a23d9c7c17bf0fdad2300b7580842d4b7ec1fb0fa263 auto
326 data /etc/data /etc/hash a5ee4b42f70ae1f46a08a7c92c2e0a20672ad2f514792730f5d49d7606ab8fdf auto
327 .fi
328 .if n \{\
329 .RE
330 .\}
331 .SH "SEE ALSO"
332 .PP
333 \fBsystemd\fR(1), \[email protected]\fR(8), \fBsystemd-veritysetup-generator\fR(8), \fBfstab\fR(5), \fBveritysetup\fR(8)