]> wimlib.net Git - wimlib/blob - doc/imagex-update.1.in
Update version number to 1.4.0; update NEWS
[wimlib] / doc / imagex-update.1.in
1 .TH IMAGEX "1" "May 2013" "@IMAGEX_PROGNAME@ @VERSION@" "User Commands"
2 .SH NAME
3 @IMAGEX_PROGNAME@-update \- Update a WIM image
4
5 .SH SYNOPSIS
6 \fB@IMAGEX_PROGNAME@ update\fR \fIWIMFILE\fR [\fIIMAGE\fR] [\fIOPTION\fR...] < \fICMDFILE\fR
7
8 .SH DESCRIPTION
9 .PP
10
11 \fB@IMAGEX_PROGNAME@ update\fR modifies the specified \fIIMAGE\fR in the Windows
12 Imaging (WIM) file \fIWIMFILE\fR by adding, deleting, or renaming files or
13 directories in it.
14
15 \fIIMAGE\fR specifies the image in \fIWIMFILE\fR to update.  It may be a 1-based
16 index of an image in the WIM or the name of an image in the WIM.  Use the
17 \fB@IMAGEX_PROGNAME@ info\fR (1) command to list the images a WIM file contains.
18 \fIIMAGE\fR may be omitted if \fIWIMFILE\fR contains only one image.
19
20 The modifications to perform on the WIM image are specified as a sequence of
21 commands, one per line, read in a text file from standard input.  It is
22 recommended that standard input be redirected from a file (\fICMDFILE\fR), as
23 shown above, rather than typing in commands interactively.
24
25 .SH AVAILABLE COMMANDS
26
27 This section documents the commands that may appear in the \fICMDFILE\fR
28 described above.
29
30 .SS \fBadd\fR [\fIOPTION\fR...] \fISOURCE\fR \fIDESTINATION\fR
31 Add a file or directory tree to the WIM image.  \fISOURCE\fR must specify the
32 path to a file or directory on your filesystem.  \fIDESTINATION\fR must specify
33 the path inside the WIM image at which to add the file or directory tree.  If
34 \fIDESTINATION\fR already exists in the WIM image, then an overlay is attempted
35 if it is a directory; this feature can be used to add multiple files to an
36 existing directory in the WIM image in one command.  If \fIDESTINATION\fR does
37 not exist in the WIM image, then any prerequisite directories are created as
38 needed to add the \fISOURCE\fR at that location.
39
40 The available options for the \fBadd\fR command are:
41
42 .TP 6
43 \fB--verbose\fR
44 Print the names of files as they are captured.
45 .TP
46 \fB--dereference\fR
47 (UNIX only) Follow symbolic links and archive the files they point to, rather
48 than archiving the links themselves.
49 .TP
50 \fB--unix-data\fR
51 (UNIX only) Store the UNIX owner, group, and mode of all captured files.  This
52 is done by adding a special alternate data stream to each directory entry that
53 contains this information.  Please note that this flag is for convenience only,
54 in case you want to use \fB@IMAGEX_PROGNAME@\fR to archive files on UNIX.
55 Microsoft's software will not understand this special information.
56 .TP
57 \fB--no-acls\fR
58 (Windows only) Do not capture files' security descriptors.
59 .TP
60 \fB--strict-acls\fR
61 (Windows only) Fail immediately if the full security descriptor of any file
62 cannot be read.  The default behavior without this option is to first try
63 omitting the SACL from the security descriptor, then to try omitting the
64 security descriptor entirely.  The purpose of this is to capture as much data as
65 possible without always requiring Administrator privileges.  However, if you
66 desire that all security descriptors be captured exactly, you may wish to
67 provide this option, although the Administrator should have permission to read
68 everything anyway.
69
70 .SS \fBdelete\fR [\fIOPTION\fR...] \fIPATH\fR
71 Deletes a file or directory tree from the WIM image.  \fIPATH\fR must specify the
72 path inside the WIM image of the file or directory tree to delete.
73
74 The available options for the \fBdelete\fR command are:
75
76 .TP 6
77 \fB--force\fR
78 Do not issue an error if the path to delete does not exist.
79 .TP
80 \fB--recursive\fR
81 Delete the file or directory tree recursively; if not specified, an error is
82 issued if the path to delete is a directory.
83
84 .SS \fBrename\fR \fIOLD_PATH\fR \fINEW_PATH\fR
85 Renames a file or directory tree inside the WIM image.  \fIOLD_PATH\fR must
86 specify the old path of the file or directory tree inside the WIM image, and
87 \fINEW_PATH\fR must specify the new path for the file or directory tree.  This
88 command follows the semantics of the POSIX \fBrename\fR (3) function; in
89 particular, a pre-existing file at \fINEW_PATH\fR will be deleted if present,
90 except in certain cases such as attempting to rename a directory to a
91 non-directory, which is not allowed.
92
93 There are no options available for the \fBrename\fR command.
94
95 .SH OPTIONS
96
97 The following options are accepted on the command line by \fB@IMAGEX_PROGNAME@
98 update\fR itself:
99
100 .TP 6
101 \fB--verbose\fR
102 Use \fB--verbose\fR for all \fBadd\fR commands.
103 .TP
104 \fB--dereference\fR
105 Use \fB--dereference\fR for all \fBadd\fR commands.
106 .TP
107 \fB--unix-data\fR
108 Use \fB--unix-data\fR for all \fBadd\fR commands.
109 .TP
110 \fB--no-acls\fR
111 Use \fB--no-acls\fR for all \fBadd\fR commands.
112 .TP
113 \fB--strict-acls\fR
114 Use \fB--strict-acls\fR for all \fBadd\fR commands.
115 .TP
116 \fB--config\fR=\fIFILE\fR
117 Set the capture configuration file for all \fBadd\fR commands.  See the
118 description of this option in \fB@IMAGEX_PROGNAME@-capture\fR (1).
119 .TP
120 \fB--force\fR
121 Use \fB--force\fR for all \fBdelete\fR commands.
122 .TP
123 \fB--recursive\fR
124 Use \fB--recursive\fR for all \fBdelete\fR commands.
125 .TP
126 \fB--check\fR
127 When reading \fIWIMFILE\fR, verify its integrity if the integrity table is
128 present; in addition, include an integrity table in the updated WIM.  If this
129 option is not specified, no integrity table is included in the updated WIM, even
130 if there was one in the original WIM.
131 .TP
132 \fB--threads\fR=\fINUM_THREADS\fR
133 Number of threads to use for compressing newly added files.  Default: autodetect
134 (number of processors).
135 .TP
136 \fB--rebuild\fR
137 Rebuild the entire WIM rather than appending the updated data to the end of it.
138 Rebuilding the WIM is slower, but will save a little bit of space that would
139 otherwise be left as a hole in the WIM.  Also see
140 \fB@IMAGEX_PROGNAME@-optimize\fR (1).
141
142 .SH NOTES
143
144 \fB@IMAGEX_PROGNAME@ update\fR is partly redundant with \fB@IMAGEX_PROGNAME@
145 mountrw\fR, since if a WIM image can be mounted read-write, then there
146 theoretically is no need for \fB@IMAGEX_PROGNAME@ update\fR.  The main advantage
147 of \fB@IMAGEX_PROGNAME@ update\fR is that it works on both UNIX and Windows,
148 whereas \fB@IMAGEX_PROGNAME@ mountrw\fR only works on UNIX.
149
150 Symbolic links inside a WIM image are not dereferenced when being interpreted.
151 So, for example, if you have a WIM image that contains a symbolic link
152 "/Documents and Settings" -> "/Users" where "/Users" is a directory, then a
153 subdirectory named "Public" in this directory must be specified as
154 "/Users/Public" rather than "/Documents and Settings/Public".
155
156 All paths to files or directories within the WIM image must be specified
157 relative to the root of the image.  However, the leading slash is optional, and
158 both forward slashes and backslashes are accepted.
159
160 The command file (\fICMDFILE\fR) is parsed by \fB@IMAGEX_PROGNAME@ update\fR
161 itself and not by the system shell.  Therefore, its syntax is limited.  However,
162 comment lines beginning with '#' are allowed, and it is also possible to quote
163 arguments with whitespace inside them.
164
165 On UNIX, you cannot use \fB@IMAGEX_PROGNAME@ update\fR to add files to an image
166 directly from a NTFS volume using libntfs-3g, even though \fB@IMAGEX_PROGNAME@
167 capture\fR supports capturing a full image this way.
168
169 It is safe to abort an \fB@IMAGEX_PROGNAME@ update\fR command partway through;
170 however, after doing this, it is recommended to run \fB@IMAGEX_PROGNAME@
171 optimize\fR to remove any data that was appended to the physical WIM file but
172 not yet incorporated into the structure of the WIM, unless \fB--rebuild\fR was
173 specified, in which case you should delete the temporary file left over.
174
175 .SH EXAMPLES
176
177 All the examples below show the update command file to be created as well as the
178 \fB@IMAGEX_PROGNAME@ update\fR command to run to perform the updates.
179
180 Delete two files from a WIM image:
181
182 .RS
183 \fIupdate_commands.txt\fR:
184 .RS
185 .PP
186 .nf
187 delete /setup.exe
188 delete /sources/setup.exe
189 .fi
190 .RE
191 .RE
192
193 .RS
194 $ @IMAGEX_PROGNAME@ update boot.wim 2 < update_commands.txt
195 .RE
196
197 Add some files and directories to a WIM image.  Note that the first path of each
198 \fBadd\fR command specifies the files to add, while the second path of each
199 \fBadd\fR command specify the locations at which to to add them inside the WIM
200 image:
201
202 .RS
203 \fIupdate_commands.txt\fR:
204 .RS
205 .PP
206 .nf
207 add somedir     /dir
208 add somefile    /dir/file
209 .fi
210 .RE
211 .RE
212
213 .RS
214 $ @IMAGEX_PROGNAME@ update boot.wim 2 < update_commands.txt
215 .RE
216
217 Rename a file inside a WIM image.
218
219 .RS
220 \fIupdate_commands.txt\fR:
221 .RS
222 .PP
223 .nf
224 rename /dir_in_wim/oldfile.txt /dir_in_wim/newfile.txt
225 .fi
226 .RE
227 .RE
228
229 .RS
230 $ @IMAGEX_PROGNAME@ update boot.wim 2 < update_commands.txt
231 .RE
232
233 Using additional features, such as comments, options, and overlays, and
234 including an integrity table in the updated WIM:
235
236 .RS
237 \fIupdate_commands.txt\fR:
238 .RS
239 .PP
240 .nf
241 #
242 # This file specifies some changes to make to a WIM image.
243 #
244
245 # Add a new directory containing files I want in the image.
246 # The quotes are necessary because the directory name
247 # contains a space.
248 add "My Directory" "/My Directory"
249
250 # Add the contents of "Another Directory" to the
251 # "/My Directory" we just created in the WIM image.  Since
252 # the destination path already exists, this performs an
253 # overlay.
254 add "Another Directory" "/My Directory"
255
256 # Rename some file for some reason.
257 rename /dir_in_wim/oldfile.txt /dir_in_wim/newfile.txt
258
259 # Delete an unwanted directory.
260 delete --recursive /Users/Me/Documents/Junk
261 .fi
262 .RE
263 .RE
264
265 .RS
266 $ @IMAGEX_PROGNAME@ update boot.wim 2 --check < update_commands.txt
267 .RE
268
269 .SH SEE ALSO
270 .BR @IMAGEX_PROGNAME@ (1)
271 .BR @IMAGEX_PROGNAME@-capture (1)
272 .BR @IMAGEX_PROGNAME@-info (1)
273 .BR @IMAGEX_PROGNAME@-mountrw (1)
274 .BR @IMAGEX_PROGNAME@-optimize (1)