Debian Codegraph @

upstream/debian-trixie/man5/veritytab.5

raw
1 '\" t
2 .TH "VERITYTAB" "5" "" "systemd 257.13" "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\&.
67 .PP
68 The fifth field, if present, is a comma\-delimited list of options\&. The following options are recognized:
69 .PP
70 \fBsuperblock=\fR\fB\fIBOOL\fR\fR
71 .RS 4
72 Use dm\-verity with or without permanent on\-disk superblock\&.
73 .sp
74 Added in version 254\&.
75 .RE
76 .PP
77 \fBformat=\fR\fB\fINUMBER\fR\fR
78 .RS 4
79 Specifies the hash version type\&. Format type
80 "0"
81 is original Chrome OS version\&. Format type
82 "1"
83 is modern version\&.
84 .sp
85 Added in version 254\&.
86 .RE
87 .PP
88 \fBdata\-block\-size=\fR\fB\fIBYTES\fR\fR
89 .RS 4
90 Used block size for the data device\&. (Note kernel supports only page\-size as maximum here; Multiples of 512 bytes\&.)
91 .sp
92 Added in version 254\&.
93 .RE
94 .PP
95 \fBhash\-block\-size=\fR\fB\fIBYTES\fR\fR
96 .RS 4
97 Used block size for the hash device\&. (Note kernel supports only page\-size as maximum here; Multiples of 512 bytes\&.)
98 .sp
99 Added in version 254\&.
100 .RE
101 .PP
102 \fBdata\-blocks=\fR\fB\fIBLOCKS\fR\fR
103 .RS 4
104 Number of blocks of data device used in verification\&. If not specified, the whole device is used\&.
105 .sp
106 Added in version 254\&.
107 .RE
108 .PP
109 \fBhash\-offset=\fR\fB\fIBYTES\fR\fR
110 .RS 4
111 Offset of hash area/superblock on
112 "hash\-device"\&. (Multiples of 512 bytes\&.)
113 .sp
114 Added in version 254\&.
115 .RE
116 .PP
117 \fBsalt=\fR\fB\fIHEX\fR\fR
118 .RS 4
119 Salt used for format or verification\&. Format is a hexadecimal string; 256 bytes long maximum;
120 "\-"
121 is the special value for empty\&.
122 .sp
123 Added in version 254\&.
124 .RE
125 .PP
126 \fBuuid=\fR\fB\fIUUID\fR\fR
127 .RS 4
128 Use the provided
129 \fIUUID\fR
130 instead of generating new one\&. The
131 \fIUUID\fR
132 must be provided in standard
133 UUID
134 format, e\&.g\&.
135 "12345678\-1234\-1234\-1234\-123456789abc"\&.
136 .sp
137 Added in version 254\&.
138 .RE
139 .PP
140 \fBignore\-corruption\fR, \fBrestart\-on\-corruption\fR, \fBpanic\-on\-corruption\fR
141 .RS 4
142 Defines what to do if a data verity problem is detected (data corruption)\&. Without these options kernel fails the
143 IO
144 operation with
145 I/O
146 error\&. With
147 \fB\-\-ignore\-corruption\fR
148 option the corruption is only logged\&. With
149 \fB\-\-restart\-on\-corruption\fR
150 or
151 \fB\-\-panic\-on\-corruption\fR
152 the kernel is restarted (panicked) immediately\&. (You have to provide way how to avoid restart loops\&.)
153 .sp
154 Added in version 248\&.
155 .RE
156 .PP
157 \fBignore\-zero\-blocks\fR
158 .RS 4
159 Instruct kernel to not verify blocks that are expected to contain zeroes and always directly return zeroes instead\&.
160 .if n \{\
161 .sp
162 .\}
163 .RS 4
164 .it 1 an-trap
165 .nr an-no-space-flag 1
166 .nr an-break-flag 1
167 .br
168 .ps +1
169 \fBWarning\fR
170 .ps -1
171 .br
172 Use this option only in very specific cases\&. This option is available since Linux kernel version 4\&.5\&.
173 .sp .5v
174 .RE
175 Added in version 248\&.
176 .RE
177 .PP
178 \fBcheck\-at\-most\-once\fR
179 .RS 4
180 Instruct kernel to verify blocks only the first time they are read from the data device, rather than every time\&.
181 .if n \{\
182 .sp
183 .\}
184 .RS 4
185 .it 1 an-trap
186 .nr an-no-space-flag 1
187 .nr an-break-flag 1
188 .br
189 .ps +1
190 \fBWarning\fR
191 .ps -1
192 .br
193 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\&.
194 .sp .5v
195 .RE
196 Added in version 248\&.
197 .RE
198 .PP
199 \fBhash=\fR\fB\fIHASH\fR\fR
200 .RS 4
201 Hash algorithm for dm\-verity\&. This should be the name of the algorithm, like "sha1"\&. For default see
202 \fBveritysetup \-\-help\fR\&.
203 .sp
204 Added in version 254\&.
205 .RE
206 .PP
207 \fBfec\-device=\fR\fB\fIPATH\fR\fR
208 .RS 4
209 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\&.
210 .sp
211 Added in version 254\&.
212 .RE
213 .PP
214 \fBfec\-offset=\fR\fB\fIBYTES\fR\fR
215 .RS 4
216 This is the offset, in bytes, from the start of the
217 FEC
218 device to the beginning of the encoding data\&. (Aligned on 512 bytes\&.)
219 .sp
220 Added in version 254\&.
221 .RE
222 .PP
223 \fBfec\-roots=\fR\fB\fINUM\fR\fR
224 .RS 4
225 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)\&.
226 .sp
227 Added in version 254\&.
228 .RE
229 .PP
230 \fBroot\-hash\-signature=\fR\fB\fIPATH\fR\fR\fB|base64:\fR\fB\fIHEX\fR\fR
231 .RS 4
232 A base64 string encoding the root hash signature prefixed by
233 "base64:"
234 or a path to roothash signature file used to verify the root hash (in kernel)\&. This feature requires Linux kernel version 5\&.4 or more recent\&.
235 .sp
236 Added in version 248\&.
237 .RE
238 .PP
239 \fB_netdev\fR
240 .RS 4
241 Marks this veritysetup device as requiring network\&. It will be started after the network is available, similarly to
242 \fBsystemd.mount\fR(5)
243 units marked with
244 \fB_netdev\fR\&. The service unit to set up this device will be ordered between
245 remote\-fs\-pre\&.target
246 and
247 remote\-veritysetup\&.target, instead of
248 veritysetup\-pre\&.target
249 and
250 veritysetup\&.target\&.
251 .sp
252 Hint: if this device is used for a mount point that is specified in
253 \fBfstab\fR(5), the
254 \fB_netdev\fR
255 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
256 local\-fs\&.target, while the service to configure the network is usually only started
257 \fIafter\fR
258 the local file system has been mounted\&.
259 .sp
260 Added in version 248\&.
261 .RE
262 .PP
263 \fBnoauto\fR
264 .RS 4
265 This device will not be added to
266 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
267 \fBnoauto\fR\&.
268 .sp
269 Added in version 248\&.
270 .RE
271 .PP
272 \fBnofail\fR
273 .RS 4
274 This device will not be a hard dependency of
275 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
276 \fBnofail\fR
277 option, or the boot will fail if the device is not enabled successfully\&.
278 .sp
279 Added in version 248\&.
280 .RE
281 .PP
282 \fBx\-initrd\&.attach\fR
283 .RS 4
284 Setup this verity protected block device in the initrd, similarly to
285 \fBsystemd.mount\fR(5)
286 units marked with
287 \fBx\-initrd\&.mount\fR\&.
288 .sp
289 Although it is not necessary to mark the mount entry for the root file system with
290 \fBx\-initrd\&.mount\fR,
291 \fBx\-initrd\&.attach\fR
292 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\&.
293 .sp
294 All other verity protected block devices that contain file systems mounted in the initrd should use this option\&.
295 .sp
296 Added in version 248\&.
297 .RE
298 .PP
299 At early boot and when the system manager configuration is reloaded, this file is translated into native systemd units by
300 \fBsystemd-veritysetup-generator\fR(8)\&.
301 .SH "EXAMPLES"
302 .PP
303 \fBExample\ \&1.\ \&/etc/veritytab example\fR
304 .PP
305 Set up two verity protected block devices\&. One using device blocks, another using files\&.
306 .sp
307 .if n \{\
308 .RS 4
309 .\}
310 .nf
311 usr PARTUUID=783e45ae\-7aa3\-484a\-beef\-a80ff9c19cbb PARTUUID=21dc1dfe\-4c33\-8b48\-98a9\-918a22eb3e37 36e3f740ad502e2c25e2a23d9c7c17bf0fdad2300b7580842d4b7ec1fb0fa263 auto
312 data /etc/data /etc/hash a5ee4b42f70ae1f46a08a7c92c2e0a20672ad2f514792730f5d49d7606ab8fdf auto
313 .fi
314 .if n \{\
315 .RE
316 .\}
317 .SH "SEE ALSO"
318 .PP
319 \fBsystemd\fR(1), \[email protected]\fR(8), \fBsystemd-veritysetup-generator\fR(8), \fBfstab\fR(5), \fBveritysetup\fR(8)