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