3.16 Converting MBR Disk to GPT Disk

3.16.1 Using Linux Distro

An MBR based disk can be converted to GPT disk without formatting the disk.

Following are the use cases:

  • To convert only MBR data disk to GPT

  • To convert an MBR disk with Operating system to GPT

To convert only MBR data disk to GPT:

  • Run the img -convert <disk_name>.

    For example, img -convert /dev/sdX

    Where sdX is the disk name.

Prerequisite to convert MBR disk with operating system:

  • Take an image of boot partition from the UEFI based Windows operating system. To identify EFI system partition run img –p and look for *<partition_type> of type FAT32 EFI system partition.

To convert an MBR disk with operating system to GPT:

  1. Run img -convert <disk_name>

    For example, img -convert /dev/sdX

    Where sdX is the disk name.

  2. Delete the existing boot partition by running img -pd <Partition_Number>.

    Where <Partition_Number> is the number taken in the prerequisites.

  3. After deleting the old boot partition, create a new boot partition in the same location by running img -pc <partition_Number> -type=FAT32 -size=100 -guid=ESP.

  4. Make the boot partition as the active partition by running img -pa <partition Number>.

  5. Restore the UEFI image of the boot partition with the partition created in Step 3.

    For example, img –rp <Image_Name> -ap=ax:py

  6. Change the security identifier by running sidChange -i.

  7. Change the firmware to UEFI in BIOS settings.

NOTE:

  • Supports only FAT and NTFS partition types.

  • Supports up to 26 partitions including extended partitions. If the partition is mounted from A to Z in the available mount point, then the partition retains the mount point.

  • If any extended partition is mounted to a folder inside any pre-occupied mount point, then the folder is inaccessible after conversion. However, data will be present in the created volume and it can be accessed by mounting it on to a folder, or to a free mount point.

  • If the ZEN or DELL-DTK partition exists on the MBR disk, then it cannot be converted to GPT.

  • If any partition of the MBR disk is mounted in the distro, then the disk cannot be converted to GPT.

3.16.2 Using WinPE Distro

Prerequisites

Following are the disk prerequisites specified by Microsoft for converting MBR to GPT:

  • Update the Windows PE image (winpe.wim) with the Windows ADK 1703, or a later version.

  • BitLocker should be disabled

  • Adequate space to store the primary and secondary GPTs:

    • 16 KB space and 2 sectors at the front of the disk.

    • 16 KB space and 1 sector at the end of the disk.

  • At most 3 primary partitions should be available in the MBR partition table.

  • At least one of the partitions is set as active, and it is in the system partition.

  • The disk should not have any extended or logical partition.

  • The BCD store on the system partition should contain a default OS entry pointing to the OS partition.

  • The volume IDs should be able to retrieve for each volume with a drive letter.

  • All partitions on the disk are of MBR types should be recognized by Windows, or has a mapping specified using the map command-line option.

For more information, see https://docs.microsoft.com/en-us/windows/deployment/mbr-to-gpt

Procedure

  1. Take Backup of ZENWorks image safe data (ZISD)

    • To take Backup of ZISD, boot the device in the WinPE maintenance mode and run the isdtool.exe b command.

  2. Run MBR2GPT.exe /validate to perform the check and report whether the disk is eligible for conversion.

  3. Run MBR2GPT.exe /convert /disk:<diskNumber> to convert the disk to GPT.

    Example: MBR2GPT.exe /convert /disk:0

  4. Run Isdtool.exe r to restore ZISD.