VERITYTAB(5)
๐ NAME ๐
veritytab โ the config file that describes your verity protected block devices ๐ (this is the VERITYTAB(5) page btw, in case you were wondering which manual you wandered into)
๐ SYNOPSIS ๐
/etc/veritytab
๐ธ DESCRIPTION ๐ธ
okay so bestie, the /etc/veritytab file is literally the whole blueprint for verity protected block devices that get set up during system boot. that's it. that's the job. โจ
Empty lines? Ignored. Lines starting with the "#" character? Also ignored. Every remaining line describes exactly one verity protected block device, and the fields are delimited by white space. no commas, no vibes, just spaces.
Each line is in the form:
volume-name data-device hash-device roothash [options]
The first four fields are mandatory, the remaining one is optional. (yeah, four is a lot, but we lock in ๐ )
- The first field contains the name of the resulting verity volume โ its block device is set up below
/dev/mapper/. - The second field contains a path to the underlying block data device, or a specification of a block device via
UUID=followed by the UUID. - The third field contains a path to the underlying block hash device, or a specification of a block device via
UUID=followed by the UUID. - The fourth field is the roothash in hexadecimal. If this field is specified as dash, it is attempted to read the root hash from the udev property
"ID_DISSECT_PART_ROOTHASH="(encoded in hexadecimal) of the data device. - The fifth field, if present, is a comma-delimited list of options. ๐ซถ
And here are literally all of the options it recognizes, no gatekeeping:
superblock=BOOLโ Use dm-verity with or without permanent on-disk superblock. (Added in version 254.)format=NUMBERโ Specifies the hash version type. Format type"0"is original Chrome OS version. Format type"1"is modern version. (Added in version 254.)data-block-size=BYTESโ Used block size for the data device. (Note kernel supports only page-size as maximum here; Multiples of 512 bytes.) (Added in version 254.)hash-block-size=BYTESโ Used block size for the hash device. (Note kernel supports only page-size as maximum here; Multiples of 512 bytes.) (Added in version 254.)data-blocks=BLOCKSโ Number of blocks of data device used in verification. If not specified, the whole device is used. (Added in version 254.)hash-offset=BYTESโ Offset of hash area/superblock on"hash-device". (Multiples of 512 bytes.) (Added in version 254.)salt=HEXโ Salt used for format or verification. Format is a hexadecimal string; 256 bytes long maximum;"-"is the special value for empty. (Added in version 254.)uuid=UUIDโ Use the provided UUID instead of generating new one. The UUID must be provided in standard UUID format, e.g."12345678-1234-1234-1234-123456789abc". (Added in version 254.)ignore-corruption,restart-on-corruption,panic-on-corruptionโ Defines what to do if a data verity problem is detected (data corruption). Without these options kernel fails the IO operation with I/O error. With--ignore-corruptionoption the corruption is only logged. With--restart-on-corruptionor--panic-on-corruptionthe kernel is restarted (panicked) immediately. (You have to provide way how to avoid restart loops.) (Added in version 248.)ignore-zero-blocksโ Instruct kernel to not verify blocks that are expected to contain zeroes and always directly return zeroes instead. (Added in version 248.)
โ ๏ธ Warning โ Use this option only in very specific cases. This option is available since Linux kernel version 4.5.
check-at-most-onceโ Instruct kernel to verify blocks only the first time they are read from the data device, rather than every time. (Added in version 248.)
โ ๏ธ Warning โ It provides a reduced level of security because only offline tampering of the data device's content will be detected, not online tampering. This option is available since Linux kernel version 4.17.
hash=HASHโ Hash algorithm for dm-verity. This should be the name of the algorithm, like"sha1". For default seeveritysetup --help. (Added in version 254.)fec-device=PATHโ 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. (Added in version 254.)fec-offset=BYTESโ This is the offset, in bytes, from the start of the FEC device to the beginning of the encoding data. (Aligned on 512 bytes.) (Added in version 254.)fec-roots=NUMโ 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). (Added in version 254.)root-hash-signature=PATH|base64:BASE64|autoโ A Base64 string encoding the root hash signature prefixed by"base64:", or an absolute path to a root hash signature file used to verify the root hash (in kernel). If the special string"auto"is specified, the root hash signature is attempted to be read from the udev property"ID_DISSECT_PART_ROOTHASH_SIG="(in Base64 format) of the data device. This feature requires Linux kernel version 5.4 or more recent. (Added in version 248.)_netdevโ Marks this veritysetup device as requiring network. It will be started after the network is available, similarly tosystemd.mount(5)units marked with_netdev. The service unit to set up this device will be ordered betweenremote-fs-pre.targetandremote-veritysetup.target, instead ofveritysetup-pre.targetandveritysetup.target. (Added in version 248.)
๐ก Hint โ if this device is used for a mount point that is specified infstab(5), the_netdevoption should also be used for the mount point. Otherwise, a dependency loop might be created where the mount point will be pulled in bylocal-fs.target, while the service to configure the network is usually only started after the local file system has been mounted.
noautoโ This device will not be added toveritysetup.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'll be enabled automatically during boot, unless the mount point itself is also disabled withnoauto. (Added in version 248.)nofailโ This device will not be a hard dependency ofveritysetup.target. It'll 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 thenofailoption, or the boot will fail if the device is not enabled successfully. (Added in version 248.)x-initrd.attachโ Setup this verity protected block device in the initrd, similarly tosystemd.mount(5)units marked withx-initrd.mount. (Added in version 248.)
Although it is not necessary to mark the mount entry for the root file system with x-initrd.mount, x-initrd.attach 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.
All other verity protected block devices that contain file systems mounted in the initrd should use this option.
tpm2-measure-nvpcr=โ 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"verity"NvPCR. If any other string is specified this selects the NvPCR to measure into by name. (Added in version 260.)
At early boot and when the system manager configuration is reloaded, this file is translated into native systemd units by systemd-veritysetup-generator(8). ๐ง
๐ฆ EXAMPLES ๐ฆ
Example 1. /etc/veritytab example โ Set up two verity protected block devices. One using device blocks, another using files. ๐
usr PARTUUID=783e45ae-7aa3-484a-beef-a80ff9c19cbb PARTUUID=21dc1dfe-4c33-8b48-98a9-918a22eb3e37 36e3f740ad502e2c25e2a23d9c7c17bf0fdad2300b7580842d4b7ec1fb0fa263 auto
data /etc/data /etc/hash a5ee4b42f70ae1f46a08a7c92c2e0a20672ad2f514792730f5d49d7606ab8fdf auto
๐ SEE ALSO ๐
systemd(1)systemd-veritysetup@.service(8)systemd-veritysetup-generator(8)fstab(5)veritysetup(8)
okay that's the whole page bestie, you ate that ๐ซถ this was systemd 262.1, page VERITYTAB(5) โ go forth and verify your blocks, periodt ๐ โจ
๐ฆ where this page comes from
- arch rolling: systemd 262.1-1 ยท LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms