How To Convert MBR to GPT on Linux

Master Boot Record (MBR) employs the standard BIOS partition table, whereas GPT uses the Unified Extensible Firmware Interface (UEFI). The GPT disk has several advantages over the MBR disk, as it can create more than four primary partitions. If a disk size is greater than 2 TB, GPT is required. So, let's look at how to convert MBR to GPT in Linux. This article also covers excellent software that can recover data if you lose important files after the conversion.

convert mbr to gpt on linux

Part 1. Can You Convert MBR to GPT on Linux Without Data Loss?

Yes, you can convert MBR to GPT on Linux without losing data. Fortunately, the solution turned out to be a one-line command run from a Linux-based boot CD (or boot USB) that could save all the deleting and restoring processes of data.

Part 2. Why Should You Convert MBR to GPT on Linux?

GPT (GUID Partition Table) partitioning is more reliable than MBR (Master Boot Record) partitioning, enabling larger and more robust data protection. The MBR scheme with 32-bit entries allows a maximum disk size of only 2 TB. In addition, only four primary partitions are permitted. On the other hand, the GPT structure supports partitions larger than 2.2TB. That is why converting MBR to GPT is significant, as MBR no longer supports larger disks. With GPT partitions, the latest 64-bit distributions support UEFI systems.

Part 3. How To Convert a Disk From MBR to GPT on Linux?

To convert an MBR disk to GPT, we'll use a GPT-aware program like gptfdisk or gdisk. The gdisk tool is a text-based menu-driven program for partition table creation and manipulation.

Note: Before you begin, back up your system and have a Linux live boot ready to rescue it. It's very easy to get this wrong!

Step 1. Install gdisk on your Linux computer.

First, you must install gdisk on your system. Run the following command to install it:

sudo apt install gdisk -y

After installing gdisk, proceed with the following steps:

Step 2. Make a list of and identify the disks.

To list the disks in your Linux system, run the following command.

sudo fdisk -l

identify the disks

Scroll through the output of this command and find the disk needed to convert from MBR to GPT.

Step 3. Run the gdisk utility.

In your terminal, type the following command:

sudo gdisk /dev/sda1

Or make use of

sudo gdisk

It will prompt you to enter the disk name. Enter the disk name and then press Return. This command will now scan and display the partition table on this partition.

run the gdisk utility

(Remember to replace /dev/sda1 with the correct system drive, which may be /dev/sda on many systems.)

Step 4. Run the command to create a GPT partition table.

Enter w and then tap Return. The GPT partition table will be written to the specified disk. If prompted, press y to confirm your selection.

create a gpt partition table

Step 5. Confirm the conversion.

The disk has now been converted from MBR to GPT. You can check this by running the following command.

sudo gdisk /dev/sda1

converted disk from mbr to gpt

Part 4. How To Recover Data if You Lost Important Files After the Conversion

Don't worry about losing your important files after the MBR to GPT conversion process. A professional data recovery software such as Wondershare Recoverit can help recover deleted or lost data from a Linux computer.

Wondershare Recoverit - The Leader in Data Recovery

5,481,435 people have downloaded it.

Recover deleted or lost data from Linux computer efficiently, securely, and completely.

Recover data from over 2000 storage media, such as computers/laptops, NAS, SSD, HDDs, USB, SD cards, Memory Cards, etc.

Support 500+ data loss scenarios like accidental deletion, emptied recycle bin/trash, formatting, lost partition, RAW, and damaged disk.

Support 1000+ file types, including images, videos, audio, documents, emails, and so on.


  • A workable Windows PC or Mac.

Step 1. Select Linux Data Recovery.

Launch Wondershare Recoverit after the installation. Then, select NAS and Linux Recover on the left panel.

select nas and linux

Step 2. Connect Your Linux PC With Recoverit.

Enter the information of your Linux to create a connection between the Linux and the software. Click Connect. After the connection is successful, Recoverit will start scanning the Linux.

create a linux and software connection

Step 3. Preview and Recover.

During the scanning, you can filter and preview any files displayed on the screen to find your desired ones quickly.

Finally, select the files you want to restore and click “Recover” to save them to a safe location.

recover lost linux data
Free Download

For Windows XP/Vista/7/8/10/11

Free Download

For macOS X 10.10 - macOS 13

Summing Up

You can now convert an MBR disk to GPT on Linux by following the abovementioned steps. Ensure having a backup of your important files before the conversion process. If you lose all of your essential data, consider using Wondershare Recoverit to recover them. Download it now and explore its wonders!

You May Also Like

How To Remove Files or Directories Recursively in Linux

Here are the steps to recursively remove files or directories/folders in Linux

How To Use Foremost to Recover Files on Linux and Its Alternative

Here’s how to install and use Foremost to recover data in Linux and its best alternative.

How To Install and Use TestDisk on Linux and Its Alternative

Detailed here are the ways to install and use the TestDisk Linux data recovery tool, plus its alternative.

Top 10 Linux Partition Recovery Tools

Restore your deleted or lost data with the 10 best Linux partition recovery software.

How to Recover Deleted Files from Linux Partition?

Try these tested and proven methods to recover deleted files from Linux partitions.