]> wimlib.net Git - wimlib/blob - doc/imagex-capture.1.in
940bae18997468e17185dd383ed26224784f47dd
[wimlib] / doc / imagex-capture.1.in
1 .TH WIMLIB-IMAGEX "1" "August 2013" "@IMAGEX_PROGNAME@ @VERSION@" "User Commands"
2 .SH NAME
3 @IMAGEX_PROGNAME@-capture, @IMAGEX_PROGNAME@-append \- Create or append a WIM image
4 .SH SYNOPSIS
5 \fB@IMAGEX_PROGNAME@ capture\fR \fISOURCE\fR \fIWIMFILE\fR [\fIIMAGE_NAME\fR \
6 [\fIIMAGE_DESCRIPTION\fR]] [\fIOPTION\fR...]
7 .br
8 \fB@IMAGEX_PROGNAME@ append\fR \fISOURCE\fR \fIWIMFILE\fR [\fIIMAGE_NAME\fR \
9 [\fIIMAGE_DESCRIPTION\fR]] [\fIOPTION\fR...]
10 .SH DESCRIPTION
11 The \fB@IMAGEX_PROGNAME@ capture\fR and \fB@IMAGEX_PROGNAME@ append\fR commands
12 create a Windows Imaging (WIM) image from a directory tree.  The
13 \fB@IMAGEX_PROGNAME@ capture\fR command creates a new WIM file containing the
14 captured image, while the \fB@IMAGEX_PROGNAME@ append\fR command appends the
15 captured image to an existing WIM file.
16 These commands are also available as simply \fBwimcapture\fR and \fBwimappend\fR
17 if the appropriate hard links or batch files are installed.
18 .PP
19 Background information: A WIM image is an independent directory tree in a WIM
20 file.  A WIM file may contain any number of separate images.  WIM files are
21 single-instancing with regards to file data, so a file is stored only one time
22 in the entire WIM, regardless of how many images the file appears in.
23 .PP
24 \fISOURCE\fR specifies the location of the files to create the new WIM image
25 from.  If \fISOURCE\fR is a directory, the WIM image is captured from that
26 directory (see \fBDIRECTORY CAPTURE (UNIX)\fR or \fBDIRECTORY CAPTURE
27 (WINDOWS)\fR.   Alternatively, if the \fB--source-list\fR option is specified,
28 \fISOURCE\fR is interpreted as a file that itself provides a list of
29 files and directories to include in the new WIM image.  Still
30 alternatively, only on UNIX-like systems, if \fISOURCE\fR is a
31 regular file or block device, it is interpreted as an NTFS volume from
32 which a WIM image is to be captured using libntfs-3g (see \fBNTFS VOLUME CAPTURE
33 (UNIX)\fR.
34 .PP
35 \fIIMAGE_NAME\fR and \fIIMAGE_DESCRIPTION\fR specify the name and description to
36 give the new WIM image.  If \fIIMAGE_NAME\fR is not specified, it defaults to
37 the base name (excluding path to parent directory) of \fISOURCE\fR, but if this
38 name already exists in \fIWIMFILE\fR, a unique suffix is added.  Otherwise,
39 \fIIMAGE_NAME\fR must be either a name that does not already exist as an image in
40 \fIWIMFILE\fR, or the empty string to create an image with no name.  If
41 \fIIMAGE_DESCRIPTION\fR is not specified, no description is given to the new
42 image.
43 .PP
44 As a special case, if \fIWIMFILE\fR is "-", the \fB--pipable\fR option is
45 assumed and the WIM file is written to standard output in a special pipable
46 format.   See the documentation for \fB--pipable\fR for more details.
47 .SH DIRECTORY CAPTURE (UNIX)
48 This section documents how \fB@IMAGEX_PROGNAME@\fR captures files from a
49 directory tree on UNIX-like systems.  See \fBDIRECTORY CAPTURE (WINDOWS)\fR for
50 the corresponding documentation for Windows.
51 .PP
52 On UNIX-like systems, when \fISOURCE\fR specifies a directory or a symbolic link
53 to a directory, the WIM image will be captured from the directory tree rooted at
54 this directory.  This directory can be on any type of filesystem, and mount
55 points are followed recursively.  However, it is important to keep in mind that
56 the WIM format was designed for Windows, so it cannot store all possible
57 metadata from filesystems used on UNIX-like systems.  The main information that
58 will \fInot\fR be stored is:
59 .IP \[bu] 4
60 UNIX file owners, groups, and modes.  (Exception: see the \fB--unix-data\fR
61 option.)  As a result, file permissions will not be stored, and files that are
62 neither regular files, directories, nor symbolic links, such as device files and
63 FIFOs, cannot be captured.
64 .IP \[bu]
65 Extended attributes.  This mainly includes extensions to the traditional UNIX
66 security model, such as SELinux security labels, POSIX ACLs, and capabilities
67 labels.
68 .IP \[bu]
69 Files that are neither regular files, directories, nor symbolic links, such as
70 device files and FIFOs.  These will be excluded by default.
71 .PP
72 Notes: hard links and symbolic links are supported by the WIM format and
73 \fIare\fR stored.  (Symbolic links are turned into "native" Windows symbolic
74 links via reparse points; this process is reversible, e.g. automatically by
75 \fB@IMAGEX_PROGNAME@ apply\fR.)  Timestamps are stored with 100 nanosecond
76 granularity and include last modification time (mtime) and last access time
77 (atime), but not last status change time (ctime).
78 .SH NTFS VOLUME CAPTURE (UNIX)
79 This section documents how \fB@IMAGEX_PROGNAME@\fR captures files directly from
80 an NTFS volume image on UNIX-like systems.  See \fBDIRECTORY CAPTURE
81 (WINDOWS)\fR for the corresponding documentation for Windows.
82 .PP
83 On UNIX-like systems, a special image capture mode is entered when \fISOURCE\fR
84 is a regular file or block device.  In this mode, \fISOURCE\fR is assumed to be
85 an NTFS volume or volume image, and wimlib will capture a WIM image containing a
86 full contents of the NTFS volume, including NTFS-specific data.  This is done
87 using libntfs-3g.
88 .PP
89 Please note that the NTFS volume capture mode is \fInot\fR entered if
90 \fISOURCE\fR is a directory, even if an NTFS filesystem is mounted on
91 \fISOURCE\fR using ntfs-3g.  You must specify the NTFS volume itself (and it
92 must be unmounted, and you must have permission to read from it).
93 .PP
94 The NTFS volume capture mode attempts to capture as much data and metadata as
95 possible, including:
96 .IP \[bu] 4
97 All data streams of all unencrypted files, including the unnamed data stream as
98 well as all named data streams.
99 .IP \[bu]
100 Reparse points, including symbolic links, junction points, and other reparse
101 points.
102 .IP \[bu]
103 File and directory creation, access, and modification timestamps, using the
104 native NTFS resolution of 100 nanoseconds.
105 .IP \[bu]
106 Windows security descriptors, including all components (owner, group, DACL, and
107 SACL).
108 .IP \[bu]
109 DOS/Windows file attribute flags.
110 .IP \[bu]
111 All names of all files, including names in the Win32 namespace, DOS namespace,
112 Win32+DOS namespace, and POSIX namespace.  This includes hard links.
113 .PP
114 However, the main limitations of this NTFS volume capture mode are:
115 .IP \[bu] 4
116 Encrypted files are excluded by default.  Although ntfs-3g can read their data,
117 they need to be stored in the WIM file in a special format that wimlib does not
118 yet support (except on Windows, where wimlib can treat the data as opaque and
119 hand it off to the appropriate API function).
120 .IP \[bu]
121 The sparse attribute on sparse files will be saved, but the data stored will be
122 the full data of the file rather than the "sparse" data.  (The data is, however,
123 subject to the WIM format's compression.)
124 .SH DIRECTORY CAPTURE (WINDOWS)
125 On Windows, \fB@IMAGEX_PROGNAME@ capture\fR and \fB@IMAGEX_PROGNAME@ append\fR
126 natively support Windows-specific and NTFS-specific data.  They therefore act
127 similarly to the corresponding commands of Microsoft's ImageX.  For best
128 results, the directory being captured should be on an NTFS volume and
129 \fB@IMAGEX_PROGNAME@\fR should be run with Administrator privileges; however,
130 non-NTFS filesystems and running without Administrator privileges are also
131 supported.
132 .PP
133 On Windows, \fB@IMAGEX_PROGNAME@ capture\fR and \fB@IMAGEX_PROGNAME@ append\fR
134 try to archive as much data and metadata as possible, including:
135 .IP \[bu] 4
136 All data streams of all files.
137 .IP \[bu]
138 Reparse points, including symbolic links, junction points, and other reparse
139 points, if supported by the source filesystem.  (Note: see \fB--rpfix\fR and
140 \fB--norpfix\fR for documentation on exactly how absolute symbolic links and
141 junctions are captured.)
142 .IP \[bu]
143 File and directory creation, access, and modification timestamps.  These are
144 stored with Windows NT's native timestamp resolution of 100 nanoseconds.
145 .IP \[bu]
146 Security descriptors, if supported by the source filesystem and \fB--no-acls\fR
147 is not specified.  However, beware that unless \fB--strict-acls\fR is specified,
148 the security descriptors for individual files or directories may be omitted or
149 only partially captured if the user does not have permission to read them, which
150 can be a problem if \fB@IMAGEX_PROGNAME@\fR is run as a non-Administrator.
151 .IP \[bu]
152 File attributes, including hidden, sparse, compressed, encrypted, etc.
153 Encrypted files will be stored in encrypted form rather than in plain text.
154 Transparently compressed files will be read as uncompressed and stored subject
155 to the WIM's own compression.  There is no special handling for storing sparse
156 files, but they are likely to compress to a small size.
157 .IP \[bu]
158 DOS names (8.3) names of files; however, the failure to read them is not
159 considered an error condition.
160 .IP \[bu]
161 Hard links, if supported by the source filesystem.
162 .PP
163 Note: the capture process is reversible, since when \fB@IMAGEX_PROGNAME@
164 apply\fR (on Windows) extracts the captured WIM image, it will extract all of
165 the above information, at least to the extent supported by the destination
166 filesystem.  One exception is that since encrypted files are stored as
167 unencrypted, their data will not be available if restored on a Windows system
168 that does not have the decryption key.
169 .SH OPTIONS
170 .TP 6
171 \fB--boot\fR
172 Specifies that the new image is to be made the bootable image of the WIM archive.
173 .TP
174 \fB--check\fR
175 For \fB@IMAGEX_PROGNAME@ append\fR, before performing the append operation,
176 check the integrity of \fIWIMFILE\fR if an integrity table is present.
177 Furthermore, include an integrity table in the new WIM file
178 (\fB@IMAGEX_PROGNAME@ capture\fR) or the modified WIM file (\fB@IMAGEX_PROGNAME@
179 append\fR).  If this option is not specified, no integrity table is included in
180 a WIM file created with \fB@IMAGEX_PROGNAME@ capture\fR, while a WIM file
181 updated with \fB@IMAGEX_PROGNAME@ append\fR will be written with an integrity
182 table if and only if one was present before.
183 .TP
184 \fB--compress\fR=\fITYPE\fR
185 Specifies the compression type for the new WIM file.  This flag is only valid
186 for \fB@IMAGEX_PROGNAME@ capture\fR, since the compression mode for
187 \fB@IMAGEX_PROGNAME@ append\fR must be the same as that of the existing WIM (and
188 is automatically set as such).
189 \fITYPE\fR may be "none", "fast", or "maximum".  By default, it is "maximum".
190 This default behavior is different from Microsoft's ImageX, where the default is
191 "fast". \fB@IMAGEX_PROGNAME@ capture\fR instead gives you the best compression
192 ratio by default and makes up for the slightly slower compression by being
193 faster than Microsoft's software in the first place and using multiple CPUs when
194 available.
195 .IP ""
196 You may also specify the actual names of the compression algorithms, "XPRESS"
197 and "LZX", instead of "fast" and "maximum", respectively.
198 .TP
199 \fB--threads\fR=\fINUM_THREADS\fR
200 Number of threads to use for compressing data.  Default: autodetect (number of
201 available CPUs).
202 .TP
203 \fB--rebuild\fR
204 For \fB@IMAGEX_PROGNAME@ append\fR: rebuild the entire WIM rather than appending the new
205 data to the end of it.  Rebuilding the WIM is slower, but will save a little bit
206 of space that would otherwise be left as a hole in the WIM.  Also see \fB@IMAGEX_PROGNAME@
207 optimize\fR(1).
208 .TP
209 \fB--flags\fR=\fIEDITIONID\fR
210 Specify a string to use in the <FLAGS> element of the XML data for the new
211 image.
212 .TP
213 \fB--verbose\fR
214 Print the names of files and directories as they are captured.
215 .TP
216 \fB--dereference\fR
217 (UNIX-like systems only) Follow symbolic links and archive the files they point
218 to, rather than archiving the links themselves.
219 .TP
220 \fB--config\fR=\fIFILE\fR
221 Specifies a configuration file for capturing the new image.  The configuration
222 file specifies files that are to be treated specially during the image capture.
223 .IP ""
224 The format of the configuration file is a number of sections containing path
225 globs one per line, where each section begins with the tag [ExclusionList],
226 [ExclusionException], [CompressionExclusionList], or [AlignmentList].
227 Currently, only the [ExclusionList] and [ExclusionException] sections are
228 implemented.  The [ExclusionList] section specifies a list of path globs to
229 exclude from capture, while the [ExclusionException] section specifies a list of
230 path globs to include in the capture even if the matched file or directory name
231 also appears in the [ExclusionList].
232 .IP ""
233 Relative globs with only one path component (e.g. *.mp3) match against a
234 filename in any directory.  Relative globs with multiple path components (e.g.
235 dir/file), as well as absolute globs (e.g. /dir/file), are treated as paths
236 starting at the root directory of capture, or the root of the NTFS volume for
237 NTFS volume capture mode.  If a directory is matched by a glob in the
238 [ExclusionList], the entire directory tree rooted at that directory is excluded
239 from the capture, unless \fB--dereference\fR is specified and there is another
240 path into that directory through a symbolic link.
241 .IP ""
242 For compatibility with Windows, the path separators in the globs may be either
243 forward slashes or backslashes, and the line separators may be either UNIX-style
244 or DOS-style.  Globs with spaces in them must be quoted, and leading and
245 trailing whitespace is not significant.  Empty lines and lines beginning with
246 \'#' or whitespace followed by '#' are ignored.
247 .IP ""
248 Paths may not have drive letters in them, as they are all relative to the root
249 of capture and not absolute external paths.
250 .IP ""
251 If this option is not specified the following default configuration file is
252 used:
253 .IP ""
254 .RS
255 .RS
256 .nf
257 [ExclusionList]
258 \\$ntfs.log
259 \\hiberfil.sys
260 \\pagefile.sys
261 "\\System Volume Information"
262 \\RECYCLER
263 \\Windows\\CSC
264 .RE
265 .RE
266 .fi
267 .TP
268 \fB--unix-data\fR
269 (UNIX-like systems only) Store the UNIX owner, group, and mode of all captured
270 files.  This is done by adding a special alternate data stream to each directory
271 entry that contains this information.  Please note that this flag is for
272 convenience only, in case you want to use \fB@IMAGEX_PROGNAME@\fR to archive
273 files on UNIX.  Microsoft's software will not understand this special
274 information.  You also may run into problems when applying an image with UNIX
275 data from a pipable WIM.
276 .TP
277 \fB--no-acls\fR
278 Do not capture files' security descriptors.
279 .TP
280 \fB--strict-acls\fR
281 Fail immediately if the full security descriptor of any file cannot be read.  On
282 Windows, the default behavior without this option is to first try omitting the
283 SACL from the security descriptor, then to try omitting the security descriptor
284 entirely.  The purpose of this is to capture as much data as possible without
285 always requiring Administrator privileges.  However, if you desire that all
286 security descriptors be captured exactly, you may wish to provide this option,
287 although the Administrator should have permission to read everything anyway.
288 .TP
289 \fB--rpfix\fR, \fB--norpfix\fR
290 Set whether to fix targets of absolute symbolic links (reparse points in Windows
291 terminology) or not.  When enabled (\fB--rpfix\fR), absolute symbolic links that
292 point inside the directory tree being captured will be adjusted to be absolute
293 relative to the root of the directory tree being captured.  In addition,
294 absolute symbolic links that point outside the directory tree being captured
295 will be ignored and not be captured at all.  When disabled (\fB--norpfix\fR),
296 absolute symbolic links will be captured exactly as is.
297 .IP ""
298 The default behavior for \fB@IMAGEX_PROGNAME@ capture\fR is equivalent to
299 \fB--rpfix\fR.  The default behavior for \fB@IMAGEX_PROGNAME@ append\fR will be
300 \fB--rpfix\fR if reparse point fixups have previously been done on
301 \fIWIMFILE\fR, otherwise \fB--norpfix\fR.
302 .IP ""
303 In the case of a multi-source capture, (\fB--source-list\fR specified), passing
304 \fB--norpfix\fR is recommended.  Otherwise, reparse point fixups will be
305 disabled on all capture sources destined for non-root locations in the WIM
306 image, while capture sources destined for the WIM root will get the default
307 behavior from the previous paragraph.
308 .TP
309 \fB--source-list\fR
310 \fB@IMAGEX_PROGNAME@ capture\fR and \fB@IMAGEX_PROGNAME@ append\fR support
311 creating a WIM image from multiple separate files or directories.  When
312 \fB--source-list\fR is specified, the \fISOURCE\fR argument specifies the name
313 of a text file, each line of which is either 1 or 2 whitespace separated file
314 paths.  The first file path, the source, specifies the path to a file or
315 directory to capture into the WIM image.  It may be either absolute or relative
316 to the current working directory.  The second file path, if provided, is the
317 target and specifies the path  in the WIM image that this file or directory will
318 be saved as.  Leading and trailing slashes in the target are ignored, except if
319 it consists entirely of slashes (e.g. "/"), which indicates that the directory
320 is to become the root of the WIM image.  If omitted, the target string defaults
321 to the same as the source string.
322 .IP ""
323 An example source list file is as follows:
324 .IP ""
325 .RS
326 .RS
327 .nf
328 # Make the WIM image from the 'winpe' directory
329 winpe   /
330
331 # Send the 'overlay' directory to '/overlay' in the WIM image
332 overlay /overlay
333
334 # Overlay a separate directory directly on the root of the WIM image.
335 # This is only legal if there are no conflicting files.
336 /data/stuff     /
337 .RE
338 .RE
339 .fi
340 .IP ""
341 Subdirectories in the WIM are created as needed.  Multiple source directories
342 may share the same target, which implies an overlay; however, an error is issued
343 if the same file appears in different overlays to the same directory.
344 .IP ""
345 File paths containing whitespace may be quoted with either single quotes or
346 double quotes.  Quotes may not be escaped.
347 .IP ""
348 Lines consisting only of whitespace and lines beginning with '#' preceded by
349 optional whitespace are ignored.
350 .IP ""
351 As a special case, if \fISOURCE\fR is "-", the source list is read from standard
352 input rather than an external file.
353 .IP ""
354 The NTFS volume capture mode on UNIX-like systems cannot be used with
355 \fB--source-list\fR, as only capturing a full NTFS volume is supported.
356 .TP
357 \fB--pipable\fR
358 Create a "pipable" WIM, which can be applied fully sequentially, including from
359 a pipe.  An image in the resulting WIM can be applied with \fB@IMAGEX_PROGNAME@
360 apply\fR, either normally by specifying the WIM file name, or with
361 \fB@IMAGEX_PROGNAME@ apply -\fR to read the WIM from standard input.  See
362 \fB@IMAGEX_PROGNAME@ apply\fR(1) for more details.
363 .IP ""
364 For append operations, this option will result in a full rebuild of the WIM to
365 make it pipable.  For capture operations, the captured WIM is simply created as
366 pipable.  Beware that the more images you add to a pipable WIM, the less
367 efficient piping it will be, since more unneeded data will be sent through the
368 pipe.
369 .IP ""
370 When wimlib creates a pipable WIM, it carefully re-arranges the components of
371 the WIM so that they can be read sequentially and also makes several other
372 modifications.  As a result, these "pipable" WIMs are \fInot compatible with
373 Microsoft's software\fR, so keep this in mind if you're going to use them.  If
374 desired, you can use \fB@IMAGEX_PROGNAME@ optimize --not-pipable\fR to re-write
375 a pipable WIM as a regular WIM.  (\fB@IMAGEX_PROGNAME@ export\fR also provides
376 the capability to export images from a pipable WIM into a non-pipable WIM, or
377 vice versa.)
378 .IP ""
379 For the most part, wimlib operates on pipable WIMs transparently.  You can
380 modify them, add or delete images, export images, and even create split pipable
381 WIMs.  The main disadvantages are that appending is (currently) less efficient
382 (\fB--rebuild\fR is always implied), and also they aren't compatible with
383 Microsoft's software.
384 .IP ""
385 \fB@IMAGEX_PROGNAME@ capture\fR and \fB@IMAGEX_PROGNAME@ append\fR can both
386 write a pipable WIM directly to standard output; this is done automatically if
387 \fIWIMFILE\fR is specified as "-".  (In that case, \fB--pipable\fR is assumed.)
388 .TP
389 \fB--not-pipable\fR
390 Ensure the resulting WIM is in the normal, non-pipable WIM format.  This is the
391 default for \fB@IMAGEX_PROGNAME@ capture\fR, except when writing to standard
392 output (\fIWIMFILE\fR specified as "-"), and also for \fB@IMAGEX_PROGNAME@
393 append\fR, except when appending to a WIM that is already pipable.
394 .TP
395 \fB--update-of\fR=[\fIWIMFILE\fR]:\fIIMAGE\fR
396 Declares that the image being captured from \fISOURCE\fR is mostly the same as
397 the existing image \fIIMAGE\fR in \fIWIMFILE\fR, but captured at a later point
398 in time, possibly with some modifications in the intervening time.  This is
399 designed to be used in incremental backups of the same filesystem or directory
400 tree.  \fIIMAGE\fR can be a 1-based index or name of an existing image in
401 \fIWIMFILE\fR.  It can also be a negative integer to index backwards into the
402 images (e.g.  -1 means the last existing image).
403 .IP ""
404 When this option is provided, the capture or append of the new image will be
405 optimized by not reading files that, based on metadata such as timestamps,
406 appear not to have been modified since they were archived in the existing
407 \fIIMAGE\fR.  Barring manipulation of timestamps, this option only affects
408 performance and does not change the resulting WIM file.
409 .IP ""
410 As shown, the full syntax for the argument to this option is to specify the WIM
411 file, a colon, and the image; for example, "--update-of mywim.wim:1".
412 However, the WIM file may be omitted, in which case it will default to the WIM
413 file being appended to for append operations, or the WIM file from which a delta
414 is being taken (with \fB--delta-from\fR, if specified) for capture operations.
415 .TP
416 \fB--delta-from\fR=\fIWIMFILE\fR
417 For \fB@IMAGEX_PROGNAME@ capture\fR only: capture the new WIM as a "delta" from
418 \fIWIMFILE\fR.  Any streams that would ordinarily need to be archived in the new
419 WIM are omitted if they are already present in the \fIWIMFILE\fR on which the
420 delta is being based.  The new WIM will still contain a full copy of the image
421 metadata, but this is typically only a small fraction of a WIM's total size.
422 .IP ""
423 To operate on the resulting delta WIM using other commands such as
424 \fB@IMAGEX_PROGNAME@ apply\fR, you must specify the delta WIM as the WIM file to
425 operate on, but also reference the base WIM using the \fB--ref\fR option.
426 Beware: to retain the proper functioning of the delta WIM, you can only add, not
427 delete, files and images to the base WIM following the capture of a delta from
428 it.
429 .IP ""
430 \fB--delta-from\fR may be combined with \fB--update-of\fR to increase the
431 speed of capturing a delta WIM.
432 .IP ""
433 As an example, consider the following backup and restore sequence:
434 .IP ""
435 .RS
436 .nf
437 (initial backup)
438
439 $ wimcapture /some/directory bkup-base.wim
440
441 (some days later, create second backup as delta from first)
442
443 $ wimcapture /some/directory bkup-2013-08-20.dwm \\
444         --update-of bkup-base.wim:-1 --delta-from bkup-base.wim
445
446 (restoring the second backup)
447
448 $ wimapply bkup-2013-08-20.dwm --ref=bkup-base.wim 1 \\
449         /some/directory
450 .RE
451 .fi
452 .IP ""
453 However, note that as an alternative to the above sequence that used a delta
454 WIM, the second backup could have simply been appended to the WIM as new image
455 using \fB@IMAGEX_PROGNAME@ append\fR.  Delta WIMs should be used only if it's
456 desired to base the backups or images on a separate, large file that is rarely
457 modified.
458 .IP ""
459 Note: unlike "pipable" WIMs (created with the \fB--pipable\fR option), "delta"
460 WIMs (created with the \fB--delta-from\fR option) are compatible with
461 Microsoft's software.  You can use the /ref option of imagex.exe to reference
462 the base WIM, similar to above.
463 .IP ""
464 Additional note:  \fB@IMAGEX_PROGNAME@\fR is generalized enough that you can in
465 fact combine \fB--pipable\fR and \fB--delta-from\fR to create pipable delta
466 WIMs.  In such cases, the base WIM must be captured as pipable as well as the
467 delta WIM, and when applying an image, the base WIM must be sent over the pipe
468 after the delta WIM.
469 .SH NOTES
470 \fB@IMAGEX_PROGNAME@ append\fR does not support appending an image to a split WIM.
471 .PP
472 It is safe to abort an \fB@IMAGEX_PROGNAME@ append\fR command partway through;
473 however, after doing this, it is recommended to run \fB@IMAGEX_PROGNAME@
474 optimize\fR to remove any data that was appended to the physical WIM file but
475 not yet incorporated into the structure of the WIM, unless the WIM was being
476 fully rebuilt (e.g. with \fB--rebuild\fR), in which case you should delete the
477 temporary file left over.
478 .PP
479 \fB@IMAGEX_PROGNAME@\fR creates WIMs compatible with Microsoft's software
480 (imagex.exe, Dism.exe, wimgapi.dll), with some caveats:
481 .IP \[bu] 4
482 With \fB@IMAGEX_PROGNAME@\fR on UNIX-like systems, it is possible to create a
483 WIM image containing files with names differing only in case, or files with
484 names containing the characters ':', '*', '?', '"', '<', '>', '|', or '\\',
485 which are valid on POSIX-compliant filesystems but not Windows.  Be warned that
486 such files will not be extracted by default by the Windows version of
487 \fB@IMAGEX_PROGNAME@\fR, and (even worse) Microsoft's ImageX can be confused by
488 such names and quit extracting the image partway through.  (It perhaps is worth
489 pointing out that Windows' own default filesystem, NTFS, supports these
490 characters, although Windows does not!)
491 .IP \[bu]
492 WIMs captured with \fB--unix-data\fR should be assumed to be incompatible with
493 Microsoft's software.
494 .IP \[bu]
495 Pipable WIMs are incompatible with Microsoft's software.  Pipable WIMs are
496 created only if \fIWIMFILE\fR was specified as "-" (standard output) or if
497 the \fB--pipable\fR flag was specified.
498 .SH EXAMPLES
499 First example:  Create a new WIM 'mywim.wim' with "maximum" (LZX) compression
500 that will contain a captured image of the directory tree 'somedir'.  Note that
501 \fB@IMAGEX_PROGNAME@\fR uses "maximum" (LZX) compression by default, so
502 \fB--compress\fR does \fInot\fR need to be specified; furthermore, the image
503 name need not be specified and will default to 'somedir':
504 .RS
505 .PP
506 @IMAGEX_PROGNAME@ capture somedir mywim.wim
507 .RE
508 .PP
509 or, if the \fBwimcapture\fR hard link or batch file has been installed, the
510 abbreviated form can be used:
511 .RS
512 .PP
513 wimcapture somedir mywim.wim
514 .RE
515 .PP
516 The remaining examples will use the long form, however.  Next, append the image
517 of a different directory tree to the WIM created above:
518 .RS
519 .PP
520 @IMAGEX_PROGNAME@ append anotherdir mywim.wim
521 .RE
522 .PP
523 Easy enough, and the above examples of imaging directory trees work on both
524 UNIX-like systems and Windows.  Next, capture a WIM with several non-default
525 options, including "fast" (XPRESS) compression, an integrity table, no messing
526 with absolute symbolic links, and an image name and description:
527 .RS
528 .PP
529 @IMAGEX_PROGNAME@ capture somedir mywim.wim --compress=fast \\
530 .RS
531 --check --norpfix "Some Name" "Some Description"
532 .RE
533 .RE
534 .PP
535 Capture an entire NTFS volume into a new WIM file and name the image "Windows
536 7".  On UNIX-like systems, this requires using the special mode described in
537 \fBNTFS VOLUME CAPTURE (UNIX)\fR where \fISOURCE\fR is a file or block device
538 containing an NTFS filesystem:
539 .RS
540 .PP
541 @IMAGEX_PROGNAME@ capture /dev/sda2 windows7.wim "Windows 7"
542 .RE
543 .PP
544 or, on Windows, to capture a full NTFS volume you instead need to specify the
545 root directory of the mounted volume, for example:
546 .RS
547 .PP
548 @IMAGEX_PROGNAME@ capture E:\\ windows7.wim "Windows 7"
549 .RE
550 .PP
551 Same as above example with capturing an NTFS volume from \fB@IMAGEX_PROGNAME@\fR
552 running on a UNIX-like system, but capture the WIM in the wimlib-specific
553 "pipable" format that can be piped to \fB@IMAGEX_PROGNAME@ apply\fR:
554 .RS
555 .PP
556 @IMAGEX_PROGNAME@ capture /dev/sda2 windows7.wim "Windows 7" \\
557 .br
558 .RS
559 --pipable
560 .RE
561 .RE
562 .PP
563 Same as above, but instead of writing the pipable WIM to the file
564 "windows7.wim", write it directly to standard output through a pipe into some
565 other program "someprog", which could, for example, be a program or script that
566 streams the data to a server.  Note that \fB--pipable\fR need not be explicitly
567 specified when using standard output as the WIM "file":
568 .RS
569 .PP
570 @IMAGEX_PROGNAME@ capture /dev/sda2 - "Windows 7" | someprog
571 .RE
572 .SH SEE ALSO
573 .BR @IMAGEX_PROGNAME@ (1),
574 .BR @IMAGEX_PROGNAME@-apply (1)