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