cloned drive with 1TB capacity allocated 813GB to WinRE tools, and I can't expand the C drive
I cloned a 120GB SSD to a 1TB ssd using Macrium Reflect. I followed the directions per the following video (https://www.youtube.com/watch?v=7H7D1HcfY9o), but when I booted from the newly-cloned SSD and inspected the new (cloned) drive, it seems to have allocated the same 120GB of the old drive to the new drive as the primary partition, and it allocated the remaining 813GB to WinRE tools. How do I expand the primary partition to have it use the available space that was wrongly allocated to the WinRE partition?
This is one of many reasons why 3rd party cloning tools are not recommended. Windows natively supports imaging of partitions via DISM
in Windows >=8, or ImageX
in Windows <=7, of which are far superior to 3rd party cloning tools and do not cause configuration issues.
-
It may simply be more efficient to re-image the SSD and re-apply the image via
DISM
orImageX
, showing how to do this after the line break below under Imaging.
- If knowing how to re-create the WinRE partition and have not removed its contents from the SSD, simply delete the partition via
DiskPart
or Disk Management (diskmgmt.msc
), opening either via WinKey+R.- Once done, you'll be able to expand the system partition and re-create a 512MB WinRE partition
(with its special hex or GUID identifier inDiskpart
)- Open Admin terminal via WinKey+R
-
Open:
cmd
- While pressing CTRL+SHIFT select OK, and approve escalation of privileges
- Issue:
reagentc /disable
- Issue:
DiskPart
-
sel dis 0
- where
0
is the 1TB drive (list drives vialis dis
)
- where
-
sel par 3
- Where
3
is the WinRE partition (list partitions vialis par
)
- Where
-
del par
- If receiving an error, issue
del par override
- If receiving an error, issue
-
-
Open:
- Resize system partition via Disk Management (don't close
DiskPart
)- Right-click on system partition > Extend Volume...
- Re-create WinRE partition (go back to
DiskPart
terminal):- MBR:
cre par pri size=512 id=27
GPT:cre par pri size=512 id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
- Assign correct attributes:
gpt attributes=0x8000000000000001
- Assign correct attributes:
- Format WinRE partition:
format fs=ntfs quick label=Recovery
- Assign drive letter:
assign letter=z
- Copy files from old drive's WinRE partition to WinRE drive Z:
- Re-register WinRE via a NEW Admin terminal:
reagentc /setreimage /path Z:\Recovery\WindowsRE /target C:\Windows
reagentc /enable
- Remove WinRE drive letter (go back to
Diskpart
terminal):remove
- MBR:
- Open Admin terminal via WinKey+R
- Once done, you'll be able to expand the system partition and re-create a 512MB WinRE partition
Imaging
When it comes to Windows, 3rd party tools are not an efficient way to image a partition.
- Windows has always natively supported imaging of partitions or individual directories..
- The system partition can only be imaged from WinPE/WinRE, while all other partitions are able to be imaged while booted to Windows.
- WIMs (Windows IMage) can be captured of an entire partition or individual folders/files.
Create aWimScript.ini
config file to specify exclusions or exceptions.
-
All WinPE/WinRE WIMs have either
ImageX
orDISM
included within them.-
WinPE: Windows Preinstallation Environment
- Such as a Windows Setup boot media (SHIFT + F10 to access terminal)
-
WinRE: Windows Recovery Environment
- WinRE is a WinPE image containing extra WinPE Optional Components vital to recovery
-
Commands
WinPE only has 32MB of scratch [temp] space by default, so /ScratchDir
is required
-
Windows >=8:
DISM
is utilized-
Capture an image:
DISM /Capture-Image /ImageFile:"Z:\Base.wim" /CaptureDir:"C:" /Name:"Windows Backup" /Description:"Base Image 2019.09.14 @ 09:25" /Compress:Max /CheckIntegrity /Verify /NoRpFix /ScratchDir:"Z:\"
-
Apply an image:
DISM /Apply-Image /ImageFile:"Z:\Base.esd" /Index:1 /ApplyDir:"C:" /CheckIntegrity /Verify /NoRpFix /ScratchDir:"Z:\"
-
-
Windows <=7:
ImageX
is utilized in lieu ofDISM
:-
Capture an image:
ImageX /Capture "C:" "Z:\Base.esd" "Windows Backup" "Base Image 2019.09.14 @ 09:25" /Compress:Recovery /Check /Verify /NoRpFix /ScratchDir:"Z:\"
-
Apply an image:
ImageX /Apply "Z:\Base.wim" 1 "C:" /Check /Verify /NoRpFix /ScratchDir:"Z:\"
-
NOTE:
-
It's impossible for an ESD/WIM image to become corrupted
- Provided imaging commands are always issued with:
-
DISM:
/CheckIntegrity
&/Verify
-
ImageX:
/Check
&/Verify
-
DISM:
- Provided imaging commands are always issued with:
-
ESDs can only be taken of a system partition
-
/Compress:Recovery
is the only compression algorithm available.- ESD compression ratio is ~33% more efficient than the WIM compression ratio.
-
In Windows 10, Microsoft only allows ESDs for Push-Button Reset exported images
-
-
ESDs/WIMs are smart compression image formats
- Only changed files are added to an image when a new image is appended to it
- Newly appended images utilize the same copy of unchanged files already contained within the image from the previous image(s).
- This allows for an image to remain small in relation to the data contained within.
- Newly appended images utilize the same copy of unchanged files already contained within the image from the previous image(s).
- Only changed files are added to an image when a new image is appended to it
DISM & ImageX Prerequisites
-
Easy
- Download & create a bootable USB:
- DISM: Windows Media Creation Tool
- ImageX: Windows 7 Install ISO
- Once booted from it, press: SHIFT + F10 to open a terminal
-
DISM / ImageX commands
- Capture or Append an Image
-
Apply Image
- Get Image Info (
ImageX /Info
), prior to applying, ensuring correct index [image] is being applied.
- Get Image Info (
- Download & create a bootable USB:
-
Custom: Create a WinPE/RE image
-
Install:
- Windows ADK (8 & 10) || AIK (7) is specific to the version of Windows installed.
-
ADK:
- For Windows >=10 v1809: WinPE Addon for ADK
- For Windows <=10 v1803: Windows ADK
- Select: Windows PE & Deployment Tools
-
AIK:
- ImageX: Windows 7 AIK
-
Run:
StartCD.exe
> Windows AIK Setup
-
Run:
- ImageX: Windows 7 AIK
-
ADK:
- Windows ADK (8 & 10) || AIK (7) is specific to the version of Windows installed.
-
Create:
-
Microsoft WinPE Wiki
- Customize WinPE
- Customize WinRE
- Reboot.Pro Wiki
-
Microsoft WinPE Wiki
- Boot it
-
Install:
Example: /Get-WIMinfo
|| /Info
PS $ ls -file
Directory: Z:\WIM
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 2018.12.24 03:34:13 95,019,530,773B Base.wim
-a---- 2016.06.14 22:32:36 568B DISM.cmd
-a---- 2016.05.17 05:36:10 97B wimscript.ini
PS $ dism /get-wiminfo /wimfile:Base.wim
Deployment Image Servicing and Management tool
Version: 10.0.18362.1
Details for image : Base.wim
Index : 1
Name : Alienware 18: Windows 10
Description : v1803: Base (Drivers Only)
Size : 22,710,283,446 bytes
Index : 2
Name : Alienware 18: Windows 10
Description : v1803: Software Installed (No Customizations)
Size : 45,591,850,754 bytes
Index : 3
Name : Alienware 18: Windows 10
Description : v1803: Software Installed (Customized)
Size : 94,958,267,312 bytes
Index : 4
Name : Alienware 18: Windows 10
Description : v1803: Software Group 1 Installed (Customized)
Size : 101,588,267,910 bytes
Index : 5
Name : Alienware 18: Windows 10
Description : v1803: Software Group 2 Installed (Customized)
Size : 101,905,314,237 bytes
Index : 6
Name : Alienware 18: Windows 10
Description : v1809: Updated Applications
Size : 114,959,954,040 bytes
The operation completed successfully.
PS $ dism /get-wiminfo /wimfile:Base.wim /index:1
Deployment Image Servicing and Management tool
Version: 10.0.18362.1
Details for image : Base.wim
Index : 1
Name : Alienware 18: Windows 10
Description : v1803: Base (Drivers Only)
Size : 22,710,283,446 bytes
WIM Bootable : No
Architecture : x64
Hal : acpiapic
Version : 10.0.17134
ServicePack Build : 1
ServicePack Level : 1
Edition : Professional
Installation : Client
ProductType : WinNT
ProductSuite : Terminal Server
System Root : WINDOWS
Directories : 24288
Files : 112665
Created : 2018.05.05 - 13:56:47
Modified : 2018.05.05 - 13:56:47
Languages :
en-US (Default)
The operation completed successfully.
PS $ dism /get-wiminfo /wimfile:Base.wim /index:2
Deployment Image Servicing and Management tool
Version: 10.0.18362.1
Details for image : Base.wim
Index : 2
Name : Alienware 18: Windows 10
Description : v1803: Software Installed (No Customizations)
Size : 45,591,850,754 bytes
WIM Bootable : No
Architecture : x64
Hal : acpiapic
Version : 10.0.17134
ServicePack Build : 1
ServicePack Level : 1
Edition : Professional
Installation : Client
ProductType : WinNT
ProductSuite : Terminal Server
System Root : WINDOWS
Directories : 45803
Files : 203058
Created : 2018.05.06 - 01:55:47
Modified : 2018.05.06 - 01:55:48
Languages :
en-US (Default)
The operation completed successfully.
PS $ dism /get-wiminfo /wimfile:Base.wim /index:3
Deployment Image Servicing and Management tool
Version: 10.0.18362.1
Details for image : Base.wim
Index : 3
Name : Alienware 18: Windows 10
Description : v1803: Software Installed (Customized)
Size : 94,958,267,312 bytes
WIM Bootable : No
Architecture : x64
Hal : acpiapic
Version : 10.0.17134
ServicePack Build : 1
ServicePack Level : 81
Edition : Professional
Installation : Client
ProductType : WinNT
ProductSuite : Terminal Server
System Root : WINDOWS
Directories : 62409
Files : 350446
Created : 2018.06.01 - 19:09:51
Modified : 2018.06.19 - 21:26:18
Languages :
en-US (Default)
The operation completed successfully.
PS $ dism /get-wiminfo /wimfile:Base.wim /index:4
Deployment Image Servicing and Management tool
Version: 10.0.18362.1
Details for image : Base.wim
Index : 4
Name : Alienware 18: Windows 10
Description : v1803: Software Group 1 Installed (Customized)
Size : 101,588,267,910 bytes
WIM Bootable : No
Architecture : x64
Hal : acpiapic
Version : 10.0.17134
ServicePack Build : 1
ServicePack Level : 81
Edition : Professional
Installation : Client
ProductType : WinNT
ProductSuite : Terminal Server
System Root : WINDOWS
Directories : 61908
Files : 346074
Created : 2018.06.08 - 21:54:02
Modified : 2018.06.19 - 21:26:18
Languages :
en-US (Default)
The operation completed successfully.
PS $ dism /get-wiminfo /wimfile:Base.wim /index:5
Deployment Image Servicing and Management tool
Version: 10.0.18362.1
Details for image : Base.wim
Index : 5
Name : Alienware 18: Windows 10
Description : v1803: Software Group 2 Installed (Customized)
Size : 101,905,314,237 bytes
WIM Bootable : No
Architecture : x64
Hal : acpiapic
Version : 10.0.17134
ServicePack Build : 1
ServicePack Level : 81
Edition : Professional
Installation : Client
ProductType : WinNT
ProductSuite : Terminal Server
System Root : WINDOWS
Directories : 76113
Files : 423408
Created : 2018.06.09 - 20:38:36
Modified : 2018.06.19 - 21:26:18
Languages :
en-US (Default)
The operation completed successfully.
PS $ dism /get-wiminfo /wimfile:Base.wim /index:6
Deployment Image Servicing and Management tool
Version: 10.0.18362.1
Details for image : Base.wim
Index : 6
Name : Alienware 18: Windows 10
Description : v1809: Updated Applications
Size : 114,959,954,040 bytes
WIM Bootable : No
Architecture : x64
Hal : acpiapic
Version : 10.0.17763
ServicePack Build : 195
ServicePack Level : 0
Edition : Professional
Installation : Client
ProductType : WinNT
ProductSuite : Terminal Server
System Root : WINDOWS
Directories : 87659
Files : 452028
Created : 2018.12.24 - 04:27:13
Modified : 2018.12.24 - 04:27:15
Languages :
en-US (Default)
The operation completed successfully.