What is the most efficient, native way to image a Windows partition?
- Why is the native method generally the best method for most users?
- How does the native method differ from conventional cloning?
- What are the pros and cons of native versus third-party tools?
How do I configure system partitions on a new drive for applying an image?
- Since a factually inaccurate answer by @harrymc is still receiving upvotes, in large part due to his site seniority, please see this answer, which fact checks each of his claims.
- Accepted, factually-accurate, answer
- Annotation:
- Many have taken issue with the "image" nomenclature with "image" [per Microsoft] being the correct terminology
- It's not up to an individual to change a developer's nomenclature and if I was to arbitrarily and individually change the nomenclature, it would only sow more confusion when referencing Microsoft Docs [Windows' man pages]
- While I can't definitively point to any specific Windows whitepaper, Windows' "image" nomenclature likely comes from how Windows is referred to from a servicing standpoint, which is as an "image", and is why
DISM
has the/Online
and/Image
parameters:- Online image servicing deals with a
%SystemDrive%
while booted to it - Offline image servicing deals with a non-booted to
%SystemDrive%
- Image management deals with the topic of this question
- Online image servicing deals with a
- Many have taken issue with the "image" nomenclature with "image" [per Microsoft] being the correct terminology
Best Answer
For the majority of users, capturing an image of a Windows partition via
DISM
(Win XP ≤ 7:ImageX
) is generally the best and most efficient method, while also not causing the configuration issues all too common with third-party tools./Compress:Recovery
(algorithm is ~33% more efficient than/Compress:Max
)Windows ≤ 8.1: Only a bootable Windows install can be captured as an ESD
DISM
included within them (Win XP ≤ 7:ImageX
):(Windows Setup boot media: SHIFT+F10 to access terminal)
(WinRE is a WinPE image containing extra WinPE Optional Components vital to recovery)
Annotation:
DISM
has the/Online
and/Image
parameters:%SystemDrive%
while booted to it%SystemDrive%
Imaging:
(Powershell cmdlet mapping)
Specify exclusions or exceptions by creating a
WimScript.ini
config file, with/ScratchDir
being required in WinPE since it only has 32MB of scratch [temp] space by default:/Compress:Max
to/Compress:Fast
if not saving captured image to an SSD.swm
files via/Split-Image
/Delete-Image
or exported to their own image via/Export-Image
Accessing data within a WIM or ESD:
Read-only:
/ReadOnly
).wim
/.esd
within the 7zip GUI/discard
changes)Make changes, or add data, to an image [index]:
/Commit
changes)DISM
, to save changes as a new appended image, add/Append
/CheckIntegrity
(ImageX
:/Check
) &/Verify
are always used.wim
/.esd
is not the best solution for all imaging [cloning] use cases, but is for most:.wim
/.esd
requires a storage medium to house the captured image (partition not being imaged, USB drive, network share, etc.), serving the dual purpose of also being an actual backup base image.wim
/.esd
when a new image [index] is appended to it; newly appended images utilize the same copy of unchanged files already contained within the image from the previous image(s) (hash verified), allowing for an image to remain small in relation to the data withinAppended image example:
(note
Base.wim
size compared to each contained index and sum of all data therein):The vast majority of Windows users have no need for partition-level or disk-level images:
DISM
/ImageX
creates a filesystem image, not a partition partition-level or disk-level image:(Win ≥ XP uses NTFS as the default filesystem)
C:\
],DISM
/ImageX
captures an image of all data on that partition, but not the structure of the partition/drive itself (offset, alignment, block size, etc.), bypassing the inconvenience a conventional partition/drive image creates, as only filesystem data is contained within a.wim
/.esd
, allowing it to be applied to any partition, regardless of size difference or whether there is existing data on the partition.Third-party tools will almost always fall into one of two categories, Linux-based or Windows-based via
DISM
/ImageX
/Powershell
, with many resulting in configuration issues, and the latter sometimes encompassing developers who use proprietary image file formats and custom boot environments (many of which are Linux-based).DISM
(Win XP ≤ 7:ImageX
), however thousands of questions, answers, and comments exist for issues arising from third-party imaging tools:Windows cloning problem (3,838 results)
DISM
:Dism /Capture-Image
issue (60 results)Windows
Dism /Capture-Image
problem (44 results)Dism /Append-Image
issue (20 results)Windows
Dism /Append-Image
problem (12 results)Dism /Apply-Image
issue (85 results)Windows
Dism /Apply-Image
problem (93 results)ImageX
:ImageX /Capture
issue (19 results)Windows
ImageX /Capture
problem (20 results)ImageX /Append
issue (10 results)Windows
ImageX /Append
problem (5 results)ImageX /Apply
issue (15 results)Windows
ImageX /Apply
problem (12 results)Ever come across advice telling a BSD or Linux user to boot to Windows or use Wine to back up their data? For example,
ntfsclone
(part ofntfs-3g
) is a popular Linux utility, with the following from it's man page:WIMs/ESDs don't have these issues since they only contain filesystem information (files and directories), not partition/drive level data, allowing them to be applied to any partition, regardless of size difference or whether there is existing data.
Native Pros:
/CheckIntegrity
(ImageX
:/Check
) &/Verify
are always usedNative Cons:
/Compress:Max
or/Compress:Recovery
, it's more efficient to use/Compress:Fast
, exporting the image later usingMax
orRecovery
/CheckIntegrity
(ImageX
:/Check
) andVerify
do extend the image processing time, they should always be usedDiskPart
: (select the OS drive the image is being applied to)Assumes no data on drive is being preserved, as
clean
wipes the drive's partition table UEFI:WinRE.wim
is ~300MB in size)C:
can't be assigned: change 4 & 5 to another letter)BIOS: UEFI:
If storing User Data directories on a partition other than
C:\
(recommended), max size required is ~300GB (multiply size wanted by 1024:200*1024=204800
)BIOS: UEFI:
BIOS: UEFI:
UEFI: