]> wimlib.net Git - wimlib/blob - doc/imagex-capture.1.in
Update version to 1.2.6
[wimlib] / doc / imagex-capture.1.in
1 .TH IMAGEX "1" "March 2013" "imagex (wimlib) wimlib @VERSION@" "User Commands"
2 .SH NAME
3 imagex-capture, imagex-append \- Capture a WIM image from a directory tree
4
5 .SH SYNOPSIS
6 \fBimagex capture\fR \fISOURCE\fR \fIWIMFILE\fR [\fIIMAGE_NAME\fR] \
7 [\fIDESCRIPTION\fR] [\fIOPTION\fR]...
8 .br
9 \fBimagex append\fR \fISOURCE\fR \fIWIMFILE\fR [\fIIMAGE_NAME\fR] \
10 [\fIDESCRIPTION\fR] [\fIOPTION\fR]...
11
12 .SH DESCRIPTION
13 .PP
14
15 The \fBimagex capture\fR and \fBimagex append\fR commands create a Windows
16 Imaging (WIM) image from a directory tree.  The \fBimagex capture\fR command
17 creates a new WIM file containing the captured image, while the \fBimagex
18 append\fR command appends the captured image to an existing WIM file.
19
20 A WIM image is an independent directory tree in the WIM file.  A WIM file may
21 contain any number of separate images.  However, files are stored only one time
22 in the entire WIM, regardless of how many images the file appears in.
23
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.  If \fISOURCE\fR is a regular file or block device, it is interpreted
27 as a NTFS volume from which a WIM image is to be captured.
28
29 \fIIMAGE_NAME\fR and \fIDESCRIPTION\fR specify the name and description of the
30 new image.  If \fIIMAGE_NAME\fR is not given, it is taken to be the same as the
31 base name of \fISOURCE\fR.  If \fIDESCRIPTION\fR is not given, no description is
32 given to the new image.
33
34 .SH NORMAL MODE
35
36 The normal image capture mode is entered when \fISOURCE\fR specifies a
37 directory.  The WIM image will be captured from the directory tree rooted at
38 this directory.  The directory may be on any type of filesystem.
39
40 In this normal image capture mode, we capture the following information from the
41 directory tree:
42
43 .IP \[bu] 4
44 The "normal" name and contents of each file and directory
45 .IP \[bu]
46 File and directory creation, access, and modification timestamps to the nearest
47 100 nanoseconds, if supported by the underlying filesystem
48 .IP \[bu]
49 Hard links and symbolic links
50
51 .PP
52
53 However, in the normal image capture mode, we do \fInot\fR capture the following
54 information from the directory tree:
55
56 .IP \[bu] 4
57 File permissions.  The resulting WIM image will not contain any security
58 descriptors because the format of the security descriptors is Windows-specific,
59 and they cannot contain UNIX file modes.  (Exception: see the \fB--unix-data\fR
60 option.)
61
62 .IP \[bu]
63 No alternate data streams will be captured, since these do not exist on
64 POSIX-compliant filesystems.  The resulting WIM image will not contain any
65 alternate data streams.
66
67 .SH NTFS MODE
68
69 A special image capture mode is entered when \fISOURCE\fR is a regular file or
70 block device.  \fISOURCE\fR is interpreted as an NTFS volume and opened using
71 libntfs-3g.  If successful, a WIM image is captured containing the contents of
72 the NTFS volume, including NTFS-specific data.
73
74 Please note that the NTFS image capture mode is \fInot\fR entered if
75 \fISOURCE\fR is a directory, even if a NTFS filesystem is mounted on
76 \fISOURCE\fR.  You must specify the NTFS volume itself (and it must be
77 unmounted, and you must have permission to read from it).
78
79 More specifically, in this mode, we capture the following types of information
80 from the NTFS volume:
81
82 .IP \[bu] 4
83 All data streams of all files, including the un-named data stream as well as all
84 named data streams.
85 .IP \[bu]
86 Reparse points, including symbolic links, junction points, and other reparse
87 points.
88 .IP \[bu]
89 File and directory creation, access, and modification timestamps from NTFS
90 inodes (these have a resolution of 100 nanoseconds).
91 .IP \[bu]
92 The security descriptor for each NTFS inode.
93 .IP \[bu]
94 File attribute flags.
95 .IP \[bu]
96 All names of all files, including names in the Win32 namespace, DOS namespace,
97 Win32+DOS namespace, and POSIX namespace.  This includes hard links.
98
99 .SH OPTIONS
100 .TP 6
101 \fB--boot\fR
102 Specifies that the new image is to be made the bootable image of the WIM archive.
103 .TP
104 \fB--check\fR
105 Include an integrity table in the new WIM file or the modified WIM file.  If
106 this option is not specified, no integrity table is included in \fIWIMFILE\fR,
107 even if there was one before in the case of \fBimagex append\fR.
108 .TP
109 \fB--compress\fR=\fITYPE\fR
110 Specifies the compression type for the new WIM file.  This flag is only valid
111 for \fBimagex capture\fR, since the compression mode for \fBimagex append\fR
112 must be the same as that of the existing WIM.  \fITYPE\fR may be "none",
113 "maximum", or "fast".  By default, it is "fast".
114
115 You may also specify the actual names of the compression algorithms, "XPRESS"
116 and "LZX", instead of "fast" and "maximum", respectively.
117 .TP
118 \fB--threads\fR=\fINUM_THREADS\fR
119 Number of threads to use for compressing data.  Default: autodetect (number of
120 processors).  Note: if creating or appending to an uncompressed WIM, additional
121 threads will not be used, regardless of this parameter, since no compression
122 needs to be done in this case.
123 .TP
124 \fB--rebuild\fR
125 For \fBimagex append\fR: rebuild the entire WIM rather than appending the new
126 data to the end of it.  Rebuilding the WIM is slower, but will save a little bit
127 of space that would otherwise be left as a hole in the WIM.  Also see \fBimagex
128 optimize\fR.
129 .TP
130 \fB--flags\fR=\fIEDITIONID\fR
131 Specify a string to use in the <FLAGS> element of the XML data for the new
132 image.
133 .TP
134 \fB--verbose\fR
135 Print the names of files and directories as they are captured, as well as a few
136 other informational messages.
137 .TP
138 \fB--dereference\fR
139 Follow symlinks; archive and dump the files they point to.  (The default is to
140 archive the symlinks themselves.)  This flag is only valid in the normal image
141 capture mode.
142 .TP
143 \fB--config\fR=\fIFILE\fR
144 Specifies a configuration file for capturing the new image.  The configuration
145 file specifies files that are to be treated specially during the image capture.
146
147 The format of the configuration file is a number of sections containing file
148 globs one per line, where each section begins with the tag [ExclusionList],
149 [ExclusionException], [CompressionExclusionList], or [AlignmentList].
150 Currently, only the [ExclusionList] and [ExclusionException] sections are
151 implemented.  The [ExclusionList] section specifies a list of file globs to
152 exclude from capture, while the [ExclusionException] section specifies a list of
153 file globs to include in the capture even if the matched file or directory name
154 also appears in the [ExclusionList].
155
156 Relative globs with only one path component match against a filename in any
157 directory.  Relative globs with multiple path components, as well as absolute
158 globs, are treated as paths starting at the root directory of capture, or the
159 root of the NTFS volume for NTFS capture mode.  If a directory is matched by a
160 glob in the [ExclusionList], the entire directory tree rooted at that directory
161 is excluded from the capture, unless \fB--dereference\fR is specified and there
162 is another path into that directory through a symbolic link.
163
164 For compatibility with Windows, the path separators in the globs may be either
165 forward slashes or backslashes, and the line separators may be either UNIX-style
166 or DOS-style.  However, globs with spaces in them currently must not be quoted.
167 Empty lines are ignored.
168
169 If this option is not specified the following default configuration file is
170 used:
171
172 .RS
173 .RS
174 .PP
175 .nf
176 [ExclusionList]
177 \\$ntfs.log
178 \\hiberfil.sys
179 \\pagefile.sys
180 \\System Volume Information
181 \\RECYCLER
182 \\Windows\\CSC
183
184 [CompressionExclusionList]
185 *.mp3
186 *.zip
187 *.cab
188 \\WINDOWS\\inf\\*.pnf
189 .RE
190 .RE
191
192 .TP
193 \fB--unix-data\fR
194 Store the UNIX owner, group, and mode of regular files, symbolic links, and
195 directories.  This is done by adding a special alternate data stream to each
196 directory entry that contains this information.  Please note that this flag is
197 for convenience only, in case you want to use \fBimagex\fR to archive files on
198 UNIX.  Microsoft's software will not understand this special information.
199
200 .SH NOTES
201
202 \fBimage append\fR does not support appending an image to a split WIM.
203
204 The two different capture modes only specify the data that is captured and don't
205 specify a special WIM format.  A WIM file can contain images captured using
206 different modes.  However, all images in a WIM must have the same compression
207 type, and \fBimagex\fR always enforces this.
208
209 \fBimagex\fR writes WIMs having the version number 0x10d00 and a compressed
210 stream chunk size of 32768.  The only WIMs I've seen that are different from
211 this are some pre-Vista WIMs that had a different version number.
212
213 Unless \fB--rebuild\fR is specified, aborting an \fBimagex append\fR command
214 mid-way through has a small chance of corrupting the WIM file.  However, a
215 precaution is taken against this, so it should be very unlikely.  In the event
216 of an aborted \fBimagex append\fR, \fBimagex optimize\fR may be run to remove
217 extra data that may have been partially appended to the physical WIM file but
218 not yet incorporated into the structure of the WIM.
219
220 Capturing or appending an image happens in two main phases: (1) scanning the
221 directory or NTFS volume to checksum all the files and determine the streams to
222 be written, and (2) writing the new streams to the WIM file.  Streams are not
223 stored in memory after (1), since there could easily be gigabytes of data;
224 instead, they are read again during step (2); however, duplicate streams in the
225 image, and streams already existing in any other image in the WIM, are not read
226 again.  In the future, it may be possible to introduce the ability to capture an
227 image with reading each file only one time, although this mode would have some
228 limitations--- for example, a stream might be compressed only to be thrown away
229 as a duplicate once it's been checksummed.
230
231 .SH EXAMPLES
232 Create a new WIM 'mywim.wim' from the directory 'somedir', using LZX compression and
233 including an integrity table:
234 .RS
235 .PP
236 imagex capture somedir mywim.wim --compress=maximum --check
237 .RE
238 .PP
239 Append an image to the WIM we just captured, but do it from a NTFS volume on the
240 partition /dev/sda2, and name the image "Windows 7" and give it a description.
241 You do not need to specify the compression type, because the WIM already is
242 using LZX compression and this cannot be changed.  You need to specify
243 \fB--check\fR if you don't want the integrity table to be discarded.
244 .RS
245 .PP
246 imagex append /dev/sda2 mywim.wim --check "Windows 7" "Warning: This operating
247 system has been approved by Bill Gates"
248 .RE
249 .PP
250
251 .SH SEE ALSO
252 .BR imagex (1)
253