1VERITYTAB(5) veritytab VERITYTAB(5)
2
3
4
6 veritytab - Configuration for verity block devices
7
9 /etc/veritytab
10
12 The /etc/veritytab file describes verity protected block devices that
13 are set up during system boot.
14
15 Empty lines and lines starting with the "#" character are ignored. Each
16 of the remaining lines describes one verity protected block device.
17 Fields are delimited by white space.
18
19 Each line is in the form
20
21 volume-name data-device hash-device roothash options
22
23 The first four fields are mandatory, the remaining one is optional.
24
25 The first field contains the name of the resulting verity volume; its
26 block device is set up below /dev/mapper/.
27
28 The second field contains a path to the underlying block data device,
29 or a specification of a block device via "UUID=" followed by the UUID.
30
31 The third field contains a path to the underlying block hash device, or
32 a specification of a block device via "UUID=" followed by the UUID.
33
34 The fourth field is the "roothash" in hexadecimal.
35
36 The fifth field, if present, is a comma-delimited list of options. The
37 following options are recognized:
38
39 superblock=BOOL
40 Use dm-verity with or without permanent on-disk superblock.
41
42 format=NUMBER
43 Specifies the hash version type. Format type 0 is original Chrome
44 OS version. Format type 1 is modern version.
45
46 data-block-size=BYTES
47 Used block size for the data device. (Note kernel supports only
48 page-size as maximum here; Multiples of 512 bytes.)
49
50 hash-block-size=BYTES
51 Used block size for the hash device. (Note kernel supports only
52 page-size as maximum here; Multiples of 512 bytes.)
53
54 data-blocks=BLOCKS
55 Number of blocks of data device used in verification. If not
56 specified, the whole device is used.
57
58 hash-offset=BYTES
59 Offset of hash area/superblock on "hash-device". (Multiples of 512
60 bytes.)
61
62 salt=HEX
63 Salt used for format or verification. Format is a hexadecimal
64 string; 256 bytes long maximum; "-"is the special value for empty.
65
66 uuid=UUID
67 Use the provided UUID for format command instead of generating new
68 one. The UUID must be provided in standard UUID format, e.g.
69 12345678-1234-1234-1234-123456789abc.
70
71 ignore-corruption, restart-on-corruption, panic-on-corruption
72 Defines what to do if a data verity problem is detected (data
73 corruption). Without these options kernel fails the IO operation
74 with I/O error. With "--ignore-corruption" option the corruption is
75 only logged. With "--restart-on-corruption" or
76 "--panic-on-corruption" the kernel is restarted (panicked)
77 immediately. (You have to provide way how to avoid restart loops.)
78
79 ignore-zero-blocks
80 Instruct kernel to not verify blocks that are expected to contain
81 zeroes and always directly return zeroes instead. WARNING: Use this
82 option only in very specific cases. This option is available since
83 Linux kernel version 4.5.
84
85 check-at-most-once
86 Instruct kernel to verify blocks only the first time they are read
87 from the data device, rather than every time. WARNING: It provides
88 a reduced level of security because only offline tampering of the
89 data device's content will be detected, not online tampering. This
90 option is available since Linux kernel version 4.17.
91
92 hash=HASH
93 Hash algorithm for dm-verity. This should be the name of the
94 algorithm, like "sha1". For default see veritysetup --help.
95
96 fec-device=PATH
97 Use forward error correction (FEC) to recover from corruption if
98 hash verification fails. Use encoding data from the specified
99 device. The fec device argument can be block device or file image.
100 For format, if fec device path doesn't exist, it will be created as
101 file. Note: block sizes for data and hash devices must match. Also,
102 if the verity data_device is encrypted the fec_device should be
103 too.
104
105 fec-offset=BYTES
106 This is the offset, in bytes, from the start of the FEC device to
107 the beginning of the encoding data. (Aligned on 512 bytes.)
108
109 fec-roots=NUM
110 Number of generator roots. This equals to the number of parity
111 bytes in the encoding data. In RS(M, N) encoding, the number of
112 roots is M-N. M is 255 and M-N is between 2 and 24 (including).
113
114 root-hash-signature=PATH|base64:HEX
115 A base64 string encoding the root hash signature prefixed by
116 "base64:" or a path to roothash signature file used to verify the
117 root hash (in kernel). This feature requires Linux kernel version
118 5.4 or more recent.
119
120 _netdev
121 Marks this veritysetup device as requiring network. It will be
122 started after the network is available, similarly to
123 systemd.mount(5) units marked with _netdev. The service unit to set
124 up this device will be ordered between remote-fs-pre.target and
125 remote-veritysetup.target, instead of veritysetup-pre.target and
126 veritysetup.target.
127
128 Hint: if this device is used for a mount point that is specified in
129 fstab(5), the _netdev option should also be used for the mount
130 point. Otherwise, a dependency loop might be created where the
131 mount point will be pulled in by local-fs.target, while the service
132 to configure the network is usually only started after the local
133 file system has been mounted.
134
135 noauto
136 This device will not be added to veritysetup.target. This means
137 that it will not be automatically enabled on boot, unless something
138 else pulls it in. In particular, if the device is used for a mount
139 point, it'll be enabled automatically during boot, unless the mount
140 point itself is also disabled with noauto.
141
142 nofail
143 This device will not be a hard dependency of veritysetup.target.
144 It'll still be pulled in and started, but the system will not wait
145 for the device to show up and be enabled, and boot will not fail if
146 this is unsuccessful. Note that other units that depend on the
147 enabled device may still fail. In particular, if the device is used
148 for a mount point, the mount point itself also needs to have the
149 nofail option, or the boot will fail if the device is not enabled
150 successfully.
151
152 x-initrd.attach
153 Setup this verity protected block device in the initrd, similarly
154 to systemd.mount(5) units marked with x-initrd.mount.
155
156 Although it's not necessary to mark the mount entry for the root
157 file system with x-initrd.mount, x-initrd.attach is still
158 recommended with the verity protected block device containing the
159 root file system as otherwise systemd will attempt to detach the
160 device during the regular system shutdown while it's still in use.
161 With this option the device will still be detached but later after
162 the root file system is unmounted.
163
164 All other verity protected block devices that contain file systems
165 mounted in the initrd should use this option.
166
167 At early boot and when the system manager configuration is reloaded,
168 this file is translated into native systemd units by systemd-
169 veritysetup-generator(8).
170
172 Example 1. /etc/veritytab example
173
174 Set up two verity protected block devices. One using device blocks,
175 another using files.
176
177 usr PARTUUID=783e45ae-7aa3-484a-beef-a80ff9c19cbb PARTUUID=21dc1dfe-4c33-8b48-98a9-918a22eb3e37 36e3f740ad502e2c25e2a23d9c7c17bf0fdad2300b7580842d4b7ec1fb0fa263 auto
178 data /etc/data /etc/hash a5ee4b42f70ae1f46a08a7c92c2e0a20672ad2f514792730f5d49d7606ab8fdf auto
179
181 systemd(1), systemd-veritysetup@.service(8), systemd-veritysetup-
182 generator(8), fstab(5), veritysetup(8),
183
184
185
186systemd 254 VERITYTAB(5)