]> wimlib.net Git - wimlib/blob - doc/imagex-capture.1.in
Update version number and NEWS
[wimlib] / doc / imagex-capture.1.in
1 .TH IMAGEX "1" "November 2012" "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.
60 .IP \[bu]
61 No alternate data streams will be captured, since these do not exist on
62 POSIX-compliant filesystems.  The resulting WIM image will not contain any
63 alternate data streams.
64
65 .SH NTFS MODE
66
67 A special image capture mode is entered when \fISOURCE\fR is a regular file or
68 block device.  \fISOURCE\fR is interpreted as an NTFS volume and opened using
69 libntfs-3g.  If successful, a WIM image is captured containing the contents of
70 the NTFS volume, including NTFS-specific data.
71
72 Please note that the NTFS image capture mode is \fInot\fR entered if
73 \fISOURCE\fR is a directory, even if a NTFS filesystem is mounted on
74 \fISOURCE\fR.  You must specify the NTFS volume itself (and it must be
75 unmounted, and you must have permission to read from it).
76
77 More specifically, in this mode, we capture the following types of information
78 from the NTFS volume:
79
80 .IP \[bu] 4
81 All data streams of all files, including the un-named data stream as well as all
82 named data streams.
83 .IP \[bu]
84 Reparse points, including symbolic links, junction points, and other reparse
85 points.
86 .IP \[bu]
87 File and directory creation, access, and modification timestamps from NTFS
88 inodes (these have a resolution of 100 nanoseconds).
89 .IP \[bu]
90 The security descriptor for each NTFS inode.
91 .IP \[bu]
92 File attribute flags.
93 .IP \[bu]
94 All names of all files, including names in the Win32 namespace, DOS namespace,
95 Win32+DOS namespace, and POSIX namespace.  This includes hard links.
96
97 .SH OPTIONS
98 .TP 6
99 \fB--boot\fR
100 Specifies that the new image is to be made the bootable image of the WIM archive.
101 .TP
102 \fB--check\fR
103 Include an integrity table in the new WIM file or the modified WIM file.  If
104 this option is not specified, no integrity table is included in \fIWIMFILE\fR,
105 even if there was one before in the case of \fBimagex append\fR.
106 .TP
107 \fB--compress\fR=\fITYPE\fR
108 Specifies the compression type for the new WIM file.  This flag is only valid
109 for \fBimagex capture\fR, since the compression mode for \fBimagex append\fR
110 must be the same as that of the existing WIM.  \fITYPE\fR may be "none",
111 "maximum", or "fast".  By default, it is "fast".
112
113 You may also specify the actual names of the compression algorithms, "XPRESS"
114 and "LZX", instead of "fast" and "maximum", respectively.
115 .TP
116 \fB--threads\fR=\fINUM_THREADS\fR
117 Number of threads to use for compressing data.  Default: autodetect (number of
118 processors).  Note: if creating or appending to an uncompressed WIM, additional
119 threads will not be used, regardless of this parameter, since no compression
120 needs to be done in this case.
121 .TP
122 \fB--flags\fR=\fIEDITIONID\fR
123 Specify a string to use in the <FLAGS> element of the XML data for the new
124 image.
125 .TP
126 \fB--verbose\fR
127 Print the names of files and directories as they are captured, as well as a few
128 other informational messages.
129 .TP
130 \fB--dereference\fR
131 Follow symlinks; archive and dump the files they point to.  (The default is to
132 archive the symlinks themselves.)  This flag is only valid in the normal image
133 capture mode.
134 .TP
135 \fB--config\fR=\fIFILE\fR
136 Specifies a configuration file for capturing the new image.  The configuration
137 file specifies files that are to be treated specially during the image capture.
138
139 The format of the configuration file is a number of sections containing file
140 globs one per line, where each section begins with the tag [ExclusionList],
141 [ExclusionException], [CompressionExclusionList], or [AlignmentList].
142 Currently, only the [ExclusionList] and [ExclusionException] sections are
143 implemented.  The [ExclusionList] section specifies a list of file globs to
144 exclude from capture, while the [ExclusionException] section specifies a list of
145 file globs to include in the capture even if the matched file or directory name
146 also appears in the [ExclusionList].
147
148 Relative globs with only one path component match against a filename in any
149 directory.  Relative globs with multiple path components, as well as absolute
150 globs, are treated as paths starting at the root directory of capture, or the
151 root of the NTFS volume for NTFS capture mode.  If a directory is matched by a
152 glob in the [ExclusionList], the entire directory tree rooted at that directory
153 is excluded from the capture, unless \fB--dereference\fR is specified and there
154 is another path into that directory through a symbolic link.
155
156 For compatibility with Windows, the path separators in the globs may be either
157 forward slashes or backslashes, and the line separators may be either UNIX-style
158 or DOS-style.  However, globs with spaces in them currently must not be quoted.
159 Empty lines are ignored.
160
161 If this option is not specified the following default configuration file is
162 used:
163
164 .RS
165 .RS
166 .PP
167 .nf
168 [ExclusionList]
169 \\$ntfs.log
170 \\hiberfil.sys
171 \\pagefile.sys
172 \\System Volume Information
173 \\RECYCLER
174 \\Windows\\CSC
175
176 [CompressionExclusionList]
177 *.mp3
178 *.zip
179 *.cab
180 \\WINDOWS\\inf\\*.pnf
181 .RE
182 .RE
183
184 .SH NOTES
185
186 \fBimage append\fR does not support appending an image to a split WIM.
187
188 The two different capture modes only specify the data that is captured and don't
189 specify a special WIM format.  A WIM file can contain images captured using
190 different modes.  However, all images in a WIM must have the same compression
191 type, and \fBimagex\fR always enforces this.
192
193 \fBimagex\fR writes WIMs having the version number 0x10d00 and a compressed
194 stream chunk size of 32768.  The only WIMs I've seen that are different from
195 this are some pre-Vista WIMs that had a different version number.
196
197 .SH EXAMPLES
198 Create a new WIM 'mywim.wim' from the directory 'somedir', using LZX compression and
199 including an integrity table:
200 .RS
201 .PP
202 imagex capture somedir mywim.wim --compress=maximum --check
203 .RE
204 .PP
205 Append an image to the WIM we just captured, but do it from a NTFS volume on the
206 partition /dev/sda2, and name the image "Windows 7" and give it a description.
207 You do not need to specify the compression type, because the WIM already is
208 using LZX compression and this cannot be changed.  You need to specify --check
209 if you don't want the integrity table to be discarded.
210 .RS
211 .PP
212 imagex append /dev/sda2 mywim.wim --check "Windows 7" "Warning: This operating
213 system has been approved by Bill Gates"
214 .RE
215 .PP
216
217 .SH SEE ALSO
218 .BR imagex (1)
219