]> wimlib.net Git - wimlib/blob - doc/man1/wimmount.1
v1.14.4
[wimlib] / doc / man1 / wimmount.1
1 .TH WIMMOUNT "1" "April 2021" "wimlib 1.13.4" "User Commands"
2 .SH NAME
3 wimmount, wimmountrw, wimunmount \- Mount or unmount a WIM image
4 .SH SYNOPSIS
5 \fBwimmount\fR \fIWIMFILE\fR [\fIIMAGE\fR] \fIDIRECTORY\fR [\fIOPTION\fR...]
6 .br
7 \fBwimmountrw\fR \fIWIMFILE\fR [\fIIMAGE\fR] \fIDIRECTORY\fR [\fIOPTION\fR...]
8 .br
9 \fBwimunmount\fR \fIDIRECTORY\fR [\fIOPTION\fR...]
10 .SH DESCRIPTION
11 On Linux, the \fBwimmount\fR (equivalently: \fBwimlib-imagex mount\fR) and
12 \fBwimmountrw\fR (equivalently: \fBwimlib-imagex mountrw\fR) commands mount the
13 specified \fIIMAGE\fR in the Windows Imaging (WIM) archive \fIWIMFILE\fR on the
14 directory \fIDIRECTORY\fR using FUSE (Filesystem in Userspace).  \fBwimmount\fR
15 will mount the image read-only, while \fBwimmountrw\fR will mount the image
16 read-write.
17 .PP
18 \fIIMAGE\fR specifies the image in \fIWIMFILE\fR to mount.  It may be the
19 1-based index of an image or the name of an image.  It may be omitted if
20 \fIWIMFILE\fR contains only one image.  You can use \fBwiminfo\fR(1) to list the
21 images contained in \fIWIMFILE\fR.
22 .PP
23 The WIM image can be unmounted using \fBwimunmount\fR (equivalently:
24 \fBwimlib-imagex unmount\fR).  Changes made to an image mounted read-write will
25 be discarded unless the \fB--commit\fR flag is provided to \fBwimunmount\fR.
26 .SH DATA AND METADATA SUPPORT
27 WIM images can contain a variety of types of files and file metadata, some of
28 which is Windows-specific.  Currently, the mount feature can translate some, but
29 not all, Windows concepts to Linux equivalents.  Briefly, the following features
30 are \fIsupported\fR (read/write):
31 .IP \[bu] 4
32 Hard links
33 .IP \[bu]
34 Symbolic links.  Native Windows symbolic links and junctions in a
35 mounted WIM image will automatically be translated into UNIX symbolic links,
36 potentially with their targets fixed to be valid given the actual mountpoint
37 directory.  UNIX symbolic links created in a read-write mounted WIM image will
38 automatically be translated into native Windows symbolic links.
39 .IP \[bu]
40 Named data streams (mostly).  See the \fB--streams-interface\fR option.
41 .PP
42 In addition, standard UNIX file permissions (owner, group, and mode) and special
43 files are supported if the \fB--unix-data\fR option is used.
44 .PP
45 However, the following features are \fIunsupported\fR and not exposed in mounted
46 images:
47 .IP \[bu] 4
48 Windows security descriptors.  New files are not given security descriptors.
49 .IP \[bu]
50 DOS names (8.3 names) (short names).  New files are not given DOS names.
51 .IP \[bu]
52 Windows file attributes.  New files are assigned default attributes based on the
53 UNIX file mode bits.
54 .IP \[bu]
55 Object IDs.  New files are not given object IDs.
56 .IP \[bu]
57 EFS-encrypted files.  The files themselves will be visible in mounted WIM images
58 but their data will not be available.
59 .IP \[bu]
60 Extended attributes.  Although wimlib supports WIM images containing extended
61 attributes, these are not yet exposed in mounted WIM images.  (This may be
62 implemented in the future, though it would conflict with the use of extended
63 attributes to expose Windows concepts like named data streams.)
64 .SH SPLIT WIMS
65 You may use \fBwimmount\fR to mount an image from a split WIM read-only.
66 However, you may not mount an image from a split WIM read-write.
67 .PP
68 The \fIWIMFILE\fR argument must specify the first part of the split WIM, while
69 the additional parts of the split WIM must be specified in one or more
70 \fB--ref\fR="\fIGLOB\fR" options.  Since globbing is built into the \fB--ref\fR
71 option, typically only one \fB--ref\fR option is necessary.  For example, the
72 names for the split WIM parts usually go something like:
73 .PP
74 .RS
75 .nf
76 mywim.swm
77 mywim2.swm
78 mywim3.swm
79 mywim4.swm
80 mywim5.swm
81 .RE
82 .PP
83 To mount the first image of this split WIM to the directory "dir", run:
84 .PP
85 .RS
86 wimmount mywim.swm 1 dir --ref="mywim*.swm"
87 .RE
88 .PP
89 .SH NOTES
90 \fIAvailability\fR: Mounting WIM images is only supported on Linux-based systems.
91 These commands will not work on other platforms.  Furthermore, the library
92 cannot have been configured \fB--without-fuse\fR.
93 .PP
94 \fIMultiple mounts\fR: You are free to mount many WIM images at the same time,
95 provided that there are not two images mounted read-write from the same file at
96 the same time.
97 .PP
98 \fIAppends vs. rebuilds\fR: By default, changes to a read-write WIM are made
99 in-place by appending to the WIM.  This is nice for big WIM files, since the
100 entire file doesn't have to be rebuilt to make a small change.  But, if you are
101 making many changes to a read-write mounted WIM, especially deleting large
102 files, it is suggested to provide the \fB--rebuild\fR option to \fBwimunmount\fR
103 to force the WIM to be rebuilt, or else run \fBwimoptimize\fR afterwards.
104 .PP
105 \fIESD files (solid WIMs)\fR: You can mount version 3584 WIMs, which usually
106 contain LZMS-compressed solid resources and may carry the \fI.esd\fR file
107 extension rather than \fI.wim\fR.  However, such files are not designed for
108 random access, so reading data from them when mounted may be very slow.  In
109 addition, \fI.esd\fR files downloaded directly by the Windows 8 web downloader
110 have encrypted segments, and wimlib cannot mount such files until they are first
111 decrypted.
112 .SH MOUNT OPTIONS
113 .TP 6
114 \fB--check\fR
115 Before mounting the WIM image, verify the integrity of the WIM if it contains
116 extra integrity information.
117 .TP
118 \fB--streams-interface\fR=\fIINTERFACE\fR
119 This option is inspired by the \fBntfs-3g\fR(8) filesystem driver.  It controls
120 how named data streams (also called "alternate data streams") in WIM files are
121 made available.
122 .IP ""
123 If "none", it will be impossible to read or write the named data streams.
124 .IP ""
125 If "xattr" (default), named data streams will be accessible through extended
126 file attributes, unless this support was disabled when compiling wimlib.  The
127 named data streams may be accessed through extended attributes named "user.*",
128 where the * is the name of the named data stream.  See \fBsetfattr\fR(1) and
129 \fBgetfattr\fR(1).  Note that this is not an ideal interface, since named data
130 streams may be larger than the maximum allowed extended attribute size.
131 .IP ""
132 If "windows", the named data streams will be accessible by specifying the
133 filename, then a colon, then the name of the named data stream; for example,
134 "myfile:mystream".
135 .TP
136 \fB--debug\fR
137 Turn on debugging information printed by the FUSE library, and do not fork into
138 the background.
139 .TP
140 \fB--ref\fR="\fIGLOB\fR"
141 File glob of additional WIMs or split WIM parts to reference resources from.
142 See \fBSPLIT_WIMS\fR.  This option can be specified multiple times.  Note:
143 \fIGLOB\fR is listed in quotes because it is interpreted by \fBwimlib-imagex\fR
144 and may need to be quoted to protect against shell expansion.
145 .TP
146 \fB--staging-dir\fR=\fIDIR\fR
147 Store temporary staging files in a subdirectory of the directory \fIDIR\fR.
148 Only valid for \fBwimmountrw\fR.
149 .TP
150 \fB--unix-data\fR
151 Honor UNIX-specific metadata that was captured by \fBwimcapture\fR with the
152 \fB--unix-data option\fR.  By default, \fBwimmount\fR (and \fBwimmountrw\fR)
153 will ignore both Windows-style security descriptors and UNIX-specific metadata.
154 In this default mode, all files will simply be owned by the user running
155 \fBwimmount\fR and will have mode 0777.  (They will still not be accessible to
156 other users unless you also specify \fB--allow-other\fR.)  If you instead
157 provide the \fB--unix-data\fR option, these default permissions will be
158 overridden on a per-file basis with the UNIX-specific metadata from the WIM
159 image when available, and in the case of \fBwimmountrw\fR it will also be
160 possible to change the UNIX permissions on files in the mounted image using the
161 standard UNIX tools and functions, and (if appropriately privileged) create UNIX
162 special files such as device nodes.
163 .TP
164 \fB--allow-other\fR
165 Pass the \fBallow_other\fR option to the FUSE mount.  See \fBmount.fuse\fR (8).
166 Note: to do this as a non-root user, \fBuser_allow_other\fR needs to be
167 specified in /etc/fuse.conf.
168 .SH UNMOUNT OPTIONS
169 .TP
170 \fB--commit\fR
171 Update the WIM file with the changes that have been made.  Has no effect if the
172 mount is read-only.
173 .TP
174 \fB--force\fR
175 In combination with \fB--commit\fR, force the WIM image to be committed even if
176 there are open file descriptors to the WIM image.  Any such file descriptors
177 will be immediately closed, and the WIM image will be committed and unmounted.
178 .TP
179 \fB--check\fR
180 If committing changes to the WIM, include extra integrity information, even if
181 it was not present before.
182 .TP
183 \fB--rebuild\fR
184 Rebuild the entire WIM rather than appending any new data to the end of it.
185 Rebuilding the WIM is slower, but will save a little bit of space that would
186 otherwise be left as a hole in the WIM.  Even more space will be saved if the
187 read-write mount resulted in streams being deleted from the WIM.  Also see
188 .TP
189 \fB--new-image\fR
190 In combination with \fB--commit\fR for a read-write mounted image, causes the
191 modified image to be committed as a new, unnamed image appended to the WIM
192 archive.  The original image will be unmodified.
193 .SH IMPLEMENTATION DETAILS
194 Since a WIM is an archive and not a filesystem per se, \fBwimmountrw\fR creates
195 a temporary staging directory to contain files that are created or modified.
196 This directory is located in the same directory as \fIWIMFILE\fR by default, but
197 the location can be set using the \fB--staging-dir\fR option.  When the
198 filesystem is unmounted with \fB--commit\fR, the WIM is modified in-place (or
199 rebuilt completely with \fB--rebuild\fR), merging in the staging files as
200 needed.  Then, the temporary staging directory is deleted.
201 .PP
202 \fBwimunmount\fR runs in a separate process from the process that previously ran
203 \fBwimmount\fR.  When unmounting a read-write mounted WIM image with
204 \fB--commit\fR, these two processes communicate using a POSIX message queue so
205 that the unmount process can track the progress of the mount process.  See
206 \fIsrc/mount_image.c\fR in the source code for details.
207 .SH SEE ALSO
208 .BR wimlib-imagex (1)