.TH IMAGEX "1" "May 2013" "@IMAGEX_PROGNAME@ @VERSION@" "User Commands"
.SH NAME
@IMAGEX_PROGNAME@-apply \- Extract one image, or all images, from a WIM archive
-
.SH SYNOPSIS
\fB@IMAGEX_PROGNAME@ apply\fR \fIWIMFILE\fR [\fIIMAGE\fR] \fITARGET\fR [\fIOPTION\fR...]
-
.SH DESCRIPTION
-.PP
-
\fB@IMAGEX_PROGNAME@ apply\fR extracts an image, or all images, from the Windows
Imaging (WIM) file \fIWIMFILE\fR.
-
+.PP
This command is designed to extract, or "apply", one or more full WIM images.
If you instead want to extract only certain files or directories contained in a
WIM image, consider using \fB@IMAGEX_PROGNAME@ extract\fR or
\fB@IMAGEX_PROGNAME@ mount\fR instead.
-
+.PP
\fIIMAGE\fR specifies the WIM image to extract. It may be a 1-based index of an
image in the WIM, the name of an image in the WIM, or the keyword "all" to
indicate that all images are to be extracted. Use the \fB@IMAGEX_PROGNAME@
info\fR (1) command to show what images a WIM file contains. \fIIMAGE\fR may be
omitted if \fIWIMFILE\fR contains only one image.
-
+.PP
\fITARGET\fR specifies where to extract the WIM image(s) to. If \fITARGET\fR
specifies a directory, the WIM image(s) are extracted to that directory. If
\fITARGET\fR specifies a non-existent file, a directory is created in that
location and the WIM image(s) are extracted to that directory. Alternatively,
on UNIX only, if \fITARGET\fR specifies a regular file or block device, it is
interpreted as an NTFS volume to which the WIM image is to be extracted.
-
+.PP
\fB@IMAGEX_PROGNAME@ apply\fR supports applying images from stand-alone WIMs as
well as split WIMs. See \fBSPLIT WIMS\fR.
-
.SH NORMAL MODE (UNIX)
-
This section documents how files are extracted on UNIX from the WIM image to a
directory. See \fBWINDOWS VERSION\fR for the corresponding documentation for
the Windows version.
-
+.PP
On UNIX, the "normal" extraction mode is entered when \fITARGET\fR is a
directory or non-existent file. If a single WIM image is being extracted, it is
extracted with the root directory of the image corresponding to the directory
extracted into subdirectories of \fITARGET\fR that are be named after the image
names, falling back to the image index for an image with no name. \fITARGET\fR
can specify a directory on any type of filesystem.
-
+.PP
In the "normal" mode of extraction on UNIX, the following information is
extracted from the WIM image(s):
-
.IP \[bu] 4
The default (unnamed) data stream of each file
.IP \[bu]
Symbolic links and junction points. Drive letters will be stripped.
(Note: see \fB--rpfix\fR and \fB--norpfix\fR for documentation on how absolute
symbolic links and junctions are applied.)
-
.PP
However, in the "normal" mode of extraction on UNIX, the following information
will \fInot\fR be extracted from the WIM image(s):
-
.IP \[bu] 4
Security descriptors (file permissions) except through the extensions available
through the \fB--unix-data\fR option
Certain file attributes such as compression, encryption, and sparseness.
.IP \[bu]
Short (DOS) names for files
-
.SH NTFS MODE (UNIX)
-
This section documents how files are extracted directly to an NTFS volume image
on UNIX. See \fBWINDOWS VERSION\fR for the corresponding documentation for the
Windows version.
-
+.PP
On UNIX, a special extraction mode is entered when \fITARGET\fR is a regular
file or block device. If this is the case, \fITARGET\fR is interpreted as an
NTFS volume and opened using libntfs-3g. If successful, the WIM image is
extracted to the root of the NTFS volume in a special mode that preserves all
information contained in the WIM image. \fIIMAGE\fR may not be "all" for this
action.
-
+.PP
The NTFS volume does not need to be empty, although it's expected that it be
empty for the intended use cases. A new NTFS filesystem can be created using
the \fBmkntfs\fR (8) command.
-
+.PP
The NTFS extraction mode is not available if wimlib was compiled using the
\fB--without-ntfs-3g\fR option.
-
+.PP
Please note that the NTFS extraction mode is \fInot\fR entered if \fITARGET\fR
is a directory, even if an NTFS filesystem is mounted on \fITARGET\fR. You must
specify the NTFS volume itself (and it must be unmounted, and you must have
permission to write to it).
-
+.PP
In the NTFS extraction mode on UNIX, the following information will be extracted
from the WIM image:
-
.IP \[bu] 4
The data streams of all files, including the un-named data stream as well as all
named data streams.
Short (DOS) names for files are extracted. The corresponding long name for each
DOS name is made to be a Win32 name. Any additional names for the file in the
same directory are made to be names in the POSIX namespace.
-
.PP
However, the extraction of encrypted files is not supported in this mode.
.PP
But in order to actually boot Windows from an applied image, you must understand
the boot process of Windows versions Vista and later. Basically, it is the
following:
-
.nr step 1 1
.IP \n[step]. 3
The Master Boot Record loads the Volume Boot Record (also called the Boot
Based on the information contained in the Boot Configuration Data, a loader for
the Windows kernel is executed from the "Boot" partition, which is where Windows
is installed.
-
.PP
-
So let's say you applied an image from an existing "install.wim" as in the
example, or you've applied a custom Windows image that you've created using the
\fB@IMAGEX_PROGNAME@ capture\fR (1) command. You've just applied the "Boot" partition, or
the main Windows partition, but there is no "System" partition yet (i.e. no
\\BOOTMGR and no \\Boot\\BCD).
-
+.PP
A "System" partition can be created created by running the "bcdboot.exe" program
from within Windows or Windows PE. Alternatively, you can capture a separate
WIM image containing the "System" partition. Or, the "System" partition may the
configuration, a WIM containing it can only be used on systems where you are
setting up the same bootloader configuration, including the same partition
layout.
-
+.PP
Besides setting up the files on the "System" partition, don't forget to set the
bootable flag on it, and have a master boot record that loads the bootable
partition (Windows' MBR does, and SYSLINUX provides an equivalent MBR).
-
-.SH SPLIT WIMS
-
-You may use \fB@IMAGEX_PROGNAME@ apply\fR to apply images from a split WIM. The
-\fIWIMFILE\fR argument is used to specify the first part of the split WIM, and
-the \fB--refs\fR="\fIGLOB\fR" option is used to provide a shell-style file glob
-that specifies the additional parts of the split WIM. \fIGLOB\fR is expected to
-be a single string on the command line, so \fIGLOB\fR must be quoted so that it
-is protected against shell expansion. \fIGLOB\fR must expand to all parts of
-the split WIM, except optionally the first part which may either omitted or
-included in the glob (but the first part MUST be specified as \fIWIMFILE\fR as
-well).
-
-Here's an example. The names for the split WIMs usually go something like:
-
-.RS
-.PP
-.nf
-mywim.swm
-mywim2.swm
-mywim3.swm
-mywim4.swm
-mywim5.swm
-.RE
-.nf
-
-To apply the first image of this split WIM to the directory "dir", run:
-.PP
-.RS
-@IMAGEX_PROGNAME@ apply mywim.swm 1 dir --ref="mywim*.swm"
-.RE
-.PP
-
.SH WINDOWS VERSION
-
The Windows version of \fB@IMAGEX_PROGNAME@ apply\fR acts similarly to the
corresponding command of Microsoft's ImageX. For best results, the target
directory should be on an NTFS volume and you should be running with
Administrator privileges; however, non-NTFS filesystems and running without
Administrator privileges are also supported.
-
+.PP
On Windows, \fB@IMAGEX_PROGNAME@ apply\fR tries to extract as much data as
possible. This includes:
-
.IP \[bu] 4
All data streams of all files. This includes the default file contents, as well
as named data streams if supported by the filesystem.
considered an error condition.
.IP \[bu]
Hard links, if supported by the filesystem.
-
.PP
Note: encrypted files will be extracted as raw encrypted data if the filesystem
does not support encryption. Compressed files and directories (with the
compression attribute set) will be extracted as uncompressed if the filesystem
does not support transparent compression.
-
+.SH SPLIT WIMS
+You may use \fB@IMAGEX_PROGNAME@ apply\fR to apply images from a split WIM. The
+\fIWIMFILE\fR argument is used to specify the first part of the split WIM, and
+the \fB--refs\fR="\fIGLOB\fR" option is used to provide a shell-style file glob
+that specifies the additional parts of the split WIM. \fIGLOB\fR is expected to
+be a single string on the command line, so \fIGLOB\fR must be quoted so that it
+is protected against shell expansion. \fIGLOB\fR must expand to all parts of
+the split WIM, except optionally the first part which may either omitted or
+included in the glob (but the first part MUST be specified as \fIWIMFILE\fR as
+well).
+.PP
+Here's an example. The names for the split WIMs usually go something like:
+.RS
+.PP
+.nf
+mywim.swm
+mywim2.swm
+mywim3.swm
+mywim4.swm
+mywim5.swm
+.RE
+.nf
+.PP
+To apply the first image of this split WIM to the directory "dir", run:
+.PP
+.RS
+@IMAGEX_PROGNAME@ apply mywim.swm 1 dir --ref="mywim*.swm"
+.RE
+.PP
.SH OPTIONS
.TP 6
\fB--check\fR
of extraction prepended to their targets. The intention is that you can apply
an image containing absolute symbolic links and still have them be valid after
it has been applied to any location.
-
+.IP "" 6
The default behavior is \fB--rpfix\fR if any images in \fIWIMFILE\fR have been
captured with reparse-point fixups done. Otherwise, it is \fB--norpfix\fR.
-
+.IP "" 6
Reparse point fixups are never done in the NTFS extraction mode on UNIX.
.TP
\fB--verbose\fR
we do not have permission to set the desired one. On UNIX: with
\fB--unix-data\fR, fail immediately if the UNIX owner, group, or file mode on an
extracted file cannot be set for any reason.
-
.SH NOTES
-
\fB@IMAGEX_PROGNAME@ apply\fR calculates the SHA1 message digest of every file stream it
extracts and verifies that it is the same as the SHA1 message digest provided in
the WIM file. It is an error if the message digests don't match. It's also
table of the WIM, which provides SHA1 message digests over raw chunks of the
entire WIM file and is checked separately if the \fB--check\fR option is
specified.
-
+.PP
You cannot use \fB@IMAGEX_PROGNAME@ apply\fR to apply a WIM from a pipe (such as standard
input) because the WIM file format is not designed for this.
-
.SH EXAMPLES
.SS Applying a WIM image to a directory (both UNIX and Windows)
Extract the first image from the Windows PE image from the Windows Vista/7/8
.PP
mkntfs /dev/sda2 && @IMAGEX_PROGNAME@ apply /media/windows/sources/install.wim 1 /dev/sda2
.RE
-.PP
-
.SH SEE ALSO
.BR @IMAGEX_PROGNAME@ (1)
.BR @IMAGEX_PROGNAME@-extract (1)
.TH IMAGEX "1" "May 2013" "@IMAGEX_PROGNAME@ @VERSION@" "User Commands"
.SH NAME
@IMAGEX_PROGNAME@-capture, @IMAGEX_PROGNAME@-append \- Create or append a WIM image
-
.SH SYNOPSIS
\fB@IMAGEX_PROGNAME@ capture\fR \fISOURCE\fR \fIWIMFILE\fR [\fIIMAGE_NAME\fR] \
[\fIIMAGE_DESCRIPTION\fR] [\fIOPTION\fR...]
.br
\fB@IMAGEX_PROGNAME@ append\fR \fISOURCE\fR \fIWIMFILE\fR [\fIIMAGE_NAME\fR \
[\fIIMAGE_DESCRIPTION\fR]] [\fIOPTION\fR...]
-
.SH DESCRIPTION
-.PP
-
The \fB@IMAGEX_PROGNAME@ capture\fR and \fB@IMAGEX_PROGNAME@ append\fR commands
create a Windows Imaging (WIM) image from a directory tree. The
\fB@IMAGEX_PROGNAME@ capture\fR command creates a new WIM file containing the
captured image, while the \fB@IMAGEX_PROGNAME@ append\fR command appends the
captured image to an existing WIM file.
-
+.PP
A WIM image is an independent directory tree in the WIM file. A WIM file may
contain any number of separate images. However, files are stored only one time
in the entire WIM, regardless of how many images the file appears in.
-
+.PP
\fISOURCE\fR specifies the location of the files to create the new WIM image
from. If \fISOURCE\fR is a directory, the WIM image is captured from that
directory. Alternatively, if the \fB--source-list\fR option is given,
alternatively, only on UNIX builds of wimlib if \fISOURCE\fR is a
regular file or block device, it is interpreted as an NTFS volume from
which a WIM image is to be captured.
-
+.PP
\fIIMAGE_NAME\fR and \fIIMAGE_DESCRIPTION\fR specify the name and description of
the new image. If \fIIMAGE_NAME\fR is not given, it is taken to be the same as
the base name of \fISOURCE\fR. If \fIIMAGE_DESCRIPTION\fR is not given, no
description is given to the new image.
-
.SH NORMAL MODE (UNIX)
-
This section documents how files are captured from a directory on UNIX. See
\fBWINDOWS VERSION\fR for the corresponding documentation for the Windows
version.
-
+.PP
On UNIX, the "normal" image capture mode is entered when \fISOURCE\fR specifies
a directory. The WIM image will be captured from the directory tree rooted at
this directory. The directory may be on any type of filesystem.
-
+.PP
In this mode, the following information is captured from the directory tree:
-
.IP \[bu] 4
The "normal" name and contents of each file and directory
.IP \[bu]
100 nanoseconds, if supported by the underlying filesystem
.IP \[bu]
Hard links and symbolic links
-
.PP
-
However, in this mode, the following information is \fInot\fR captured from the
directory tree:
-
.IP \[bu] 4
UNIX file owners, groups, and modes. The resulting WIM image will contain no
security information (file permissions). (Exception: see the \fB--unix-data\fR
option.)
.IP \[bu]
Extended attributes.
-
.SH NTFS MODE (UNIX)
-
This section documents how files are captured from an NTFS volume image on UNIX.
See \fBWINDOWS VERSION\fR for the corresponding documentation for the Windows
version.
-
+.PP
On UNIX, a special image capture mode is entered when \fISOURCE\fR is a regular
file or block device. \fISOURCE\fR is interpreted as an NTFS volume and opened
using libntfs-3g. If successful, a WIM image is captured containing the
contents of the NTFS volume, including NTFS-specific data.
-
+.PP
Please note that the NTFS image capture mode is \fInot\fR entered if
\fISOURCE\fR is a directory, even if an NTFS filesystem is mounted on
\fISOURCE\fR. You must specify the NTFS volume itself (and it must be
unmounted, and you must have permission to read from it).
-
+.PP
More specifically, in this mode, the following types of information are captured
from the NTFS volume:
-
.IP \[bu] 4
All data streams of all files, including the un-named data stream as well as all
named data streams.
.IP \[bu]
All names of all files, including names in the Win32 namespace, DOS namespace,
Win32+DOS namespace, and POSIX namespace. This includes hard links.
-
.SH WINDOWS VERSION
-
The Windows versions of \fB@IMAGEX_PROGNAME@ capture\fR and \fB@IMAGEX_PROGNAME@
append\fR act similarly to the corresponding commands of Microsoft's ImageX.
For best results, the directory being captured should be on an NTFS volume and
you should be running with Administrator privileges; however, non-NTFS
filesystems and running without Administrator privileges are also supported.
-
+.PP
On Windows, \fB@IMAGEX_PROGNAME@ capture\fR and \fB@IMAGEX_PROGNAME@ append\fR
try to archive as much data as possible. This includes:
-
.IP \[bu] 4
All data streams of all files. This includes the default file contents, as well
as named data streams if supported by the filesystem and if the version of
.IP \[bu]
Hard links, excluding directory hard links (which aren't supposed to exist
anyway).
-
.SH OPTIONS
.TP 6
\fB--boot\fR
for \fB@IMAGEX_PROGNAME@ capture\fR, since the compression mode for
\fB@IMAGEX_PROGNAME@ append\fR must be the same as that of the existing WIM.
\fITYPE\fR may be "none", "maximum", or "fast". By default, it is "fast".
-
+.IP ""
You may also specify the actual names of the compression algorithms, "XPRESS"
and "LZX", instead of "fast" and "maximum", respectively.
.TP
\fB--config\fR=\fIFILE\fR
Specifies a configuration file for capturing the new image. The configuration
file specifies files that are to be treated specially during the image capture.
-
+.IP ""
The format of the configuration file is a number of sections containing path
globs one per line, where each section begins with the tag [ExclusionList],
[ExclusionException], [CompressionExclusionList], or [AlignmentList].
exclude from capture, while the [ExclusionException] section specifies a list of
path globs to include in the capture even if the matched file or directory name
also appears in the [ExclusionList].
-
+.IP ""
Relative globs with only one path component (e.g. *.mp3) match against a filename in any
directory. Relative globs with multiple path components (e.g. dir/file),
as well as absolute globs (e.g. /dir/file), are treated as paths starting at the
tree rooted at that directory is excluded from the capture, unless
\fB--dereference\fR is specified and there is another path into that directory
through a symbolic link.
-
+.IP ""
For compatibility with Windows, the path separators in the globs may be either
forward slashes or backslashes, and the line separators may be either UNIX-style
or DOS-style. Globs with spaces in them must be quoted, and leading and
trailing whitespace is not significant. Empty lines and lines beginning with
'#' or whitespace followed by '#' are ignored.
-
+.IP ""
Paths may not have drive letters in them, as they are all relative to the root
of capture and not absolute external paths.
-
+.IP ""
If this option is not specified the following default configuration file is
used:
-
+.IP ""
.RS
.RS
.nf
.RE
.RE
.fi
-
.TP
\fB--unix-data\fR
(UNIX only) Store the UNIX owner, group, and mode of all captured files. This
absolute symbolic links that point outside the directory tree being captured
will be ignored and not be captured at all. When disabled (\fB--norpfix\fR),
absolute symbolic links will be captured exactly as is.
-
+.IP ""
The default behavior for \fBimagex capture\fR is equivalent to \fB--rpfix\fR.
The default behavior for \fBimagex append\fR will be \fB--rpfix\fR if reparse
point fixups have previously been done on \fIWIMFILE\fR, otherwise
\fB--norpfix\fR.
-
+.IP ""
In the case of a multi-source capture, (\fB--source-list\fR specified), passing
\fB--norpfix\fR is recommended. Otherwise, reparse point fixups will be
disabled on all capture sources destined for non-root locations in the WIM
be saved as. Leading and trailing slashes are ignored. "/" indicates that the
directory is to become the root of the WIM image. If not specified, the target
string defaults to the same as the source string.
-
+.IP ""
An example source list file is as follows:
-
-.RS
+.IP ""
.RS
.nf
# Make the WIM image from the 'winpe' directory
/data/stuff /
.RE
.fi
-
+.IP ""
Subdirectories in the WIM are created as needed. Multiple source directories
may share the same target, which implies an overlay; however, an error is issued
if the same file appears in different overlays to the same directory.
-
+.IP ""
File paths containing whitespace may be quoted with either single quotes or
double quotes. Quotes may not be escaped.
-
+.IP ""
Lines consisting only of whitespace and lines beginning with '#' preceded by
optional whitespace are ignored.
-
+.IP ""
As a special case, if \fISOURCE\fR is "-", the source list is read from standard
input rather than an external file.
-
+.IP ""
The NTFS capture mode cannot be used with \fB--source-list\fR, as only capturing
a full NTFS volume is supported.
-
.SH NOTES
-
\fBimage append\fR does not support appending an image to a split WIM.
-
+.PP
The different capture modes only specify the data that is captured and don't
specify a special WIM format. A WIM file can contain images captured using
different modes. However, all images in a WIM must have the same compression
type, and \fB@IMAGEX_PROGNAME@\fR always enforces this.
-
+.PP
\fB@IMAGEX_PROGNAME@\fR writes WIMs having the version number 0x10d00 and a compressed
stream chunk size of 32768. The only WIMs I've seen that are different from
this are some pre-Vista WIMs that had a different version number.
-
+.PP
It is safe to abort an \fB@IMAGEX_PROGNAME@ append\fR command partway through;
however, after doing this, it is recommended to run \fB@IMAGEX_PROGNAME@
optimize\fR to remove any data that was appended to the physical WIM file but
not yet incorporated into the structure of the WIM, unless \fB--rebuild\fR was
specified, in which case you should delete the temporary file left over.
-
+.PP
\fISOURCE\fR may be a symbolic link to a directory rather than a directory
itself. However, additional symbolic links in subdirectories, or in additional
source directories not destined for the WIM image root (with
\fB--source-list\fR), are not dereferenced unless \fB--dereference\fR is
specified.
-
.SH EXAMPLES
Create a new WIM 'mywim.wim' from the directory 'somedir', using LZX compression and
including an integrity table:
@IMAGEX_PROGNAME@ append /dev/sda2 mywim.wim --check "Windows 7"
.RE
.PP
-
.SH SEE ALSO
.BR @IMAGEX_PROGNAME@ (1)
.TH IMAGEX "1" "May 2013" "@IMAGEX_PROGNAME@ @VERSION@" "User Commands"
.SH NAME
@IMAGEX_PROGNAME@-delete \- Delete an image from a WIM archive
-
.SH SYNOPSIS
\fB@IMAGEX_PROGNAME@ delete\fR \fIWIMFILE\fR \fIIMAGE\fR [--check]
-
.SH DESCRIPTION
-.PP
-
\fB@IMAGEX_PROGNAME@ delete\fR deletes the specified image from the Windows Imaging (WIM)
file \fIWIMFILE\fR.
-
+.PP
\fIIMAGE\fR specifies the WIM image to deleted. It may be a 1-based index of an
image in the WIM, the name of an image in the WIM, or the keyword "all" to
indicate that all images are to be deleted. Use the \fB@IMAGEX_PROGNAME@ info\fR (1)
command to show what images a WIM file contains.
-
.SH NOTES
-
By default, the WIM file is rebuilt with all unnecessary file data removed.
This is different from Microsoft's imagex.exe, which only will delete the
directory tree metadata and XML data for this operation. (See the \fB--soft\fR
option for the other kind of delete).
-
+.PP
Also, unlike Microsoft's imagex.exe, it is legal to delete all the images from a
WIM and have a WIM with 0 images, although such a file wouldn't be very useful.
-
+.PP
\fB@IMAGEX_PROGNAME@ delete\fR does not support split WIMs.
-
.SH OPTIONS
.TP 6
\fB--check\fR
particular, all streams will be left alone, even if they are no longer
referenced. This is probably not what you want, because almost no space will be
saved by deleting an image in this way.
-
+.IP ""
You may use \fB@IMAGEX_PROGNAME@ optimize\fR to delete unreferenced streams from a WIM that
has had images soft-deleted from it.
-
.SH EXAMPLES
Delete the first image from 'boot.wim':
.RS
@IMAGEX_PROGNAME@ delete boot.wim 1
.RE
.PP
-
.SH SEE ALSO
.BR @IMAGEX_PROGNAME@ (1)
.BR @IMAGEX_PROGNAME@-info (1)
.BR @IMAGEX_PROGNAME@-optimize (1)
-
.TH IMAGEX "1" "May 2013" "@IMAGEX_PROGNAME@ @VERSION@" "User Commands"
.SH NAME
@IMAGEX_PROGNAME@-dir \- Show the files contained in a WIM archive
-
.SH SYNOPSIS
\fB@IMAGEX_PROGNAME@ dir\fR \fIWIMFILE\fR \fIIMAGE\fR
-
.SH DESCRIPTION
-.PP
Lists all the files and directories contained in the specified image of the
Windows Imaging (WIM) file \fIWIMFILE\fR.
-
+.PP
\fIIMAGE\fR specifies the WIM image to show the files of. It may be a 1-based
index of an image in the WIM, the name of an image in the WIM, or the keyword
"all" to indicate that files from all images are to be shown. Use the
\fB@IMAGEX_PROGNAME@ info\fR (1) command to show what images a WIM file
contains.
-
.SH NOTES
-
\fB@IMAGEX_PROGNAME@ dir\fR supports split WIMs, but it will only work on the
first part of the split WIM.
-
+.PP
The DOS names of files are not displayed.
-
+.PP
Alternate data streams are not displayed.
-
.SH EXAMPLES
List all files in the first image of 'boot.wim':
.RS
@IMAGEX_PROGNAME@ dir boot.wim 1
.RE
.PP
-
.SH SEE ALSO
.BR @IMAGEX_PROGNAME@ (1)
.BR @IMAGEX_PROGNAME@-info (1)
.TH IMAGEX "1" "May 2013" "@IMAGEX_PROGNAME@ @VERSION@" "User Commands"
.SH NAME
@IMAGEX_PROGNAME@-export \- Exports an image from a WIM archive to an existing or new WIM archive
-
.SH SYNOPSIS
\fB@IMAGEX_PROGNAME@ export\fR \fISRC_WIMFILE\fR \fISRC_IMAGE\fR
\fIDEST_WIMFILE\fR [\fIDEST_IMAGE_NAME\fR\] [\fIDEST_IMAGE_DESCRIPTION\fR]
[\fIOPTION\fR...]
-
.SH DESCRIPTION
-.PP
-
Copies the specified image in \fISRC_WIMFILE\fR to \fIDEST_WIMFILE\fR,
optionally changing its name and/or description and/or compression type.
If \fIDEST_WIMFILE\fR exists, it is taken be be a WIM archive to which the image
will be appended. Otherwise, it is created as a new WIM archive containing only
the exported image.
-
+.PP
\fISRC_IMAGE\fR specifies the image in \fISRC_WIMFILE\fR to export. It may be a
1-based index of an image in the WIM, the name of an image in the WIM, or the
keyword "all" to indicate that all images are to be exported. Use the
\fB@IMAGEX_PROGNAME@ info\fR (1) command to list the images a WIM file contains.
-
+.PP
If given, \fIDEST_IMAGE_NAME\fR specifies the name to give the image being
exported to \fIDEST_WIMFILE\fR. The default is its name in \fISRC_WIMFILE\fR.
\fIDEST_IMAGE_NAME\fR cannot be specified if multiple images are being exported.
-
+.PP
If given, \fIDEST_IMAGE_DESCRIPTION\fR specifies the description to give the
image being exported to \fIDEST_WIMFILE\fR. The default is its description in
\fISRC_WIMFILE\fR.
-
+.PP
\fB@IMAGEX_PROGNAME@ export\fR supports exporting images from stand-alone WIMs as well as
from split WIMs. However, you cannot export an image to a split WIM. See
\fBSPLIT WIMS\fR.
-
+.PP
.SH OPTIONS
.TP 6
\fB--boot\fR
Specifies that the exported image is to be the bootable image of the destination
WIM archive.
-
+.IP ""
If multiple images are being exported, this flag indicates that the image in the
\fISRC_WIMFILE\fR that is currently marked as bootable is to be made bootable in
\fIDEST_WIMFILE\fR. If no image in \fISRC_WIMFILE\fR is bootable, it is an
Specifies the compression type for \fIDEST_WIMFILE\fR. This is only valid if
\fIDEST_WIMFILE\fR does not yet exist, since if \fIDEST_WIMFILE\fR exists, the
compression type must be the same as that of \fIDEST_WIMFILE\fR.
-
+.IP ""
\fITYPE\fR may be "none", "maximum", or "fast". By default, it is the same as
that of the input WIM file.
-
+.IP ""
You may also specify the actual names of the compression algorithms, "XPRESS"
and "LZX", instead of "fast" and "maximum", respectively.
.TP
\fB--ref\fR="\fIGLOB\fR"
File glob of additional split WIM parts that are part of the split WIM being
exported. See \fBSPLIT_WIMS\fR.
-
.SH SPLIT WIMS
-
You may use \fB@IMAGEX_PROGNAME@ export\fR to export images from a split WIM. The
\fISRC_WIMFILE\fR argument is used to specify the first part of the split WIM, and
the \fB--refs\fR="\fIGLOB\fR" option is used to provide a shell-style file glob
the split WIM, except optionally the first part which may either omitted or
included in the glob (but the first part MUST be specified as \fISRC_WIMFILE\fR as
well).
-
+.PP
Here's an example. The names for the split WIMs usually go something like:
-
-.RS
.PP
+.RS
.nf
mywim.swm
mywim2.swm
mywim4.swm
mywim5.swm
.RE
-
+.PP
To export the first image of this split WIM to a new or existing WIM file
"other.wim", run:
.PP
.RS
@IMAGEX_PROGNAME@ export mywim.swm 1 other.wim --ref="mywim*.swm"
.RE
-.PP
-
.SH NOTES
-
It is safe to abort an \fB@IMAGEX_PROGNAME@ export\fR command partway through;
however, after doing this, it is recommended to run \fB@IMAGEX_PROGNAME@
optimize\fR to remove any data that was appended to the physical WIM file but
not yet incorporated into the structure of the WIM, unless \fB--rebuild\fR was
specified, in which case you should delete the temporary file left over.
-
.SH EXAMPLES
Export the second image of 'boot.wim' to the new WIM file 'new.wim', and
change the compression type to maximum, if it wasn't maximum already:
@IMAGEX_PROGNAME@ export boot.wim 2 new.wim --compress=maximum
.RE
.PP
-
.SH SEE ALSO
.BR @IMAGEX_PROGNAME@ (1)
.BR @IMAGEX_PROGNAME@-info (1)
.TH IMAGEX "1" "May 2013" "@IMAGEX_PROGNAME@ @VERSION@" "User Commands"
.SH NAME
@IMAGEX_PROGNAME@-extract \- Extract files or directories from a WIM image
-
.SH SYNOPSIS
\fB@IMAGEX_PROGNAME@ extract\fR \fIWIMFILE\fR \fIIMAGE\fR [\fIPATH\fR...] [\fIOPTION\fR...]
-
.SH DESCRIPTION
-.PP
-
\fB@IMAGEX_PROGNAME@ extract\fR extracts one or more files or directory trees
from the specified \fIIMAGE\fR contained in the Windows Imaging (WIM) file
\fIWIMFILE\fR.
-
+.PP
\fB@IMAGEX_PROGNAME@ extract\fR is intended for extracting only a subset of a
WIM image. If you want to extract or "apply" a full WIM image to a directory or
NTFS volume, use \fB@IMAGEX_PROGNAME@ apply\fR (1) instead.
-
+.PP
\fIIMAGE\fR specifies the image in \fIWIMFILE\fR that contains the files or
directory trees to extract. It may be a 1-based index of an image in the WIM or
the name of an image in the WIM. Use the \fB@IMAGEX_PROGNAME@ info\fR (1)
command to show what images a WIM file contains.
-
+.PP
Each \fIPATH\fR specifies a file or directory tree within the WIM image to
extract. See \fBPATH_SPECIFICATIONS\fR.
-
+.PP
By default, files and directories are extracted to the current directory. Use
\fB--dest-dir\fR to choose an alternate target directory. Alternatively, use
\fB--to-stdout\fR to extract a file to standard output to pipe into another
program.
-
+.PP
\fB@IMAGEX_PROGNAME@ extract\fR supports extracting files and directory trees
from stand-alone WIMs as well as split WIMs. See \fBSPLIT WIMS\fR.
-
.SH PATH SPECIFICATIONS
-
Each \fIPATH\fR specifies a file or directory tree within the WIM image to
extract. Each path must be specified as an absolute path starting from the root
of the WIM image, like those output by the \fB@IMAGEX_PROGNAME@ dir\fR (1)
command. Path separators may be forward slashes on UNIX, or either forward
slashes or backward slashes on Windows. The leading slash is optional.
-
+.PP
If no \fIPATH\fRs are provided, the default behavior is to extract the full
image, as if the path "/" had been provided.
-
.SH SPLIT WIMS
-
You may use \fB@IMAGEX_PROGNAME@ extract\fR to extract files or directory trees
from a split WIM. This uses the \fB--refs\fR="\fIGLOB\fR" option in the same
way as in other commands such as \fB@IMAGEX_PROGNAME@ apply\fR. See
\fB@IMAGEX_PROGNAME@ apply\fR (1) for more details.
-
.SH OPTIONS
.TP 6
\fB--check\fR
-When reading \fIWIMFILE\fR, verify its integrity if the integrity table is
+When reading \fIWIMFILE\fR, verify its integrity if an integrity table is
present.
.TP
\fB--ref\fR="\fIGLOB\fR"
\fBSPLIT_WIMS\fR.
.TP
\fB--verbose\fR
-Print the path to of each file or directory within the WIM image as it is
+Print the path of each file or directory within the WIM image as it is
extracted.
.TP
\fB--unix-data\fR
\fB--dest-dir\fR=\fIDIR\fR
Extract the files and directories to the directory \fIDIR\fR instead of to the
current working directory.
-
.SH NOTES
-
See the documentation \fB@IMAGEX_PROGNAME@ apply\fR (1) for documentation about
what data and metadata are extracted on UNIX versus on Windows.
-
+.PP
On UNIX, one can alternatively mount the WIM image with \fB@IMAGEX_PROGNAME@
mount\fR and then extract the desired files or directories using any standard
command-line or graphical program.
-
+.PP
Reparse-point fixups (a.k.a. changing absolute symbolic links and junctions to
point within the extraction location) are never done by \fB@IMAGEX_PROGNAME@
extract\fR. Use \fB@IMAGEX_PROGNAME@ apply\fR if you want this behavior.
-
+.PP
Unlike \fB@IMAGEX_PROGNAME@ apply\fR, \fB@IMAGEX_PROGNAME@ extract\fR does not
support extracting files directly to a NTFS volume using libntfs-3g.
-
.SH EXAMPLES
Extract a file from the first image in "boot.wim" to the current directory:
.RS
@IMAGEX_PROGNAME@ extract boot.wim 1 /Windows/Fonts /sources /Windows/System32/cmd.exe
.RE
.PP
-
.SH SEE ALSO
.BR @IMAGEX_PROGNAME@ (1)
.BR @IMAGEX_PROGNAME@-apply (1)
.SH NAME
@IMAGEX_PROGNAME@-info \- Display information about a WIM file, or change information about
an image
-
.SH SYNOPSIS
\fB@IMAGEX_PROGNAME@ info\fR \fIWIMFILE\fR [\fIIMAGE\fR [\fINEW_NAME\fR
[\fINEW_DESC\fR]]] [\fIOPTION\fR...]
-
-
.SH DESCRIPTION
-.PP
-
\fB@IMAGEX_PROGNAME@ info\fR displays information about \fIWIMFILE\fR, and optionally
changes which image is bootable, or what the name and description of an image
are.
-
+.PP
If neither an image nor any flags other than \fB--check\fR are specified, some
basic information about the WIM archive as well as information about the images
contained in it will be printed. If an image is specified by \fIIMAGE\fR (as a
1-based image index or an image name), the printed information is restricted to
that concerning the specified image.
-
+.PP
Changes to the WIM are made if \fINEW_NAME\fR and/or \fB--boot\fR are specified.
\fINEW_NAME\fR is taken to be the new name of the image specified by \fIIMAGE\fR
while \fINEW_DESC\fR is taken to be its new description. If \fINEW_DESC\fR is
not specified, the image's description is unchanged.
-
+.PP
\fB@IMAGEX_PROGNAME@ info\fR does not support modifying a split WIM, although you may
display information about one.
-
.SH OPTIONS
.TP 6
\fB--boot\fR
UTF-16LE, and it will begin with a byte-order mark.
.SH SEE ALSO
.BR @IMAGEX_PROGNAME@ (1)
-
.TH IMAGEX "1" "May 2013" "@IMAGEX_PROGNAME@ @VERSION@" "User Commands"
.SH NAME
@IMAGEX_PROGNAME@-join \- Join split WIMs into a standalone one-part WIM
-
.SH SYNOPSIS
\fB@IMAGEX_PROGNAME@ join\fR [\fIOPTION\fR...] \fIOUT_WIMFILE\fR \fISPLIT_WIM\fR...
-
.SH DESCRIPTION
-.PP
Joins the \fISPLIT_WIMs\fR into a standalone one-part WIM \fIOUT_WIMFILE\fR.
-
+.PP
All parts of the split WIM must be specified. You probably want to do so using
a shell wildcard.
-
.SH OPTIONS
.TP 6
\fB--check\fR
present; additionally, when writing \fIOUT_WIMFILE\fR,
write an integrity table. If this option is not specified, no integrity table
is included in the new WIM file, even if there was one before.
-
.SH EXAMPLES
Join a split WIM, with the parts named `windows*.swm' where the * is anything
(usually the number of the part, except for the first part which may have no
.PP
@IMAGEX_PROGNAME@ join windows.wim windows*.swm
.RE
-
.SH NOTES
\fB@IMAGEX_PROGNAME@ join\fR is roughly equivalent to:
.RS
.PP
\fB@IMAGEX_PROGNAME@ export\fR \fISWM_PART_1\fR --ref="\fISWM_GLOB\fR" [--check] all \fIOUT_WIMFILE\fR
.RE
-.PP
-
-
.SH SEE ALSO
.BR @IMAGEX_PROGNAME@ (1)
.BR @IMAGEX_PROGNAME@-export (1)
.TH IMAGEX "1" "May 2013" "@IMAGEX_PROGNAME@ @VERSION@" "User Commands"
.SH NAME
@IMAGEX_PROGNAME@-mount, @IMAGEX_PROGNAME@-mountrw, @IMAGEX_PROGNAME@-unmount \- Mount and unmount an image from a WIM archive
-
.SH SYNOPSIS
\fB@IMAGEX_PROGNAME@ mount\fR \fIWIMFILE\fR [\fIIMAGE\fR] \fIDIRECTORY\fR [\fIOPTION\fR...]
.br
\fB@IMAGEX_PROGNAME@ mountrw\fR \fIWIMFILE\fR [\fIIMAGE\fR] \fIDIRECTORY\fR [\fIOPTION\fR...]
.br
\fB@IMAGEX_PROGNAME@ unmount\fR \fIDIRECTORY\fR [--commit] [--check] [--rebuild]
-
.SH DESCRIPTION
+The \fB@IMAGEX_PROGNAME@ mount\fR and \fB@IMAGEX_PROGNAME@ mountrw\fR commands
+will mount the image in the Windows Imaging (WIM) file \fIWIMFILE\fR specified
+by \fIIMAGE\fR on the directory \fIDIRECTORY\fR using FUSE (Filesystem in
+Userspace). \fB@IMAGEX_PROGNAME@ mount\fR will mount the image read-only, while
+\fB@IMAGEX_PROGNAME@ mountrw\fR will mount the image read-write.
.PP
-The \fB@IMAGEX_PROGNAME@ mount\fR and \fB@IMAGEX_PROGNAME@ mountrw\fR commands will mount the image in
-the Windows Imaging (WIM) file \fIWIMFILE\fR specified by \fIIMAGE\fR on the
-directory \fIDIRECTORY\fR using FUSE (Filesystem in Userspace). \fB@IMAGEX_PROGNAME@
-mount\fR will mount the image read-only, while \fB@IMAGEX_PROGNAME@ mountrw\fR will mount
-the image read-write.
-
\fIIMAGE\fR may be a 1-based index of the image in the WIM to mount, or it may
be the name of an image in the WIM. Use the \fB@IMAGEX_PROGNAME@ info\fR (1)
command to see the available images in the WIM. \fIIMAGE\fR may be omitted if
\fIWIMFILE\fR contains only one image.
-
-
+.PP
The WIM image can be unmounted using the \fB@IMAGEX_PROGNAME@ unmount\fR command. Changes
made to a WIM mounted read-write will be discarded unless the \fB--commit\fR
flag is provided to \fB@IMAGEX_PROGNAME@ unmount\fR.
-
.SH SPLIT WIMS
-
You may use \fB@IMAGEX_PROGNAME@ mount\fR to mount an image from a split WIM read-only.
However, you may not mount an image from a split WIM read-write.
-
+.PP
The \fIWIMFILE\fR argument is used to specify the first part of the split WIM, and
the \fB--refs\fR="\fIGLOB\fR" option is used to provide a shell-style file glob
that specifies the additional parts of the split WIM. \fIGLOB\fR is expected to
the split WIM, except optionally the first part which may either omitted or
included in the glob (but the first part MUST be specified as \fIWIMFILE\fR as
well).
-
+.PP
Here's an example. The names for the split WIMs usually go something like:
-
.RS
.PP
.nf
mywim4.swm
mywim5.swm
.RE
-
+.PP
To mount the first image of this split WIM to the directory "dir", we would do:
.PP
.RS
@IMAGEX_PROGNAME@ mount mywim.swm 1 dir --ref="mywim*.swm"
.RE
.PP
-
.SH NOTES
-
-If wimlib was configured using the \fB--without-fuse\fR flag, then the \fB@IMAGEX_PROGNAME@
-mount\fR, \fB@IMAGEX_PROGNAME@ mountrw\fR, and \fB@IMAGEX_PROGNAME@ unmount\fR commands will not work.
-Also, these commands are not available in the Windows builds of wimlib.
-
+If wimlib was configured using the \fB--without-fuse\fR flag, then the
+\fB@IMAGEX_PROGNAME@ mount\fR, \fB@IMAGEX_PROGNAME@ mountrw\fR, and
+\fB@IMAGEX_PROGNAME@ unmount\fR commands will not work. Also, these commands
+are not available in the Windows builds of wimlib.
+.PP
You can mount multiple images from a WIM file read-only at the same time, but
you can only mount one image at a time from a WIM read-write.
-
+.PP
All files in the mounted WIM will be accessible regardless of whether there is a
security descriptor in the WIM associated with the file or not. New files or
directories created in a read-write mounted WIM will be created with no security
\fB--streams-interface\fR option), it is currently not possible
to set or get DOS names, file attributes, or security
descriptors in a mounted WIM.
-
+.PP
By default, changes to a read-write WIM are made in-place by appending to the
WIM. This is nice for big WIM files, since the entire file doesn't have to be
rebuilt to make a small change. But, if you are making many changes to a
read-write mounted WIM, especially deleting large files, it is suggested to
provide the \fB--rebuild\fR option to \fB@IMAGEX_PROGNAME@ unmount\fR to force the WIM to
be rebuilt, or else run \fB@IMAGEX_PROGNAME@ optimize\fR on the WIM afterwards.
-
.SH MOUNT OPTIONS
-
-.TP
+.TP 6
\fB--check\fR
When reading the WIM, verify its integrity if it contains an integrity table.
.TP
This option is inspired by the ntfs-3g filesystem driver (see \fBntfs-3g\fR
(8)). It controls how alternate data streams, or named data streams, in WIM
files are made available.
-
+.IP ""
If "none", it will be impossible to read or write the named data streams.
-
+.IP ""
If "xattr" (default), named data streams will be accessible through extended
file attributes, unless this support was disabled when compiling wimlib. The
named data streams may be accessed through extended attributes named "user.*",
where the * is the name of the named data stream. See \fBsetfattr\fR (1) and
\fBgetfattr\fR (1).
-
+.IP ""
If "windows", the named data streams will be accessible by specifying the
filename, then a colon, then the name of the named data stream; for example,
"myfile:mystream".
-
+.IP ""
Please note that named data streams are a somewhat obscure NTFS feature that
aren't actually used much, even though they complicate the WIM file format
considerably. Normally, all you care about is the default or "unnamed" data
Pass the \fBallow_other\fR option to the FUSE mount. See \fBmount.fuse\fR (8).
Note: to do this is a non-root user, \fBuser_allow_other\fR needs to be
specified in /etc/fuse.conf (with the FUSE implementation on Linux, at least).
-
.SH UNMOUNT OPTIONS
-
.TP
\fB--commit\fR
Update the WIM file with the changes that have been made. Has no effect if the
read-write mount resulted in streams being deleted from the WIM. Also see
\fB@IMAGEX_PROGNAME@ optimize\fR. Has no effect if the mount is read-only or if
\fB--commit\fR was not specified.
-
.SH IMPLEMENTATION DETAILS
-
Since a WIM is an archive and not a filesystem, \fB@IMAGEX_PROGNAME@ mountrw\fR creates a
temporary staging directory to contain files that are created or modified. This
directory is located in the same directory as \fIWIMFILE\fR by default, but the
is unmounted with \fB--commit\fR, the WIM is modified in-place (or rebuild
completely with \fB--rebuild\fR), merging in the staging files as needed. Then,
the temporary staging directory is deleted.
-
+.PP
\fB@IMAGEX_PROGNAME@ unmount\fR runs in a separate process from the process that previously
ran \fB@IMAGEX_PROGNAME@ mount\fR, and these two processes communicate using POSIX message
queues. See \fIsrc/mount_image.c\fR in the sources for details. Note: As of
wimlib v1.2.1, \fB@IMAGEX_PROGNAME@ unmount\fR correctly fails with an error within a
reasonable amount of time (1 second) if the filesystem daemon is abnormally
terminated.
-
.SH SEE ALSO
.BR @IMAGEX_PROGNAME@ (1)
-
.TH IMAGEX "1" "May 2013" "@IMAGEX_PROGNAME@ @VERSION@" "User Commands"
.SH NAME
@IMAGEX_PROGNAME@-optimize \- Optimize a WIM archive
-
.SH SYNOPSIS
\fB@IMAGEX_PROGNAME@ optimize\fR \fIWIMFILE\fR [--check] [--recompress]
-
.SH DESCRIPTION
-.PP
\fB@IMAGEX_PROGNAME@ optimize\fR will rebuild the stand-alone WIM \fIWIMFILE\fR. The new
WIM is written to a temporary file, and it is renamed to the original file when
it's ready. This action will remove any holes that have been left as a result
of appending images, so the new WIM may be slightly smaller than the old WIM.
In addition, some errors in the original WIM may be fixed by re-writing it
(although most cannot).
-
.SH OPTIONS
.TP 6
\fB--check\fR
better job than the program that wrote the original file. A side effect of this
is that every stream in the original WIM will be checksummed, so this can help
verify that the WIM is intact (equivalent to applying all the images from it).
-
+.IP ""
Note: as mentioned in the README, wimlib generally provides a slightly better
XPRESS compression ratio than Microsoft's software, while it generally provides
a slightly worse LZX compression ratio than Microsoft's software. So, you may
Number of threads to use for compressing data. Default: autodetect (number of
processors). This parameter is only meaningful when \fB--recompress\fR is also
specified.
-
.SH NOTES
-
\fB@IMAGEX_PROGNAME@ optimize\fR does not support split WIMs.
-
+.PP
\fB@IMAGEX_PROGNAME@ optimize\fR is roughly equivalent to:
.RS
.PP
\fB@IMAGEX_PROGNAME@ export\fR \fIWIMFILE\fR all tmp.wim [--check] && mv tmp.wim \fIWIMFILE\fR
.RE
.PP
-
.SH SEE ALSO
.BR @IMAGEX_PROGNAME@ (1)
.BR @IMAGEX_PROGNAME@-export (1)
-
.TH IMAGEX "1" "May 2013" "@IMAGEX_PROGNAME@ @VERSION@" "User Commands"
.SH NAME
@IMAGEX_PROGNAME@-split \- Split a WIM into multiple parts
-
.SH SYNOPSIS
\fB@IMAGEX_PROGNAME@ split\fR \fIWIMFILE\fR \fISPLIT_WIMFILE\fR \fIPART_SIZE\fR [\fIOPTION...\fR]
-
.SH DESCRIPTION
-.PP
-
Splits \fIWIMFILE\fR into parts with size at most \fIPART_SIZE\fR mebibytes,
with the first part having the name \fISPLIT_WIMFILE\fR and the other parts
having names numbered in order of the parts.
-
.SH OPTIONS
.TP 6
\fB--check\fR
present; additionally, when writing each \fISPLIT_WIMFILE\fR, write an integrity
table. If this option is not specified, no integrity tables are included in the
split WIM files, even if there was one in the original WIM.
-
.SH EXAMPLES
Splits the WIM 'windows.wim' into 'windows.swm', 'windows2.swm', 'windows3.swm',
etc. where each part is at most 100 MiB:
.PP
@IMAGEX_PROGNAME@ split windows.wim windows.swm 100
.RE
-
.SH LIMITATIONS
-
It it possible for the size of the parts to exceed the \fIPART_SIZE\fR given.
This is impossible to avoid and Microsoft's program has this problem as well
because the WIM file format provides no way to divide a single file resource in
inside the WIM that is 100 MiB, then an uncompressed split WIM will have at
least one part that is 100 MiB in size to contain that file. However, if the
WIM resources are compressed then less space would be needed.
-
.SH SEE ALSO
.BR @IMAGEX_PROGNAME@ (1)
.TH IMAGEX "1" "May 2013" "@IMAGEX_PROGNAME@ @VERSION@" "User Commands"
.SH NAME
@IMAGEX_PROGNAME@-update \- Update a WIM image
-
.SH SYNOPSIS
\fB@IMAGEX_PROGNAME@ update\fR \fIWIMFILE\fR [\fIIMAGE\fR] [\fIOPTION\fR...] < \fICMDFILE\fR
-
.SH DESCRIPTION
-.PP
-
\fB@IMAGEX_PROGNAME@ update\fR modifies the specified \fIIMAGE\fR in the Windows
Imaging (WIM) file \fIWIMFILE\fR by adding, deleting, or renaming files or
directories in it.
-
+.PP
\fIIMAGE\fR specifies the image in \fIWIMFILE\fR to update. It may be a 1-based
index of an image in the WIM or the name of an image in the WIM. Use the
\fB@IMAGEX_PROGNAME@ info\fR (1) command to list the images a WIM file contains.
\fIIMAGE\fR may be omitted if \fIWIMFILE\fR contains only one image.
-
+.PP
The modifications to perform on the WIM image are specified as a sequence of
commands, one per line, read in a text file from standard input. It is
recommended that standard input be redirected from a file (\fICMDFILE\fR), as
shown above, rather than typing in commands interactively.
-
.SH AVAILABLE COMMANDS
-
This section documents the commands that may appear in the \fICMDFILE\fR
described above.
-
.SS \fBadd\fR [\fIOPTION\fR...] \fISOURCE\fR \fIDESTINATION\fR
Add a file or directory tree to the WIM image. \fISOURCE\fR must specify the
path to a file or directory on your filesystem. \fIDESTINATION\fR must specify
existing directory in the WIM image in one command. If \fIDESTINATION\fR does
not exist in the WIM image, then any prerequisite directories are created as
needed to add the \fISOURCE\fR at that location.
-
+.PP
The available options for the \fBadd\fR command are:
-
.TP 6
\fB--verbose\fR
Print the names of files as they are captured.
desire that all security descriptors be captured exactly, you may wish to
provide this option, although the Administrator should have permission to read
everything anyway.
-
.SS \fBdelete\fR [\fIOPTION\fR...] \fIPATH\fR
Deletes a file or directory tree from the WIM image. \fIPATH\fR must specify the
path inside the WIM image of the file or directory tree to delete.
-
+.PP
The available options for the \fBdelete\fR command are:
-
.TP 6
\fB--force\fR
Do not issue an error if the path to delete does not exist.
\fB--recursive\fR
Delete the file or directory tree recursively; if not specified, an error is
issued if the path to delete is a directory.
-
.SS \fBrename\fR \fIOLD_PATH\fR \fINEW_PATH\fR
Renames a file or directory tree inside the WIM image. \fIOLD_PATH\fR must
specify the old path of the file or directory tree inside the WIM image, and
particular, a pre-existing file at \fINEW_PATH\fR will be deleted if present,
except in certain cases such as attempting to rename a directory to a
non-directory, which is not allowed.
-
+.PP
There are no options available for the \fBrename\fR command.
-
.SH OPTIONS
-
The following options are accepted on the command line by \fB@IMAGEX_PROGNAME@
update\fR itself:
-
.TP 6
\fB--verbose\fR
Use \fB--verbose\fR for all \fBadd\fR commands.
Rebuilding the WIM is slower, but will save a little bit of space that would
otherwise be left as a hole in the WIM. Also see
\fB@IMAGEX_PROGNAME@-optimize\fR (1).
-
.SH NOTES
-
\fB@IMAGEX_PROGNAME@ update\fR is partly redundant with \fB@IMAGEX_PROGNAME@
mountrw\fR, since if a WIM image can be mounted read-write, then there
theoretically is no need for \fB@IMAGEX_PROGNAME@ update\fR. The main advantage
of \fB@IMAGEX_PROGNAME@ update\fR is that it works on both UNIX and Windows,
whereas \fB@IMAGEX_PROGNAME@ mountrw\fR only works on UNIX.
-
+.PP
Symbolic links inside a WIM image are not dereferenced when being interpreted.
So, for example, if you have a WIM image that contains a symbolic link
"/Documents and Settings" -> "/Users" where "/Users" is a directory, then a
subdirectory named "Public" in this directory must be specified as
"/Users/Public" rather than "/Documents and Settings/Public".
-
+.PP
All paths to files or directories within the WIM image must be specified
relative to the root of the image. However, the leading slash is optional, and
both forward slashes and backslashes are accepted.
-
+.PP
The command file (\fICMDFILE\fR) is parsed by \fB@IMAGEX_PROGNAME@ update\fR
itself and not by the system shell. Therefore, its syntax is limited. However,
comment lines beginning with '#' are allowed, and it is also possible to quote
arguments with whitespace inside them.
-
+.PP
On UNIX, you cannot use \fB@IMAGEX_PROGNAME@ update\fR to add files to an image
directly from a NTFS volume using libntfs-3g, even though \fB@IMAGEX_PROGNAME@
capture\fR supports capturing a full image this way.
-
+.PP
It is safe to abort an \fB@IMAGEX_PROGNAME@ update\fR command partway through;
however, after doing this, it is recommended to run \fB@IMAGEX_PROGNAME@
optimize\fR to remove any data that was appended to the physical WIM file but
not yet incorporated into the structure of the WIM, unless \fB--rebuild\fR was
specified, in which case you should delete the temporary file left over.
-
.SH EXAMPLES
-
All the examples below show the update command file to be created as well as the
\fB@IMAGEX_PROGNAME@ update\fR command to run to perform the updates.
-
+.PP
Delete two files from a WIM image:
-
+.PP
.RS
\fIupdate_commands.txt\fR:
.RS
.fi
.RE
.RE
-
+.PP
.RS
$ @IMAGEX_PROGNAME@ update boot.wim 2 < update_commands.txt
.RE
-
+.PP
Add some files and directories to a WIM image. Note that the first path of each
\fBadd\fR command specifies the files to add, while the second path of each
\fBadd\fR command specify the locations at which to to add them inside the WIM
image:
-
+.PP
.RS
\fIupdate_commands.txt\fR:
.RS
.fi
.RE
.RE
-
+.PP
.RS
$ @IMAGEX_PROGNAME@ update boot.wim 2 < update_commands.txt
.RE
-
+.PP
Rename a file inside a WIM image.
-
+.PP
.RS
\fIupdate_commands.txt\fR:
.RS
.fi
.RE
.RE
-
+.PP
.RS
$ @IMAGEX_PROGNAME@ update boot.wim 2 < update_commands.txt
.RE
-
+.PP
Using additional features, such as comments, options, and overlays, and
including an integrity table in the updated WIM:
-
+.PP
.RS
\fIupdate_commands.txt\fR:
.RS
.fi
.RE
.RE
-
+.PP
.RS
$ @IMAGEX_PROGNAME@ update boot.wim 2 --check < update_commands.txt
.RE
-
+.PP
.SH SEE ALSO
.BR @IMAGEX_PROGNAME@ (1)
.BR @IMAGEX_PROGNAME@-capture (1)
\fB@IMAGEX_PROGNAME@ unmount\fR \fIarguments...\fR
.br
\fB@IMAGEX_PROGNAME@ update\fR \fIarguments...\fR
-
.SH DESCRIPTION
-\fB@IMAGEX_PROGNAME@\fR is able to deal with archives in the Windows Imaging Format (.wim
-files). Its interface is meant to be similar to Microsoft's imagex.exe program.
-
+\fB@IMAGEX_PROGNAME@\fR is able to deal with archives in the Windows Imaging
+Format (.wim files). Its interface is meant to be similar to Microsoft's
+imagex.exe program.
+.PP
To do its work, \fB@IMAGEX_PROGNAME@\fR uses \fBwimlib\fR, a library which
provides interfaces for manipulating WIM archives. You could wimlib in your own
programs if you wanted to. wimlib's public interface is documented.
-
.SH COMMANDS
-
There is a separate manual page for each \fB@IMAGEX_PROGNAME@\fR command.
-
.SH SUPPORTED FEATURES
-
The following general features are currently supported (note: this is not a
complete list; also, certain features, such as mounting, are supported on UNIX
but not Windows):
-
-.IP \[bu] 3
+.IP \[bu] 4
Create a stand-alone WIM from a directory or NTFS volume (\fB@IMAGEX_PROGNAME@ capture\fR)
.IP \[bu]
Append a directory or NTFS volume onto a stand-alone WIM as a new image (\fB@IMAGEX_PROGNAME@
WIM integrity table is supported (\fB--check\fR option to many commands)
.IP \[bu]
WIM XML data (parsed and written using \fBlibxml\fR(3))
-
.SH DIFFERENCES FROM MICROSOFT IMAGEX
-
While similar to Microsoft's "imagex.exe" program, this program is designed for
UNIX-based systems and by the nature of the platform cannot be exactly the same
as Microsoft's version. In addition, I have added additional useful features
when appropriate.
-
.IP \[bu] 4
Because Microsoft designed the WIM file format to accomodate Windows-specific
and NTFS-specific features, wimlib must have two separate image capture and
application modes (although the \fB@IMAGEX_PROGNAME@\fR subcommands for the modes are the
same): one for general image capture and application, and one for the capture or
application of an image specifically from/to an NTFS volume.
-
+.IP ""
Note: the above applies to UNIX builds. On the Windows builds of wimlib, there
is only one image capture and application mode, similar to Microsoft's ImageX.
-
.IP \[bu]
Microsoft's version has some weird limitations, like it won't let you extract a
WIM on a shared folder, and it requires some commands to be run only from
Windows PE and not from regular Windows. This version does not have these
unusual limitations.
-
.IP \[bu]
There are bugs in Microsoft's WIM library and I obviously have not included the
same bugs in wimlib, although in some cases I have had to work around bugs for
compatibility purposes.
-
.IP \[bu]
\fB@IMAGEX_PROGNAME@\fR offers the extra command \fB@IMAGEX_PROGNAME@ optimize\fR,
which lets you easily remove wasted space in a WIM (which can arise after
a WIM image is appended or mounted read-write).
-
.IP \[bu]
\fB@IMAGEX_PROGNAME@\fR also offers the command \fB@IMAGEX_PROGNAME@ join\fR, which lets you
easily join the parts of a split WIM.
-
.IP \[bu]
\fB@IMAGEX_PROGNAME@\fR offers the extra commands \fB@IMAGEX_PROGNAME@
extract\fR and \fB@IMAGEX_PROGNAME@ update\fR, which let you quickly extract
files from or make changes to a WIM image without mounting it.
-
.IP \[bu]
\fB@IMAGEX_PROGNAME@ apply\fR supports keeping files hard-linked or symlinked
across WIM images when extracted from a WIM. So you can, for example, extract
different versions of Windows from an install.wim without using much extra
space. (Note: this functionality is only available in UNIX builds of wimlib.)
-
.IP \[bu]
\fB@IMAGEX_PROGNAME@ capture\fR supports combining multiple separate directories
and files together in a configurable way to create a WIM image.
-
.IP \[bu]
wimlib's XPRESS compressor is better than Microsoft's.
-
.IP \[bu]
wimlib supports multithreaded compression, which can make it much faster to
create compressed WIM files.
-
.IP \[bu]
\fB@IMAGEX_PROGNAME@ capture\fR supports a special mode where UNIX file modes,
owners, and groups are stored. (Note: this functionality is only available in
UNIX builds.)
-
.IP \[bu]
\fB@IMAGEX_PROGNAME@ mount\fR and \fB@IMAGEX_PROGNAME@ mountrw\fR are much faster than
Microsoft's versions for some reason. I don't know what they have their program
do that takes so long to simply set up a mountpoint. (Note: this functionality
is only available in UNIX builds.)
-
.IP \[bu]
\fB@IMAGEX_PROGNAME@ mount\fR supports mounting an image from a split WIM, but
Microsoft's software does not. (Note: this functionality is only available in
UNIX builds.)
-
.SH LOCALES AND CHARACTER ENCODINGS
-
On Windows, wimlib 1.3.2 and later works in UTF-16LE, and there should be no
problems with character encodings.
-
+.PP
On UNIX, wimlib works primarily in the locale-dependent multibyte encoding,
which you are strongly recommended to set to UTF-8 to avoid any problems.
-
.SH WARNING
-
Note: \fBwimlib\fR and \fB@IMAGEX_PROGNAME@\fR are experimental. Use Microsoft's
imagex.exe if you have to make sure your WIM files are made "correctly". Feel
free to submit a bug report if you find a bug.
-
+.PP
Some parts of the WIM file format are poorly documented or even completely
undocumented, so I've just had to do the best I can to read and write WIMs in a
way that appears to be compatible with Microsoft's software.
-
.SH REPORTING BUGS
-
Report bugs to ebiggers3@gmail.com.
-
.SH SEE ALSO
.BR @IMAGEX_PROGNAME@-append (1),
.BR @IMAGEX_PROGNAME@-apply (1),
.SH SYNOPSIS
.B mkwinpeimg
[\fIOPTIONS\fR] \fIIMAGE\fR
-
.SH DESCRIPTION
-
\fBmkwinpeimg\fR is able to make a bootable image of Windows PE by taking files
from a mounted Windows DVD (Windows Vista, Windows 7 or Windows 8) or the
mounted ISO image for the Windows Automated Installation Kit (WAIK). The
\fIboot.sdi\fR, and \fIbcd\fR. If making an ISO image, the file
\fIetfsboot.com\fR is also retrieved. Microsoft owns the rights to these files
and they are not distributed with wimlib.
-
+.PP
\fBmkwinpeimg\fR can currently make two types of bootable images. The default
is to make a bootable disk image. The image is not partitioned and is formatted
into a FAT filesystem. \fBsyslinux\fR(1) is required to make this type of
image, as it is used to chainload \fIbootmgr\fR. Also, \fBmtools\fR(1) is
required so that the FAT filesystem can be created without root privileges.
-
+.PP
The other type of bootable image that \fBmkwinpeimg\fR can make is a bootable
ISO image. To make this type of image, give the \fB--iso\fR option.
\fBmkisofs\fR(1) is required to make this type of image.
-
+.PP
If you make a disk image, you could put it on a USB drive, and if you make an
ISO image, you could put it on a CD. In addition, both types of images can be
loaded by the SYSLINUX or PXELINUX bootloaders using the MEMDISK module.
-
+.PP
Windows PE itself is contained in the \fIboot.wim\fR file. \fBmkwinpeimg\fR can
modify this file before embedding it in a bootable image. The most useful
modification is to specify an executable or batch file for Windows PE to execute
specify such a file. You may also add arbitrary files to \fIboot.wim\fR by
putting them in a directory, then specifying the \fB--overlay\fR \fIDIR\fR
option.
-
+.PP
\fBmkwinpeimg\fR can also make only a modified \fIboot.wim\fR, rather than a
bootable ISO or disk image, if the \fB--only-wim\fR option is given.
-
+.PP
The Windows PE WIMs provided in Windows 7, Windows 8, and the WAIK are not the
same, but are all similar. The best one to use is likely the one from the WAIK,
as that one is the smallest.
-
.SH OPTIONS
-
-.TP
+.TP 6
\fB\-i\fR, \fB\-\-iso\fR
Make an ISO image instead of a disk image.
.TP
\fB\-v\fR, \fB\-\-version\fR
Show version information.
.SH EXAMPLES
-
Create a bootable disk image of Windows PE from the Windows Vista, 7, or 8
installation media mounted on /media/windows:
-
.RS
.PP
mkwinpeimg --windows-dir=/media/windows winpe.img
.RE
.PP
-
Create a bootable ISO of Windows PE from the WAIK mounted on /media/waik, and
add all the files in "winpe_overlay" to Windows PE's filesystem:
-
.RS
.PP
mkwinpeimg --iso --waik-dir=/media/waik --overlay=winpe_overlay winpe.iso
.RE
.PP
-
Create a bootable image of Windows PE from the Windows installation media
mounted on /media/windows, add and make it execute "install.cmd" when it starts
up. In this example the image is created in the root directory of the TFTP
server for network booting.
-
.RS
.PP
mkwinpeimg --start-script=install.cmd --windows-dir=/media/windows /var/tftpboot/winpe.img
.RE
.PP
-
-
.SH NOTES
-
Microsoft's licenses may limit the things that Windows PE can be used for, and
they may limit your rights to redistribute customized versions of Windows PE.
-
.SH REPORTING BUGS
-
Report bugs to ebiggers3@gmail.com.
-
.SH SEE ALSO
.BR @IMAGEX_PROGNAME@ (1)