How to check if a disk uses GPT or MBR in Linux?
 

How to check if a disk uses GPT or MBR in Linux?

 

In a computer, MBR and GPT are two ways of storing the partitioning information on a disk. The MBR is a legacy while GPT is a newer disk partitioning style which requires to boot the system in UEFI mode.

Most of the modern system comes with only UEFI support, a disk should be in GPT format if you want to boot it on these systems.

Here in this article, we will explain how to check if a disk is using GPT or MBR in Linux.

Check if your disk is GPT or MBR using gdisk tool

The gdisk is a command-line menu-driven program for the creation and manipulation of the partition table. It can be used to convert an MBR disk to GPT or a GPT disk to MBR.

Before you use gdisk command, first run the given command in your terminal to install gdisk if it is not in your system –

sudo apt install gdisk -y

After installing gdisk use the following command to list the available disks –

sudo fdisk -l

Now see the list and identify the correct disk where you want to check the partitioning style of the disk.

To check if the disk is GPT or MBR use the following command in your terminal –

sudo gdisk /dev/sda1

In the above command /dev/sda1 is my disk that we are going to scan to check which partition table is present on the disk. Repalce it with the your disk name.

This command will scan for the partition table present on the disk and display it inside the terminal. See the image below the highlighted part shows that the disk is MBR only.

If the partitioning style of the disk is GPT then it will display the output as given in the image below –

GPT or MBR: Check using the parted command

The parted command is also used to create and manipulate the partition table. It supports multiple partition table formats including MBR and GPT.

We can use the patrted command to check the partition table format, use the following command in your terminal –

sudo parted /dev/sda1 p

And this will display the output as given in the image below. The partition table present on this disk is gpt.

Conclusion

There may some other ways to check the partition table format on a disk. The method describes one of the easiest ways to find if disk uses GPT or MBR. Now if you have a query on this topic then write us in the comments below.

Previous [lubuntu] No Sound via HDMI
Next [ubuntu] Static, Noise In Some Websites and Spotify
 

About author

You might also like

Linux Topics 0 Comments

How to Print files in Linux Using Command Line

Printing a file is one of the basic functionalities provide by the linux operating system, rather than just printing a file its provides us with a variety of options like

Linux Topics 0 Comments

What Is aptitude And How To Use It?

This post was last updated on August 1st, 2020 at 10:51 pmI already briefly discussed aptitude which is a debian package manager. In this article, we will see it in

Linux Topics 0 Comments

How To Install & Use Cockpit Web Console On Ubuntu Server?

The cockpit is a web console that makes it easy to administer the GNU/Linux server. It has a user-friendly web-based interface that enables you to carry out different system admin

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Reply