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