Table of Contents
Clone Windows Partition to same disk
Some of the knowledge of this page is derived from gemini.google.com. Experience says… Sometimes you need to test and/or verify a gemini answer.
Why?
Why would you clone the Windows partition to another partition on the same disk?
Reason 1) You want a “copy/backup” of the windows partition. This copy can serve as a backup when/if you upgrade one of the resulting Windows 10 partitions to Windows 11. Or…. If you have “plenty” of room on your “C drive”, the copy is a reliable backup of Windows.
There is a set of things that need to be done after one clones the Windows partition to another partition on the same disk, that will allow the copy/clone to be bootable. That set includes….. 1) Change the “guid” of the copied partition. 2) In the registry of the copy/clone, you need to “adjust” references to the old “guid”. The registry key involved is in HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices, on the cloned/copied partition. Do NOT change the keys on the original partition. The key with the name “DosDevices\C:” should be renamed, removed or deleted. Renaming the key to “DosDevices\”An unused drive letter“:” should be “good enough”.
The process in a nutshell
1) Create space for the clone.
Tool. Windows Disk Management. Windows Disk Management requires invocation from an administrative account. Use this tool to “shrink” the Windows (C drive) partition to something slightly larger than the space used in the present Windows partition. 20 gigabytes more of the space presently consumed by the Windows partition will do. If the present space consumed in the Windows partition is approaching 50% of the size of the Windows partition, this process is probably not a good idea for the hard drive in your computer. Solution… Get a bigger storage device and clone the present storage device to the new/larger one. Install the new/bigger device and keep the smaller one as a backup.
2) Clone/copy the partition to the empty space. Experience says… Make sure that “chkdsk c:” identifies there are NO errors on the partition you are cloning. Cloning tools typically “fail to complete” if “chkdsk” indicates there are issues with the partition or disk.
Tool options… For ease of use and automated handling of resizing when copying to a smaller partition (as long as the data fits), AOMEI Partition Assistant Standard, MiniTool Partition Wizard Free, and EaseUS Partition Master Free Edition are generally the best choices for Windows users. They offer a graphical interface and “intelligent cloning” features that simplify the process.
If you're comfortable with more advanced, bootable environments and need maximum control, Clonezilla is incredibly powerful but requires more technical know-how.
3) Change the “guid” of the copied partition.
Why? Windows can be confused if partitions have the “same” guid. Cloning a partition usually creates a partition with the SAME guid as the original.
Tool to use… sgdisk64. This tool is used to view or change the partition unique gui d of the Windows partition. The partition unique guid will probably be the same after you clone a partition. After confirming the guids are the same, sgdisk64 will be used to change the partition unique guid of the clone/copy.
4) Make the new partition bootable.
Tool options… Windows “bcdboot” to create a new boot option. “msconfig.exe” to adjust boot options. There is a “boot” tab in the msconfig.exe application that provides the ability to “fine tune” boot options and the selection of the default boot partition. If you want to understand bcdboot, gemini.google.com might be helpful. Ask gemini.google.com this question… “ As to Windows bcdboot. Please show me the bcdboot options for adding a cloned copy of the windows partition to the windows boot menu.” The simplist form would be “bcdboot F:\Windows”, where F: is the drive letter that identifies the cloned copy of windows.
As to the details for changing the Guid of the copied partition.
This process is possibly the “most risky”. Why? If you do not understand or “make a mistake”, the integrity of the storage device ( C drive) is at risk. If you change the guid of the wrong(original) partition, that is NOT GOOD!.
The tool for changing the guid of a paritition was identified by one of my questions to gemini. The tool is sgdisk64.exe which is part of the gptfdisk project from https://sourceforge.net/projects/gptfdisk/ . You need to download the zip file from this site and extract the contents to a directory. The program you will use to change the guid of the copied partition is sgdisk64.exe. The files extracted from the zip file includes documentation and references to books that detail how to use sgdisk64, cgdisk64 and gdisk64. All of these tools are programs executed from the command prompt.
Example.. Changing the Partition Unique Guid of partition 1 on disk 4.
Step 1. Observe the partition table of disk 4.
C:\Users\Phillip\Downloads\gdisk-windows-1.0.10>sgdisk64 -p 4:
Disk 4:: 122880000 sectors, 58.6 GiB
Sector size (logical): 512 bytes
Disk identifier (GUID): 0E8C7400-FCC0-03B7-001D-A30330FFED00
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 122879966
Partitions will be aligned on 2048-sector boundaries
Total free space is 4029 sectors (2.0 MiB) ===
Number Start (sector) End (sector) Size Code Name
1 2048 11063295 5.3 GiB 0700 Basic data partition
2 11063296 48951295 18.1 GiB 0700 Basic data partition
3 48951296 122877951 35.3 GiB 0700 Basic data partition
Step 2: Observe the present value of the Partition Unique Guid for partition 1.
C:\Users\Phillip\Downloads\gdisk-windows-1.0.10>sgdisk64 -i 1 4:
Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)
Partition unique GUID: 50065F70-FE60-01DB-B82B-032830FFED00
First sector: 2048 (at 1024.0 KiB)
Last sector: 11063295 (at 5.3 GiB)
Partition size: 11061248 sectors (5.3 GiB)
Attribute flags: 0000000000000000
Partition name: 'Basic data partition'
Step 3: Change the Partition Unique Guid of partition 1 on disk 4.
C:\Users\Phillip\Downloads\gdisk-windows-1.0.10>sgdisk64 -u 1:R 4:
Disk synchronization succeeded! The computer should now use the new
partition table.
The operation has completed successfully.
Step 4: Verify the Partition Unique Guid of partition 1 on disk 4 has changed.
C:\Users\Phillip\Downloads\gdisk-windows-1.0.10>sgdisk64 -i 1 4:
Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)
Partition unique GUID: C177F3D2-3275-4126-BEC0-348FF6EF6CE9
First sector: 2048 (at 1024.0 KiB)
Last sector: 11063295 (at 5.3 GiB)
Partition size: 11061248 sectors (5.3 GiB)
Attribute flags: 0000000000000000
Partition name: 'Basic data partition'
Discussion