Add verity uuid specification.
[platform/upstream/cryptsetup.git] / man / veritysetup.8
1 .TH VERITYSETUP "8" "June 2012" "veritysetup" "Maintenance Commands"
2 .SH NAME
3 veritysetup - manage dm-verity (block level verification) volumes
4 .SH SYNOPSIS
5 .B veritysetup <options> <action> <action args>
6 .SH DESCRIPTION
7 .PP
8 veritysetup is used to configure dm-verity managed device-mapper mappings.
9
10 Device-mapper verity target provides read-only transparent integrity
11 checking of block devices using kernel crypto API.
12
13 The dm-verity devices are always read-only.
14
15 veritysetup supports these operations:
16 .PP
17 \fIformat\fR <data_device> <hash_device>
18 .IP
19 Calculates and permanently stores hash verification data for data_device.
20 Hash area can be located on the smae device after data if specified
21 by \-\-hash\-start option.
22 Note you need to provide reported roo hash for device verification
23 or activation. This hash must be trusted.
24
25 \fB<options>\fR can be [\-\-hash, \-\-no-superblock, \-\-format,
26 \-\-data-block-size, \-\-hash-block-size, \-\-data-blocks, \-\-hash-start,
27 \-\-salt, \-\-uuid]
28 .PP
29 \fIcreate\fR <name> <data_device> <hash_device> <root_hash>
30 .IP
31 Creates a mapping with <name> backed by device <data_device> and using
32 <hash_device> for in-kernel verification.
33
34 The <root_hash> is a hexadecimal string.
35
36 \fB<options>\fR can be [\-\-hash-start, \-\-no-superblock]
37
38 If option \-\-no-superblock is used, you have to use the same options
39 as in format operation.
40 .PP
41 \fIremove\fR <name>
42 .IP
43 Removes the existing mapping <name>.
44 .PP
45 \fIstatus\fR <name>
46 .IP
47 Reports the status for the active verity mapping <name>.
48 .PP
49 \fIdump\fR <hash_device>
50 .IP
51 Reports the parameters of verity device from on-disk stored superblock.
52 \fB<options>\fR can be [\-\-no-superblock]
53 .SH OPTIONS
54 .TP
55 .B "\-\-verbose, \-v"
56 Print more information on command execution.
57 .TP
58 .B "\-\-debug"
59 Run in debug mode with full diagnostic logs. Debug output
60 lines are always prefixed by '#'.
61 .TP
62 .B "\-\-no-superblock"
63 Create or use dm-verity without permanent on-disk superblock.
64 .TP
65 .B "\-\-format=number"
66 Specifies the hash version type.
67 Format type 0 is original Chrome OS verion. Format type 1 si default.
68 .TP
69 .B "\-\-data-block-size=bytes"
70 Used block size for the data device.
71 (Note kernel supports only page-size as maximum here.)
72 .TP
73 .B "\-\-hash-block-size=bytes"
74 Used block size for the hash device.
75 (Note kernel supports only page-size as maximum here.)
76 .TP
77 .B "\-\-data-blocks=blocks"
78 Size of data device used in verification.
79 If not specified, the whole device is used.
80 .TP
81 .B "\-\-hash-start=512-bytes sectors"
82 Offset of hash area/superblock on hash_device.
83 .TP
84 .B "\-\-salt=hex string"
85 Salt used for format or verification.
86 Format is hexadecimal string.
87 .TP
88 .B "\-\-uuid=UUID"
89 Use the provided UUID for the format command
90 instead of generating new one.
91
92 The UUID must be provided in the standard UUID format,
93 e.g. 12345678-1234-1234-1234-123456789abc.
94 .TP
95 .B "\-\-version"
96 Show the program version.
97 .SH RETURN CODES
98 Veritysetup returns 0 on success and a non-zero value on error.
99
100 Error codes are: 1 wrong parameters, 2 no permission,
101 3 out of memory, 4 wrong device specified, 5 device already exists
102 or device is busy.
103 .SH REPORTING BUGS
104 Report bugs, including ones in the documentation, on
105 the cryptsetup mailing list at <dm-crypt@saout.de>
106 or in the 'Issues' section on LUKS website.
107 Please attach the output of the failed command with the
108 \-\-debug option added.
109 .SH AUTHORS
110 The first implementation of veritysetup was written by Chromium OS authors.
111
112 This version is based on verification code written by Mikulas Patocka <mpatocka@redhat.com>
113 and rewritten for libcryptsetup by Milan Broz <gmazyland@gmail.com>.
114 .SH COPYRIGHT
115 Copyright \(co 2012 Red Hat, Inc.
116
117 This is free software; see the source for copying conditions.  There is NO
118 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
119 .SH SEE ALSO
120 The project website at \fBhttp://code.google.com/p/cryptsetup/\fR
121
122 The verity on-disk format specification available at
123 \fBhttp://code.google.com/p/cryptsetup/wiki/DMCrypt\fR