For both platforms the code for NTFS capture and extraction is complete enough
that it is possible to apply an image from the "install.wim" contained in recent
-Windows installation media (Vista, Windows 7, or Windows 8) directly to a NTFS
+Windows installation media (Vista, Windows 7, or Windows 8) directly to an NTFS
filesystem, and then boot Windows from it after preparing the Boot Configuration
Data. In addition, a Windows installation can be captured (or backed up) into a
WIM file, and then re-applied later.
PKG_CHECK_MODULES([LIBNTFS_3G], [libntfs-3g])
PKGCONFIG_PRIVATE_REQUIRES="$PKGCONFIG_PRIVATE_REQUIRES libntfs-3g"
- dnl This checks for a NTFS-3g interface that was changed in the
+ dnl This checks for an NTFS-3g interface that was changed in the
dnl 2013.1.13 release
AC_CHECK_DECL([NTFS_MNT_RDONLY],
[AC_DEFINE([HAVE_NTFS_MNT_RDONLY],
.SH DESCRIPTION
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
+If \fIDEST_WIMFILE\fR exists, it is taken 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.
This command is also available as simply \fBwimexport\fR if the appropriate hard
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.
+support extracting files directly to an NTFS volume using libntfs-3g.
.PP
wimlib v1.6.0 and later can extract files from version 3584 WIMs, which usually
use packed, LZMS-compressed streams and may carry the \fI.esd\fR file extension
\fB--unix-data\fR
By default, \fB@IMAGEX_PROGNAME@ mount\fR and \fB@IMAGEX_PROGNAME@ mountrw\fR will ignore both
Windows-style security descriptors (which may have been set either from Windows or by
-\fB@IMAGEX_PROGNAME@ capture\fR from a NTFS-volume) and UNIX-specific data (which is from using
+\fB@IMAGEX_PROGNAME@ capture\fR from an NTFS-volume) and UNIX-specific data (which is from using
\fB@IMAGEX_PROGNAME@ capture\fR with the \fB--unix-data\fR flag). In this default mode,
all files will simply be owned by the user running \fB@IMAGEX_PROGNAME@\fR and will have mode 0777.
(Note: they will still not be accessible to other users unless you also specify
@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.
+It is possible for the size of the parts to exceed the \fIPART_SIZE\fR given.
This is impossible to avoid
because the WIM file format provides no way to divide a single file resource in
the WIM among multiple split WIM parts. So if you, for example, have a file
arguments with whitespace inside them.
.PP
On UNIX-like systems, you cannot use \fB@IMAGEX_PROGNAME@ update\fR to add files
-to an image directly from a NTFS volume using libntfs-3g, even though
+to an image directly from an 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;
directly to a block device containing an NTFS volume. This allows saving and
restoring NTFS-specific data, such as security descriptors and named data
streams, which is otherwise only supported on Windows. This feature is
-unavailable if wimlib was was configured using --without-ntfs-3g.
+unavailable if wimlib was configured using --without-ntfs-3g.
.IP \[bu]
Long path support on Windows. \fB@IMAGEX_PROGNAME@\fR can capture and apply
files with paths exceeding the MAX_PATH (260 character) limitation of the Win32
present in another WIM file. A delta WIM can be created using
\fB@IMAGEX_PROGNAME@ capture\fR with the \fB--delta-from\fR option.
.IP \[bu]
-WIMBoot support. On Windows 8.1 and later, files on a NTFS volume can be
+WIMBoot support. On Windows 8.1 and later, files on an NTFS volume can be
externally backed by a WIM archive with the help of Microsoft's Windows Overlay
FileSystem Filter Driver (WOF). With the \fB--wimboot\fR flag,
\fB@IMAGEX_PROGNAME@ apply\fR will extract "pointer files" (actually NTFS
* ::WIMLIB_PROGRESS_MSG_SCAN_DENTRY, and
* ::WIMLIB_PROGRESS_MSG_SCAN_END. */
struct wimlib_progress_info_scan {
- /** Top-level directory being scanned; or, when capturing a NTFS
+ /** Top-level directory being scanned; or, when capturing an NTFS
* volume with ::WIMLIB_ADD_FLAG_NTFS, this is instead the path
* to the file or block device that contains the NTFS volume
* being scanned. */
const wimlib_tchar *source;
/** Path to the file (or directory) that has been scanned, valid
- * on ::WIMLIB_PROGRESS_MSG_SCAN_DENTRY. When capturing a NTFS
+ * on ::WIMLIB_PROGRESS_MSG_SCAN_DENTRY. When capturing an NTFS
* volume with ::WIMLIB_ADD_FLAG_NTFS, this path will be
* relative to the root of the NTFS volume. */
const wimlib_tchar *cur_path;
/** @ingroup G_modifying_wims
* @{ */
-/** Directly capture a NTFS volume rather than a generic directory. This flag
+/** Directly capture an NTFS volume rather than a generic directory. This flag
* cannot be combined with ::WIMLIB_ADD_FLAG_DEREFERENCE or
* ::WIMLIB_ADD_FLAG_UNIX_DATA. */
#define WIMLIB_ADD_FLAG_NTFS 0x00000001
/** @ingroup G_extracting_wims
* @{ */
-/** Extract the image directly to a NTFS volume rather than a generic directory.
+/** Extract the image directly to an NTFS volume rather than a generic directory.
* This mode is only available if wimlib was compiled with libntfs-3g support;
* if not, ::WIMLIB_ERR_UNSUPPORTED will be returned. In this mode, the
- * extraction target will be interpreted as the path to a NTFS volume image (as
+ * extraction target will be interpreted as the path to an NTFS volume image (as
* a regular file or block device) rather than a directory. It will be opened
* using libntfs-3g, and the image will be extracted to the NTFS filesystem's
* root directory. Note: this flag cannot be used when wimlib_extract_image()
* @return 0 on success; nonzero on error.
*
* @retval ::WIMLIB_ERR_ALREADY_LOCKED
- * A read-write mount was requested, but an an exclusive advisory lock on
+ * A read-write mount was requested, but an exclusive advisory lock on
* the on-disk WIM file could not be acquired because another thread or
* process has mounted an image from the WIM read-write or is currently
* modifying the WIM in-place.
* An unknown operation type was specified in the update commands; or,
* attempted to execute an add command where ::WIMLIB_ADD_FLAG_NTFS was set
* in the @p add_flags, but the same image had previously already been
- * added from a NTFS volume; or, both ::WIMLIB_ADD_FLAG_RPFIX and
+ * added from an NTFS volume; or, both ::WIMLIB_ADD_FLAG_RPFIX and
* ::WIMLIB_ADD_FLAG_NORPFIX were specified in the @p add_flags for one add
* command; or, ::WIMLIB_ADD_FLAG_NTFS or ::WIMLIB_ADD_FLAG_RPFIX were
* specified in the @p add_flags for an add command in which @p
* tree for each image in the WIM.
*
* Note that this is a directory entry and not an inode. Since NTFS allows hard
- * links, it's possible for a NTFS inode to correspond to multiple WIM dentries.
+ * links, it's possible for an NTFS inode to correspond to multiple WIM dentries.
* The hard link group ID field of the on-disk WIM dentry tells us the number of
* the NTFS inode that the dentry corresponds to (and this gets placed in
* d_inode->i_ino).
* "skeleton" of the dentry has been extracted. */
u8 skeleton_extracted : 1;
- /* When capturing from a NTFS volume using NTFS-3g, this flag is set on
+ /* When capturing from an NTFS volume using NTFS-3g, this flag is set on
* dentries that were created from a filename in the WIN32 or WIN32+DOS
* namespaces rather than the POSIX namespace. Otherwise this will
* always be 0. */
le16 stream_name_nbytes;
/* Stream name in UTF-16LE. It is @stream_name_nbytes bytes long,
- * excluding the the null terminator. There is a null terminator
+ * excluding the null terminator. There is a null terminator
* character if @stream_name_nbytes != 0; i.e., if this stream is named.
* */
utf16lechar stream_name[];
*
* This is based on the algorithm used in 7-Zip's DEFLATE encoder, written by
* Igor Pavlov. However it also attempts to account for adaptive state, such as
- * a LRU queue of recent match offsets.
+ * an LRU queue of recent match offsets.
*
* Unlike a greedy parser that always takes the longest match, or even a "lazy"
* parser with one match/literal look-ahead like zlib, the algorithm used here
struct {
/* Intially, the length, in bytes, of the longest common
* prefix (LCP) between the suffix having this rank and
- * the suffix with the the smallest larger rank that
+ * the suffix with the smallest larger rank that
* starts earlier in the window than the suffix having
* this rank. If no such suffix exists, this will be 0.
*
/* Initially, the length, in bytes, of the longest
* common prefix (LCP) between the suffix having this
- * rank and the suffix with the the largest smaller rank
+ * rank and the suffix with the largest smaller rank
* that starts earlier in the window than the suffix
* having this rank. If no such suffix exists, this
* will be 0.
* distance to the rank of a suffix that is
* lexicographically closer to the current suffix than
* the desired suffix, but appears *later* in the window
- * and hence cannot be used as the basis for a LZ77
+ * and hence cannot be used as the basis for an LZ77
* match. */
lz_sarray_delta_t dist_to_next;
* distance to the rank of a suffix that is
* lexicographically closer to the current suffix than
* the desired suffix, but appears *later* in the window
- * and hence cannot be used as the basis for a LZ77
+ * and hence cannot be used as the basis for an LZ77
* match. */
lz_sarray_delta_t dist_to_prev;
};
extern const u8 lzx_extra_bits[LZX_MAX_POSITION_SLOTS];
#endif
-/* Given the number of a LZX position slot, return the number of extra bits that
+/* Given the number of an LZX position slot, return the number of extra bits that
* are needed to encode the match offset. */
static inline unsigned
lzx_get_num_extra_bits(unsigned position_slot)
}
/* Apply one image, or all images, from a WIM file to a directory, OR apply
- * one image from a WIM file to a NTFS volume. */
+ * one image from a WIM file to an NTFS volume. */
static int
imagex_apply(int argc, tchar **argv, int cmd)
{
#ifndef __WIN32__
{
- /* Interpret a regular file or block device target as a NTFS
+ /* Interpret a regular file or block device target as an NTFS
* volume. */
struct stat stbuf;
/* Entry point for wimlib's ImageX implementation. On UNIX the command
* arguments will just be 'char' strings (ideally UTF-8 encoded, but could be
- * something else), while an Windows the command arguments will be UTF-16LE
+ * something else), while on Windows the command arguments will be UTF-16LE
* encoded 'wchar_t' strings. */
int
#ifdef __WIN32__
#ifndef WITH_NTFS_3G
if (extract_flags & WIMLIB_EXTRACT_FLAG_NTFS) {
ERROR("wimlib was compiled without support for NTFS-3g, so\n"
- " it cannot apply a WIM image directly to a NTFS volume.");
+ " it cannot apply a WIM image directly to an NTFS volume.");
return WIMLIB_ERR_UNSUPPORTED;
}
#endif
}
}
/* On success, all the inodes have been moved to the image inode list,
- * so there's no need to delete from from the hash lists in the inode
+ * so there's no need to delete from the hash lists in the inode
* table before freeing the hash buckets array directly. */
ret = 0;
goto out_destroy_inode_table_raw;
/* Main bit: 1 = a match, not a literal. */
lzms_range_encode_bit(&ctx->main_range_encoder, 1);
- /* Match bit: 0 = a LZ match, not a delta match. */
+ /* Match bit: 0 = an LZ match, not a delta match. */
lzms_range_encode_bit(&ctx->match_range_encoder, 0);
/* Determine if the offset can be represented as a recent offset. */
* is a container format from which the locations and sizes (both compressed and
* uncompressed) of the constituent blocks can be determined.
*
- * A LZMS-compressed block must be read in 16-bit little endian units from both
+ * An LZMS-compressed block must be read in 16-bit little endian units from both
* directions. One logical bitstream starts at the front of the block and
* proceeds forwards. Another logical bitstream starts at the end of the block
* and proceeds backwards. Bits read from the forwards bitstream constitute
* offset is 1, regardless of match length.
*
* For LZ matches, up to 3 repeat offsets are allowed, similar to some other
- * LZ-based formats such as LZX and LZMA. They must updated in a LRU fashion,
+ * LZ-based formats such as LZX and LZMA. They must updated in an LRU fashion,
* except for a quirk: updates to the queue must be delayed by one LZMS item,
* except for the removal of a repeat match. As a result, 4 entries are
* actually needed in the queue, even though it is only possible to decode
* than 15 bits, then all frequencies must be divided by 2, rounding up, and the
* code construction must be attempted again.
*
- * A LZMS-compressed block seemingly cannot have a compressed size greater than
+ * An LZMS-compressed block seemingly cannot have a compressed size greater than
* or equal to the uncompressed size. In such cases the block must be stored
* uncompressed.
*
* at a time, this needs to be 64 bits rather than 32 bits. */
u64 bitbuf;
- /* Number of bits in @bitbuf that are are used. */
+ /* Number of bits in @bitbuf that are used. */
unsigned num_filled_bits;
/* Pointer to the one past the next little-endian 16-bit integer in the
return lzms_copy_delta_match(ctx, length, power, raw_offset);
}
-/* Decode a LZ or delta match. */
+/* Decode an LZ or delta match. */
static int
lzms_decode_match(struct lzms_decompressor *ctx)
{
return -1;
}
- /* A LZMS-compressed data block should be evenly divisible into 16-bit
+ /* An LZMS-compressed data block should be evenly divisible into 16-bit
* integers. */
if (compressed_size % 2 != 0) {
LZMS_DEBUG("Compressed size not divisible by 2 (got %zu)",
*/
/*
- * LZX is a LZ77 and Huffman-code based compression format that has many
+ * LZX is an LZ77 and Huffman-code based compression format that has many
* similarities to the DEFLATE format used in zlib. The compression ratio is as
* good or better than DEFLATE.
*
* last decompress to a fixed number of bytes, by default 32768. This is quite
* similar to the cabinet (.cab) file format, but they are not the same.
* According to the cabinet format documentation, the LZX block size is
- * independent from the CFDATA blocks, and a LZX block may span several CFDATA
+ * independent from the CFDATA blocks, and an LZX block may span several CFDATA
* blocks. However, in WIMs, LZX blocks do not appear to ever span multiple WIM
* chunks. Note that this means any WIM chunk may be decompressed or compressed
* independently from any other chunk, which allows random access.
*
- * A LZX compressed WIM chunk contains one or more LZX blocks of the aligned,
+ * An LZX compressed WIM chunk contains one or more LZX blocks of the aligned,
* verbatim, or uncompressed block types. For aligned and verbatim blocks, the
* size of the block in uncompressed bytes is specified by a bit following the 3
* bits that specify the block type, possibly followed by an additional 16 bits.
* in bytes, will be returned.
* @block_type_ret: A pointer to an int into which the type of the block
* (LZX_BLOCKTYPE_*) will be returned.
- * @tables: A pointer to a lzx_tables structure in which the
+ * @tables: A pointer to an lzx_tables structure in which the
* main tree, the length tree, and possibly the
* aligned offset tree will be constructed.
* @queue: A pointer to the least-recently-used queue into which
}
/*
- * Decompresses a LZX-compressed block of data from which the header has already
+ * Decompresses an LZX-compressed block of data from which the header has already
* been read.
*
* @block_type: The type of the block (LZX_BLOCKTYPE_VERBATIM or
/*
* ntfs-3g_apply.c
*
- * Apply a WIM image directly to a NTFS volume using libntfs-3g. Restore as
+ * Apply a WIM image directly to an NTFS volume using libntfs-3g. Restore as
* much information as possible, including security data, file attributes, DOS
* names, and alternate data streams.
*/
}
/*
- * Extract a stream (default or alternate data) to an attribute of a NTFS file.
+ * Extract a stream (default or alternate data) to an attribute of an NTFS file.
*/
static int
ntfs_3g_extract_stream(file_spec_t file, const utf16lechar *raw_stream_name,
/*
* ntfs-3g_capture.c
*
- * Capture a WIM image directly from a NTFS volume using libntfs-3g. We capture
+ * Capture a WIM image directly from an NTFS volume using libntfs-3g. We capture
* everything we can, including security data and alternate data streams.
*/
if (avl_tree_insert(&map->root, &new_node->index_node,
_avl_cmp_by_ntfs_ino))
{
- /* This should be impossible since a NTFS inode cannot
+ /* This should be impossible since an NTFS inode cannot
* have multiple DOS names, and we only should get each
* DOS name entry once from the ntfs_readdir() calls. */
ERROR("NTFS inode %"PRIu64" has multiple DOS names",
return 0;
}
-/* Returns a structure that contains the DOS name and its length for a NTFS
+/* Returns a structure that contains the DOS name and its length for an NTFS
* inode, or NULL if the inode has no DOS name. */
static struct dos_name_node *
lookup_dos_name(const struct dos_name_map *map, u64 ntfs_ino)
return ret;
}
-/* Recursively build a WIM dentry tree corresponding to a NTFS volume.
+/* Recursively build a WIM dentry tree corresponding to an NTFS volume.
* At the same time, update the WIM lookup table with lookup table entries for
* the NTFS streams, and build an array of security descriptors.
*/
return hashes_cmp(SD_NODE(n1)->hash, SD_NODE(n2)->hash);
}
-/* Inserts a a new node into the security descriptor index tree. Returns true
+/* Inserts a new node into the security descriptor index tree. Returns true
* if successful (not a duplicate). */
static bool
insert_sd_node(struct wim_sd_set *set, struct sd_node *new)
if (!is_entire_image) {
if (add_flags & WIMLIB_ADD_FLAG_NTFS) {
- ERROR("Cannot add directly from a NTFS volume "
+ ERROR("Cannot add directly from an NTFS volume "
"when not capturing a full image!");
return WIMLIB_ERR_INVALID_PARAM;
}
* @stream_list_ret.
*
* SKIP_EXTERNAL_WIMS: Streams already present in a WIM file, but not
- * @wim, shall be be returned in neither @stream_list_ret nor
+ * @wim, shall be returned in neither @stream_list_ret nor
* @lookup_table_list_ret.
*
* @stream_list_ret
* Integrity table (optional) (variable size)
*
* This method allows an image to be appended to a large WIM very quickly, and
- * is is crash-safe except in the case of write re-ordering, but the
+ * is crash-safe except in the case of write re-ordering, but the
* disadvantage is that a small hole is left in the WIM where the old lookup
* table, xml data, and integrity table were. (These usually only take up a
* small amount of space compared to the streams, however.)
match_len += XPRESS_MIN_MATCH_LEN;
- /* Verify the match is in bounds, then copy its data to the the current
+ /* Verify the match is in bounds, then copy its data to the current
* position. */
if (window_pos + match_len > window_len)
if ! ntfs-3g -o "no_def_opts,silent" $1 $2; then
if [ $UID -ne 0 ] && [ "$3" = "nofail" ]; then
echo "WARNING: skipping NTFS tests because we aren't able to "
- echo "mount a NTFS volume (perhaps ntfs-3g is not installed setuid root?)"
+ echo "mount an NTFS volume (perhaps ntfs-3g is not installed setuid root?)"
skip_test
else
error "Could not mount NTFS volume \"$1\" on \"$2\"! Make sure ntfs-3g is "\
"installed, and that you are either running the tests as root or have ntfs-3g "\
- "installed setuid root, so that we can mount a NTFS volume."
+ "installed setuid root, so that we can mount an NTFS volume."
fi
fi
}
echo "Dumping tree of applied image"
tree out.mnt --inodes -F -s --noreport
error 'Information was lost or corrupted while capturing
- and then applying a NTFS volume'
+ and then applying an NTFS volume'
fi
fi
rm -rf out.mnt/* in.mnt/*