In Windows 10 1703 update, Microsoft added MBR2GPT command line tool, that lets you convert your system disk’s partition table from MBR to GPT. In general, this is done, so that Windows can boot in modern UEFI mode instead of old BIOS mode and to support disks bigger than 2 TB. Unfortunately, it didn’t work for me as I always got “Cannot find OS partition” error.
C:\Windows\system32>MBR2GPT.EXE /convert /allowfullos
MBR2GPT will now attempt to convert the default book disk.
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
Cannot find OS partition(s) for disk 0
After checking logs (%windir%/setupact.log), it was clear it had a problem with my recovery boot option — it was going through all GUIDs in my BCD (Boot Configuration Data), and failed on the one assigned to recovery entry. This entry was disabled (yet still had GUID assigned to it, which apparently led nowhere and that seems to have been the root cause). I searched some discussion forums, and most of them said that I would have to somehow create recovery partition.
Windows Recovery Environment (Windows RE) and system reset configurationInformation:
Windows RE status: Disabled
Windows RE location: <-- Nothing here
Boot Configuration Data (BCD) identifier: 9c010806–7e29–11e8–86cb-001a7dda710c <-- Not all zeroes
Recovery image location:
Recovery image index: 0
Custom image location:
Custom image index: 0REAGENTC.EXE: Operation Successful.
Fortunately, it turned out to be a lot easier :) Windows has another command line tool, called REAgentC, which can be used to manage its recovery environment. I ran reagentc /info, which showed that recovery is disabled and its location is not set, but it had assigned the same GUID that was failing when running MBR2GPT. So, I ran reagentc /enable, which set recovery location and voila, this time MBR2GPT finished its job successfully.
All commands mentioned here should be run from elevated command prompt (right click on cmd.exe and choose “Run as administrator”).