Ubuntu – How to detect whether the disk is using GPT or MBR from a terminal

partitioning

I am running Ubuntu 13.10. Some links shows that:

  • If you use an MS-DOS partition table (or MBR), you can only have up to four primary/extended partitions.

  • If you use a GUID partition table (GPT) with default settings, you can have up to 128 partitions.

How do I find out whether my disk uses MBR or GPT from the terminal in Ubuntu?.

So that it would be easy for me while creating partitions.

Best Answer

To find whether your disk is GPT or MBR in ubuntu,you have to install gdisk utility.

sudo apt-get install gdisk

Then run the below command,

sudo gdisk -l /dev/sda
  • If the output of the above command shows like this,then you have MBR disk,

    Partition table scan:
    MBR: MBR only
    BSD: not present
    APM: not present
    GPT: not present
    
  • If the output shows like this then you have GPT disk,

    Partition table scan:
    MBR: protective
    BSD: not present
    APM: not present
    GPT: present