Converting a MBR to GPT disk
I was hoping it would be a very easy process to clone and replace my 1Tb OS SSD with a 4Tb SSD. I knew that due to the size of the disk I had to convert it from using Master Boot Record (MBR) to GUID Partition Table (GPT); what I did not realise was that the disk “Unique Identifier” would be more significant and problematic than online guides and comments had suggested.
Most of the guides suggested disconnecting the original disk after cloning had completed. I didn’t want to do this for two main reasons 1) My PC was in an awkward position and it was difficult to get to the drives at this time and 2) This was my only OS and I didn’t want to risk getting in a muddle with other disconnected disks/slots etc.
UniqueId⌗
All disks have a UniqueId associated with them to ensure that that are unique; this UniqueId will be the same if you cloned the disk. If you boot into Windows with two disks with the same UniqueId, Windows will offline one of them (the new clone in my case) with the warning with words to the effect of “Disk is offline due to a Id conflict”.
What Windows doesn’t tell you is that if you:
- Online the disk manually, either via
diskmgmt.mscor viadiskpart - Enter Windows RE (Recovery Environment from a USB/ISO)
Windows/RE will automatically assign a new UniqueId in order to Online the disk. This is what caused some confusion.
MBR2GPT⌗
MBR2GPT seems to be the recommended way to convert your Windows OS disk from MBR to GPT; this tool is shipped with Windows releases.
The UniqueId issue⌗
Unbeknownst to me at the time the issue I that was experiencing was due to Windows/RE automatically reassigning a UniqueId to the new cloned disk; this was causing MBR2GPT failure to locate the OS partition on the disk, thereby preventing the tool from running.
The Solution⌗
- Note the
UniqueIdof he original disk - Disconnect the original disk
- Ensure the
UniqueIdof the new clone matches the originalUniqueId - Run MBR2GPT to convert the new clone from MBR to GPT.
- (If necessary, recreate the Windows
Recovery Partition)
How to convert⌗
Prerequisites⌗
- A Windows USB/ISO to boot into Windows RE
- Windows OS disk partitioned with MBR
- This disk having no more than 3 partitions (MBR, OS, and Recovery)
- Meets all other requirements necessary to run MBR2GPT tool.
Let’s Convert⌗
- Once your clone has finished disconnect the origonal drive (this is an important step to prevent a disk UniqueId conflict)
- Run MBR2GPT
Boot into your Windows RE and run DISKPART
diskpart
list disk
Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 3726 GB 2795 GB
select disk 0
Disk 0 is now the selected disk.
detail disk
Samsung SSD 870 EVO 4TB
Disk ID: <YourID (eg. E769386E Random 8 Hex digits)>
Confirm this is the correct disk.
exit
mbr2gpt /validate /disk:0
MBR2GPT: Attempting to validate disk 0
MBR2GPT: Retrieving layout of disk
MBR2GPT: Validating layout, disk sector size is: 512 bytes
MBR2GPT: Validation completed successfully
mbr2gpt /convert /disk:0
MBR2GPT will now attempt to convert disk 0.
If conversion is successful the disk can only be booted in GPT mode.
These changes cannot be undone!
MBR2GPT: Attempting to convert disk 0
MBR2GPT: Retrieving layout of disk
MBR2GPT: Validating layout, disk sector size is: 512 bytes
MBR2GPT: Backing up the system partition
MBR2GPT: Creating the EFI system partition
MBR2GPT: Installing the new boot files
MBR2GPT: Performing the layout conversion
MBR2GPT: Migrating default boot entry
MBR2GPT: Adding recovery boot entry
MBR2GPT: Fixing drive letter mapping
MBR2GPT: Conversion completed successfully
MBR2GPT: Before the new system can boot properly you need to switch the firmware to boot to UEFI mode!
And you are done! You may need to recreate the Recovery Partition though.⌗
Help! MBR2GPT is not finding my OS partition!⌗
This is most likely due to Windows/RE automatically changing the disk’s uniqueId.
Repeat the steps above and ensure that in the output of detail disk or uniqueId disk the uniqueId matches your origional disk.
If it does not run the follow to set your new clone back to it’s original uniqueId
select disk 0
Disk 0 is now the selected disk.
uniqueid disk id=E769386E