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