Convert MBR to GPT in Windows Server 2012 Without Losing Data

by Allen, Updated on: June 30, 2022

Hard disk drives become much bigger and it's common to use a 2TB or 4TB disk. Many servers are built with hardware RAID arrays, the virtual disk may be larger than 10TB. If you build a RAID 5 array with 3 3TB hard disks, the virtual disk in Disk Management is 6GB. If this disk is initialized as MBR, you can only use 2TB space, the remaining 4TB disk space is shown as Unallocated at the end. This space cannot be used to create new volume or expand other partition. To use full disk space, you must convert disk from MBR to GPT. If there are 4 partitions on a disk and Windows doesn't allow creating more volume, you also need to change MBR disk to GPT. In this article I'll introduce how to convert MBR to GPT in Windows Server 2012 R2 with MBR2GPT command tool and third party disk converter.

Convert MBR to GPT in Server 2012 Disk Management (destructive)

To convert MBR to GPT in Windows Server 2012 R2, there are several ways. Windows has built-in Disk Management and diskpart command tool to help convert disk type, but you must delete all partitions on the MBR disk in advance.

In diskpart command prompt window, type help convert GPT and you'll see the syntax, note and example of convert command.

Diskpart Convert

In Disk Management console, when you right click the front of a MBR disk, there is also an option, but "Convert to GPT Dis" is grayed out if there's a partition on it.

Convert is grayed

With MBR2GPT.exe (Microsoft provided) and NIUBI Partition Editor, you can convert MBR to GPT in Server 2012 without losing data. Before starting, make sure the MBR disk that you want to convert is data disk or system disk, because the method is different.

How to convert MBR to GPT for non-system disk (nondestructive)

If there's only data on the MBR disk, it is extremely easy and fast to convert it to GPT without losing data, only several clicks are needed.

Steps to convert MBR to GPT in Windows Server 2012 R2 without losing data:

  1. Download NIUBI Partition Editor, right click the front of the MBR disk and select "Convert to GPT Disk".
  2. Simply click Yes to confirm, then a pending operation is added.
  3. Click Apply on top left to execute, done. (All operations before clicking Apply only work in virtual mode.)

Watch the video how to convert disk from MBR to GPT in Windows Server 2012:

Video guide

How to convert MBR to GPT in Windows Server 2012 for system disk

If there's operating system on the MBR disk, it's a bit complicated, because all system files must keep intact and the OS must boot correctly after converting to GPT. There are some 3rd-party software that claim to be able to convert MBR disk to GPT with operating system in it, but few can ensure 100% system bootable. If you want to convert a system disk from MBR to GPT in Server 2012 (R2), it is suggested to run MBR2GPT.exe which is a command prompt tool and provided by Microsoft.

Server 2012 mbr2gpt.exe command prompt

MBR2GPT.exe is running from command prompt. On Windows Server 2019 and Windows 10 (1703 and later versions), you can convert MBR to GPT with this command in Windows. But to run mbr2gpt in Server 2012 (R2), you need bootable media with Windows Preinstallation Environment (Windows PE).

To convert MBR to GPT Windows 2012 server with MBR2GPT command, your disk partition must meet the requirements below. Otherwise, the conversion can't be successful. But don't worry, before any change to the disk is made, MBR2GPT validates the layout and geometry of the selected disk, if any of these checks fails, the conversion will not proceed and an error message will be returned. Your disk partition won't be damaged.

Precondition to run MBR2GPT cmd in Server 2012 R2:

  1. There should be no Logical drive on this MBR disk.
  2. There should be at most  3 Primary partitions on this MBR disk.
  3. One of the partitions is set as Active and is the system partition.
  4. All partitions on this MBR disk are recognized by Windows, that means there are no EXT2/EXT3 and other types of Linux or Mac partitions.

Common issue and corresponding solution

"Validating layout, disk sector size is: 512 bytes Disk layout validating failed for disk 0", "MBR2GPT: Conversion failed". This is the most common error message while converting MBR disk to GPT in Windows Server 2012 and other versions. If you received such error, check your disk partition configuration again.

Partition layout

In most of Windows 2012 server system disk, there are System Reserved, C: (for OS) and D drive. If all these partitions are Primary, you can convert disk to GPT successfully. If your disk partition layout doesn't meet the requirements, follow the methods to modify:

  1. If there's a Logical drive, convert it to Primary (without data loss).
  2. If there are 4 Primary partitions, follow the steps to move one to another disk.
  3. If there's not supported partition, you have to move files and delete this partition.

Expand System Reserved partition (optional)

For Windows to remain bootable after the conversion, an EFI system partition (ESP) must be in place. MBR2GPT will shrink the "System Reserved" partition first. If there's not enough free space in this partition, MBR2GPT will shrink C drive instead, then EFI partition will be created behind C drive after converting to GPT disk.

EFI partition

When right clicking the EFI partition in Disk Management, all options are grayed out. That means Disk Management cannot shrink or extend this partition. However, it doesn't matter to NIUBI Partition Editor, because it can shrink, extend and move EFI/Recovery partition without losing file in it.

If you want to make the EFI partition on the left of C drive, Download NIUBI Partition Editor and follow the method in the video to expand the System Reserved partition (it's enough to 1 or 2GB):

Video guide

How to run mbr2gpt.exe in Server 2012 to change MBR to GPT (cmd)

As I said above, MBR2GPT.exe is built in Windows Server 2019 and Windows 10, it is not included in early Windows versions. To run MBR2GPT in Server 2012 (R2), you need Windows Preinstallation Environment and run command prompt from it.

Steps to convert mbr to gpt in Windows Server 2012 (R2) with MBR2GPT cmd:

Step 1: Download Windows Server 2019 ISO and create bootable DVD or USB flash drive with Windows built-in or third-party tool. If you use VMware, Hyper-V virtual machine, you just need to select this ISO file and boot from it.

Step 2: Boot from this bootable media, simply click Next in first Windows Setup window, then click Repair your computer on th bottom left corner of next window.

Setup window

Repair computer

Step 3: Click Troubleshoot in next window, then click Command Prompt.


Command Prompt

Step 4: Just input 2 commands to complete converting.

  1. cd..
  2. mbr2gpt /convert

As you see, the command window reports conversion completed successfully.

Because I extended the System Reserved partition, restart server and boot to UEFI, as you see, disk 0 is converted to GPT and the EFI partition is created on left side of C drive.

Besides shrinking, extending partition and converting MBR to GPT in Server 2012/2016/2019/2022 and previous Server 2003/2008, NIUBI Partition Editor helps you convert partition between Primary and Logical, convert NTFS to FAT32 without losing data. It also helps you move, merge, clone, wipe partition and much more.