MBR uses the standard BIOS partition table while GPT uses Unified Extensible Firmware Interface (UEFI). The GPT has various advantages over MBR disk, for example, you can create more than four primary partitions on a GPT disk. The GPT is required if the size of a disk is greater than 2 TB.
So let’s see how to convert an MBR disk to GPT on the Linux.
Why convert MBR to GPT
GPT takes advantage of UEFI to support storage devices larger than 2 TB. It lets you set up as many partitions as you need for example – Windows support 128 partitions on a GPT disk.
To boot your computer from UEFI mode, you need to use the drive formatted as GPT partition structure. You can read the subsequent part of this article if you want to convert an MBR disk to GPT.
Converting a disk from MBR to GPT
For converting an MBR disk to GPT we will use a GPT aware program for example
gdisk tool is a text-based menu-driven program for the creation and manipulation of partition tables.
First, you need to install the
gdisk if it is not in your system. You can install it by using the following command –
sudo apt install gdisk -y
gdisk follow the given steps.
Step 1: List and identify the disk
Use the following command to list the disk available in your system –
sudo fdisk -l
Scroll and identify the disk that is to be converted from MBR to GPT in the output of this command.
Step 2: Use the gdisk tool
Run the following command in your terminal –
sudo gdisk /dev/sdb1
or use the –
This will ask you to enter the disk name, enter the name of the disk and then press the return key.
Now this command will scan and display the partition table present on this partition –
Step 3: Entering command to write gpt partition table
Now enter the w and then press the return key. This will write the
gpt partition table on the given disk. If asked press y to confirm your choice.
Step 4: Verify the conversion
The disk is now converted from the MBR to GPT. You could verify this by using the following command –
sudo gdisk /dev/sda1
By following this you are now able to convert an MBR disk into GPT. Now if you have anything to say on this topic then you can write to us in the comments below.