Getting Started with MBR2GPT

devices-windows-10-creators-update-banner

In my previous post, BIOS to UEFI made easier with Windows 10 Creators Update, I uncovered a hidden gem in the 15007 build of the Windows 10 Enterprise Insider Preview called MBR2GPT. The benefits of this MBR to GPT conversion utility is that it makes it easier to convert systems from BIOS to UEFI and be able to take advantage of all the security features that comes in Windows 10 like Secure Boot, Device Guard and Credential Guard (to name a few). Currently, in order to stay supported by Microsoft, the hard disk needs to be completely repartitioned and formatted when switching from MBR to GPT. This is a destructive process and requires the user data to be backed up off of the hard drive, applications to be re-installed and then the user data restored once the new OS is up and running. Without the proper tools (shameless plug – see the 1e Windows 10 Now Solution), this can be a cumbersome task.

You still want to put some thought into applications as it relates to an in-place upgrade. There will be some applications that will be upgrade blockers (mainly 3rd party antivirus that is not compatible with the Windows 10 in-place upgrade process or 3rd party disk encryption) and need to be uninstalled prior to the in-place upgrade. There will also be applications that you will want upgraded – do you really want to run Office 2003 which may have been your standard on Windows 7 on Windows 10 or would you like to uplift it to Office 365 as part of the process? You might also want to replace an application with a less costly application (like swapping an expensive FTP client with a less expensive one). And lastly, you might want to uninstall applications that are not used in order to reduce your security foot print and eliminate unnecessary patching. These are things to consider when venturing down the in-place upgrade deployment method.

Applications aside for now, let’s get back to MBR2GPT…

You are probably wondering what are the options for using this utility – well, I can tell you if you have already deployed Windows 10 to BIOS systems you are fortunately in luck. Also, if you have not even started your Windows 10 upgrade, you are also in luck. The basic upgrade process will look like the following:

Windows* running on BIOS > In-place upgrade to Windows 10 (probably Creators Update) – still running BIOS at this point > MBR2GPT > Vendor BIOS Settings > Reboot > Windows 10 running UEFI.

Where Windows* is any version that supports upgrading to a Windows 10 version that supports MBR2GPT (like Windows 7 SP1 x64, Windows 8/8.1 x64 and previous versions of Windows 10-1507/1511/1607).

Now that we have that covered, let’s see how this tool actually runs. Below, I have an Insiders build of Windows 10 Creators Update (note that this is build 15002 and that MBR2GPT is in 15007). As you can see, BIOS Mode is Legacy and there is a single hard disk with Master Boot Record(MBR) volume:

001-getting-started-mbr2gpt

I have copied the MBR2GPT utility from a 15007 build on to the C: drive of this system. Running MBR2GPT.exe /? displays the following help output:

001-mbr2gpt

First thing I want to do here is test it using the /validate switch to see if it is actually going to work and what kind of output is going to be displayed by running:

MBR2GPT.EXE /disk:0 /validate /allowFullOS

This results in the following on-screen output:

002-getting-started-mbr2gpt

And the following output is logged in %windir% in the setupact.log:

003-getting-started-mbr2gpt

Now, I am going to run the command without the /validate switch. Notice the additional output on the command line and refreshing the disk volume properties shows it to be GUID Partition Table (GPT):

004-getting-started-mbr2gpt

Next, this is where we would run the vendor tool to change the correct BIOS settings (we will do that later in a Task Sequence when we automate the process), but for now I am going to reboot and hit the proper key to get into the BIOS settings.

After making the necessary changes (and I even enabled Secure Boot), notice that System Information displays the BIOS Mode as UEFI with Secure Boot State set to On:

005-getting-started-mbr2gpt

This first look at the MBR2GPT conversion utility looks very promising. Hopefully in the coming months as we get closer to the release of Windows 10 Creators Update we will start to get more information on it as well as what versions of Windows 10 will support it.

In my next blog, Using MBR2GPT with Configuration Manager OSD, I am going to show how we can integrate MBR2GPT into an OSD Task Sequence.

Originally posted on https://miketerrill.net/

18 thoughts on “Getting Started with MBR2GPT

  1. Pingback: Using MBR2GPT with Configuration Manager OSD | Mike's Tech Blog

  2. Pingback: Using MBR2GPT with Configuration Manager OSD | Mike's Tech Blog

  3. Pingback: BIOS to UEFI made easier with Windows 10 Creators Update | Mike's Tech Blog

  4. Hi Mike,

    Could you confirm that this still be a destructive process for data hosted on the machine? I know that it’s written in the first paragraph but with the explaination after I’m not sure.
    Because it seems to beatiful to be true.

    Thank you

  5. Got the same error as Materrill attempting to perform a somewhat unsupported conversion during a OS refresh from Offline Windows 7 to Windows 10 1703 in a WinPE 10.0.14393 (1607):

    2017-05-03 01:18:27, Info MBR2GPT: Performing the layout conversion
    2017-05-03 01:18:27, Error LayoutConversion: Layout conversion failed. Error: 0x00000032[gle=0x00000032]
    2017-05-03 01:18:27, Error Cannot perform layout conversion. Error: 0x00000032[gle=0x00000032]
    2017-05-03 01:18:27, Info MBR2GPT: Partition information at error point

    Using process monitor I attempted to monitor what happened. I see that mbr2gpt utilizes the process vds.exe (Virtual Disk Service) and shows some errors that might be related to function requests to VDS that aren’t available in the winpe 10.0.14393 (1607)’s VDS.

    As soon as I grab a WinPE 10.0.15063 (1703), and run the same mbr2gpt command, it converts the volume beautifully.
    Before I run off to using the ADK 1703, I wanna make sure that the signature problem is fixed properly, causing requirement to disable Secure Boot. I didn’t see much follow up on that…
    In my opinion, 2 choices: go with ADK 1703’s WinPE, or attempt to ‘upgrade’ 1607 WinPE with 1703 binaries for the VDS service.

    • Stay on the supported path and use the WinPE from ADK 1703. If you don’t want to (or can’t) disable Secure Boot in order to install ADK 1703, then wait for a fix which is TBA.

  6. So, If I have Windows 10 version 1511, I can make a copy of MBR2GPT.EXE and paste to the 1511 version and run it with success?

  7. I successfully used the MBR2GPT program included with Windows Server 2019 for an offline conversion of a SATA drive connected via USB as an external drive because I did not have a sufficiently new version of Windows 10 nor WinPE that includes MBR2GPT. Before I realised that Windows Server 2019 includes MBR2GPT, I too tried to retrofit MBR2GPT into my old version of Windows 10 but had the same failure mode as previous posters:
    “Cannot perform layout conversion. Error: 0x00000032”
    I searched the Internet (using DuckDuckGo) for this error message and found this post.

    • You should be able to download any of the ADK versions that include the latest version of WinPE, in which all the recent ones have MBR2GPT since Creator’s Update. If you are still having issues, I would dig into the log files that mbr2gpt creates. They will be in the %windir% directory – diagerr.xml, diagwrn.xml, setupact.log, and setuperr.log.

  8. The MBR2GPT in my case does not work and the log says this. I am not aware how that Partition Number 0 came which is preventing the conversion. Do you have an idea? Is it some malware created partition? Is it possible to delete it using an app like Gpart? would the disk be bootable after deletion? Presently the disk is bootable and works fine. Is it only third party programs that can overcome this problem?

    [06/28/2021 08:29.45.573] WudfCoInstaller: Created marker file C:\WINDOWS\system32\drivers\Msft_User_WpdFs_01_11_00.Wdf.

    2021-06-28 15:05:16, Info MBR2GPT was explicitly asked to run in full OS mode.
    2021-06-28 15:05:16, Info MBR2GPT: Attempting to convert disk 0
    2021-06-28 15:05:16, Info MBR2GPT: Retrieving layout of disk
    2021-06-28 15:05:16, Info MBR2GPT: Initial partition information
    2021-06-28 15:05:16, Info ===========================================================
    2021-06-28 15:05:16, Info Partition layout for disk: 0
    2021-06-28 15:05:16, Info Partition style : MBR
    2021-06-28 15:05:16, Info MBR signature: 2436502349
    2021-06-28 15:05:16, Info Number of partitions : 5
    2021-06-28 15:05:16, Info ===================PARTITION===============================
    2021-06-28 15:05:16, Info Number: 1
    2021-06-28 15:05:16, Info Type: 7
    2021-06-28 15:05:16, Info Boot: Yes
    2021-06-28 15:05:16, Info Recognized: Yes
    2021-06-28 15:05:16, Info Style: 0
    2021-06-28 15:05:16, Info Offset: 1048576
    2021-06-28 15:05:16, Info Length: 104857600
    2021-06-28 15:05:16, Info Volume: \\?\Volume{8d87eb44-ba3b-11e5-aca7-806e6f6e6963}\
    2021-06-28 15:05:16, Info Drive: None
    2021-06-28 15:05:16, Info NT Path: \Device\HardDisk0\Partition1
    2021-06-28 15:05:16, Info ===================PARTITION===============================
    2021-06-28 15:05:16, Info Number: 2
    2021-06-28 15:05:16, Info Type: 7
    2021-06-28 15:05:16, Info Boot: No
    2021-06-28 15:05:16, Info Recognized: Yes
    2021-06-28 15:05:16, Info Style: 0
    2021-06-28 15:05:16, Info Offset: 105906176
    2021-06-28 15:05:16, Info Length: 185428082688
    2021-06-28 15:05:16, Info Volume: \\?\Volume{8d87eb45-ba3b-11e5-aca7-806e6f6e6963}\
    2021-06-28 15:05:16, Info Drive: C:\
    2021-06-28 15:05:16, Info NT Path: \Device\HardDisk0\Partition2
    2021-06-28 15:05:16, Info ===================PARTITION===============================
    2021-06-28 15:05:16, Info Number: 3
    2021-06-28 15:05:16, Info Type: 7
    2021-06-28 15:05:16, Info Boot: No
    2021-06-28 15:05:16, Info Recognized: Yes
    2021-06-28 15:05:16, Info Style: 0
    2021-06-28 15:05:16, Info Offset: 185533988864
    2021-06-28 15:05:16, Info Length: 157286400000
    2021-06-28 15:05:16, Info Volume: \\?\Volume{8d87eb46-ba3b-11e5-aca7-806e6f6e6963}\
    2021-06-28 15:05:16, Info Drive: D:\
    2021-06-28 15:05:16, Info NT Path: \Device\HardDisk0\Partition3
    2021-06-28 15:05:16, Info ===================PARTITION===============================
    2021-06-28 15:05:16, Info Number: 0
    2021-06-28 15:05:16, Info Type: 15
    2021-06-28 15:05:16, Info Boot: No
    2021-06-28 15:05:16, Info Recognized: No
    2021-06-28 15:05:16, Info Style: 0
    2021-06-28 15:05:16, Info Offset: 342820388864
    2021-06-28 15:05:16, Info Length: 157286400000
    2021-06-28 15:05:16, Info Volume: , Error:0x00000012
    2021-06-28 15:05:16, Info Drive: None
    2021-06-28 15:05:16, Info NT Path: \Device\HardDisk0\Partition0
    2021-06-28 15:05:16, Info ===================PARTITION===============================
    2021-06-28 15:05:16, Info Number: 4
    2021-06-28 15:05:16, Info Type: 7
    2021-06-28 15:05:16, Info Boot: No
    2021-06-28 15:05:16, Info Recognized: Yes
    2021-06-28 15:05:16, Info Style: 0
    2021-06-28 15:05:16, Info Offset: 342821437440
    2021-06-28 15:05:16, Info Length: 157285351424
    2021-06-28 15:05:16, Info Volume: \\?\Volume{e7040264-b9ca-11e5-b279-83dd5a2580dd}\
    2021-06-28 15:05:16, Info Drive: F:\
    2021-06-28 15:05:16, Info NT Path: \Device\HardDisk0\Partition4
    2021-06-28 15:05:16, Info ===========================================================
    2021-06-28 15:05:16, Info ESP partition size will be 104857600
    2021-06-28 15:05:16, Info MBR2GPT: Validating layout, disk sector size is: 512 bytes
    2021-06-28 15:05:16, Error ValidateLayout: Unrecognized partition found, index 3
    2021-06-28 15:05:16, Error Disk layout validation failed for disk 0
    2021-06-28 15:05:16, Info MBR2GPT: Partition information at error point

    • How many primary partitions are there? There can only be three primary partitions. Also, that partition type15 might be a OEM partition. If you want to delete it, I would clone it or make a backup. Diskpart should be able to delete that partition.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.