Scroll to navigation

WIMEXPORT(1) User Commands WIMEXPORT(1)

NAME

wimexport - Export image(s) from a WIM archive

SYNOPSIS

wimexport SRC_WIMFILE SRC_IMAGE DEST_WIMFILE
[DEST_IMAGE_NAME [DEST_IMAGE_DESC]] [OPTION...]

DESCRIPTION

wimexport, or equivalently wimlib-imagex export, exports the specified image from SRC_WIMFILE into DEST_WIMFILE, optionally changing the image's name and/or description. If DEST_WIMFILE already exists, the image will be appended to it; otherwise, a new WIM archive will be created to contain the exported image.

SRC_IMAGE specifies the image in SRC_WIMFILE to export. It may be the 1-based index of an image, the name of an image, or the keyword "all" to specify all images. You can use wiminfo(1) to list the images contained in SRC_WIMFILE.

If specified, DEST_IMAGE_NAME is the name to give the image being exported. The default is its name in SRC_WIMFILE. If specified, DEST_IMAGE_NAME must be either a name not already used in DEST_WIMFILE, or the empty string to leave the image unnamed. DEST_IMAGE_NAME cannot be specified if "all" images are being exported.

If specified, DEST_IMAGE_DESC is the description to give the image being exported. The default is its description in SRC_WIMFILE.

wimexport supports exporting images from stand-alone WIMs as well as from split WIMs and delta WIMs. See SPLIT WIMS.

wimexport also supports exporting images from a non-pipable WIM into a pipable WIM or vice versa, or from a non-solid WIM into a solid WIM or vice versa. It can also export a pipable WIM directly to standard output if DEST_WIMFILE is specified as "-"; see --pipable.

OPTIONS

Mark the exported image as the "bootable" image of the WIM; or, if multiple images are being exported, make the image that was the bootable image of the source WIM also the bootable image of the destination WIM.
Before exporting the image(s), verify the integrity of the source WIM, destination WIM, and any referenced WIMs whenever they have extra integrity information present. Also include extra integrity information in the destination WIM, even if it was not present before.
Do not include extra integrity information in the destination WIM, even if it was present before.
Include extra integrity information in the destination WIM, i.e. like --check but don't do any verification beforehand.
Specify the compression type, and optionally the compression level for that compression type, for DEST_WIMFILE. Note that if DEST_WIMFILE already exists, then its compression type cannot be changed by this option. See the documentation for this option to wimcapture(1) for more details.
Set the WIM compression chunk size to SIZE. See the documentation for this option to wimcapture(1) for more details.
Force all exported data to be recompressed, even if the destination WIM will use the same compression type as the source WIM.
Create a "solid" archive that compresses multiple files together. This usually results in a significantly better compression ratio but has disadvantages such as reduced compatibility. See the documentation for this option to wimcapture(1) for more details.
Like --compress, but set the compression type used in solid resources. See the documentation for this option to wimcapture(1) for more details.
Like --chunk-size, but set the chunk size used in solid resources. See the documentation for this option to wimcapture(1) for more details.
Number of threads to use for compressing data. Default: autodetect (number of processors).
If exporting to an existing WIM, rebuild it rather than appending to it. Rebuilding is slower but will save some space that would otherwise be left as a hole in the WIM. Also see wimoptimize(1).
File glob of additional WIMs or split WIM parts to reference resources from. See SPLIT_WIMS. This option can be specified multiple times. Note: GLOB is listed in quotes because it is interpreted by wimexport and may need to be quoted to protect against shell expansion.
Build or rebuild DEST_WIMFILE as a "pipable WIM" that can be applied fully sequentially, including from a pipe. See wimcapture(1) for more details about creating pipable WIMs. The default without this option is to make DEST_WIMFILE pipable only if it was "-" (standard output) or was an existing pipable WIM.
Rebuild DEST_WIMFILE as a normal, non-pipable WIM. This only useful if you are exporting image(s) to a pipable WIM but you want it rebuilt as non-pipable.
Mark the destination image as WIMBoot-compatible. Also, if exporting to a new archive, set the compression type to that recommended for WIMBoot (currently, XPRESS with 4096 byte chunks).
Compact the existing destination WIM in-place and append any new data, eliminating "holes". This is efficient, but in general this option should not be used because a failed or interrupted compaction will corrupt the WIM archive. For more information, see the documentation for this option to wimoptimize(1).

SPLIT WIMS

You may use wimexport to export images from (but not to) a split WIM. The SRC_WIMFILE argument must specify the first part of the split WIM, while the additional parts of the split WIM must be specified in one or more --ref="GLOB" options. Since globbing is built into the --ref option, typically only one --ref option is necessary. For example, the names for the split WIM parts usually go something like:

mywim.swm
mywim2.swm
mywim3.swm
mywim4.swm
mywim5.swm
To export the first image of this split WIM to a new or existing WIM file
"other.wim", run:

wimexport mywim.swm 1 other.wim --ref="mywim*.swm"

NOTES

Data consistency: Except when using --unsafe-compact, it is safe to abort a wimexport command partway through. However, after doing this, it is recommended to run wimoptimize on the destination WIM to remove any data that was appended to the physical WIM file but not yet incorporated into the structure of the WIM, unless the WIM was being rebuilt (e.g. with --rebuild), in which case you should delete the temporary file left over.

Data deduplication: The WIM format has built-in deduplication (also called "single instancing") of file contents. Therefore, when an image is exported, only the file contents not already present in the destination WIM will be physically copied. However, a new copy of the image's metadata resource, which describes the image's directory structure, will always be created.

ESD files: wimexport supports solid-compressed WIMs, or "ESD" (.esd) files, except for encrypted ESDs, which must be decrypted first. The source and destination files of wimexport can be solid WIMs, non-solid WIMs, or a combination thereof. If the destination file does not exist, then by default it will be created as solid if the source was solid, or as non-solid if the source was non-solid. To override this, either specify --solid to create a solid WIM (.esd file), or specify --compress=LZX to create a standard non-solid WIM (.wim file).

EXAMPLES

Export the second image of 'boot.wim' to the new WIM file 'new.wim':

wimexport boot.wim 2 new.wim

The above example creates "new.wim" with the same compression type as "boot.wim". If you wish to change the compression type, specify --compress=TYPE; for example:

wimexport boot.wim 2 new.wim --compress=LZX

Export "ESD to WIM" --- that is, solid WIM to non-solid WIM:

wimexport install.esd all install.wim --compress=LZX

Export "WIM to ESD" --- that is, non-solid WIM to solid WIM:

wimexport install.wim all install.esd --solid

SEE ALSO

wimlib-imagex(1) wiminfo(1) wimoptimize(1)

February 2024 wimlib 1.14.4