forked from mmonaco/cryptmount
-
Notifications
You must be signed in to change notification settings - Fork 2
/
cryptmount.8
235 lines (235 loc) · 4.67 KB
/
cryptmount.8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
'\" t
.\" Title: cryptmount
.\" Author: [see the "Authors" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 10/17/2013
.\" Manual: [FIXME: manual]
.\" Source: [FIXME: source]
.\" Language: English
.\"
.TH "CRYPTMOUNT" "8" "10/17/2013" "[FIXME: source]" "[FIXME: manual]"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
cryptmount \- parse *crypttab* for use by *cryptsetup*
.SH "SYNOPSIS"
.sp
\fBcryptmount\fR [\fIoptions\fR] [\fB\-L\fR]
.sp
\fBcryptmount\fR [\fIoptions\fR] \fB\-M\fR [\fIname\fR|\fIdevice\fR]
.sp
\fBcryptmount\fR [\fIoptions\fR] \fB\-M\fR \fIname\fR \fIdevice\fR [\fIkey\fR]
.sp
\fBcryptmount\fR [\fIoptions\fR] \fB\-U\fR [\fIname\fR[\fB,\fR\&...]]
.SH "DESCRIPTION"
.sp
\fBcryptmount\fR uses \fBcrypttab(5)\fR for calling \fBcryptsetup(8)\fR; it can also be used to define a \fIvolume\fR on the command line without \fBcrypttab\fR\&.
.SH "ACTIONS"
.PP
\fB\-L\fR
.RS 4
List the
\fInames\fR
(first column) of
\fIvolumes\fR
from
\fBcrypttab\fR\&. Use with
\fB\-O\fR
to manipulate which
\fInames\fR
are listed\&.
.RE
.PP
\fB\-M\fR
.RS 4
Perform a mapping\&. The first form of this command finds a
\fIvolume\fR
from
\fBcrypttab\fR
either by its
\fIname\fR
or
\fIdevice\fR, or if nothing is given then map all
\fIvolumes\fR
(use with
\fB\-O\fR
to manipulate which
\fIvolumes\fR
are mapped)\&. The second form defines a
\fIvolume\fR
entirely on the command line,
\fBcrypttab\fR
is not used\&.
.RE
.PP
\fB\-U\fR
.RS 4
Unmap
\fIvolume(s)\fR\&. If a list of
\fInames\fR
is given, unmap them\&. Otherwise unmap all
\fIvolumes\fR
from
\fBcrypttab\fR
(with
\fB\-O\fR
to manipulate which
\fIvolumes\fR
are unmapped)\&.
.RE
.SH "OPTIONS"
.PP
\fB\-c\fR \fIfile\fR
.RS 4
Override the default
\fBcrypttab\fR
location\&.
.RE
.PP
\fB\-f\fR
.RS 4
Force potentially destructive mappings\&. For plain mappings (which are used with the
\fBswap\fR
and
\fBtmp\fR
options), there is a lot of potential to accidentally lose data\&. Because of this,
\fBcryptmount\fR
performs a check with
\fBblkid(8)\fR
to see if there is anything identifiable on
\fIdevice\fR\&. Use
\fB\-f\fR
to bypass this check\&.
.RE
.PP
\fB\-w\fR \fInum\fR
.RS 4
Time (in seconds) to wait for
\fIdevice\fR
if it is not already available\&. If
\fBudevd(8)\fR
is not running, then
\fBcryptmount\fR
does not bother to wait and this option is a no\-op\&. This also affects the wait time for
\fIkeydevice\fR
if your key is a block device or a file on a block device\&.
.RE
.PP
\fB\-n\fR
.RS 4
Dry run, useful with
\fB\-v\fR
to see how
\fBcryptsetup\fR
will be called\&.
.RE
.PP
\fB\-v\fR
.RS 4
Increase verbosity\&. This prints the commands which are being called (eg:
\fBcryptsetup\fR,
\fBmkswap\fR)\&.
.RE
.PP
\fB\-q\fR
.RS 4
Decrease verbosity\&.
.RE
.PP
\fB\-h\fR
.RS 4
Print a short usage message and exit\&.
.RE
.PP
\fB\-o\fR \fIoptions\fR
.RS 4
An options list with items such as
\fBswap\fR,
\fBcipher\fR, etc\&. This may be given multiple times with a cumulative effect\&. See
\fBcrypttab(5)\fR
for the full syntax
\fIoptions\fR\&.
.RE
.PP
\fB\-O\fR \fIfilters\fR
.RS 4
Similar to
\fIoptions\fR, this is used to manipulate which
\fIvolumes\fR
are used with
\fI\-L\fR
and with
\fI\-M\fR/\fI\-U\fR
without arguments\&. If an option is present in
\fIfilters\fR, then the
\fIvolume\fR
in
\fBcrypttab\fR
must contain the option\&. For example
\fB\-O swap,size\fR
matches all
\fIvolumes\fR
with the
\fBswap\fR
option
\fBand\fR
any
\fBsize=\fR\fIsize\fR
option; or
\fB\-O swap,size=512\fR
matches only those
\fIvolumes\fR
with the
\fBswap\fR
option and specifically
\fBsize=512\fR\&.
.sp
A filter option may also be negated by prefixing it with a
\fB!\fR\&. For example,
\fB\-O swap,!size\fR
includes all
\fIvolumes\fR
with the
\fBswap\fR
option but
\fBwithout\fR
the
\fIsize\fR
option\&. There is a built\-in filter
\fB!noauto\fR\&.
.sp
Filters are especially useful with
\fB%\fR\fItag\fR
options\&. For example,
\fB\-O !%random\fR
can be used to map all
\fIvolumes\fR
which don\(cqt use
\fB/dev/urandom\fR
for a password and
\fB\-O %random\fR
to map the remainder once your system\(cqs random seed has been restored\&.
.sp
The
\fB\-O\fR
option has
\fBno effect\fR
when calling
\fBcryptmount\fR
in a way that does not use
\fBcrypttab\fR\&.
.RE
.SH "SEE ALSO"
.sp
\fBcrypttab\fR(5), \fBcryptsetup\fR(8)
.SH "AUTHORS"
.sp
Matt Monaco <dgbaley27@0x01b\&.net>