User Tools

Site Tools


pages:howtos:linuxunix:find_partition_table_type

determine the partition table type

You can use parted -l to determine the type of partition table. Eg:

parted -l

Model: ATA TOSHIBA THNSNS25 (scsi)
Disk /dev/sda: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      4194kB  32.2GB  32.2GB  primary  ext4         boot
 2      32.2GB  256GB   224GB   primary  ext4
 

Model: ATA Hitachi HDT72101 (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system     Flags
 1      1049kB  32.2GB  32.2GB  primary  ext4            boot
 2      32.2GB  996GB   964GB   primary  ext4
 3      996GB   1000GB  4295MB  primary  linux-swap(v1)

The Partition Table field shows that I am using a msdos MBR partition table (the one still commonly used for Linux and Windows) on both disks. From the man page parted can create (and thus hopefully identify) the following types of partition table (or more broadly `disk label'):

  • bsd
  • dvh
  • gpt - this is a GPT partition table
  • loop - this is raw disk access without a partition table
  • mac
  • msdos - this is a standard MBR partition table
  • pc98
  • sun

Update It is worth adding the command for listing a single partition since this is not obvious without some knowledge of parted and it can be a pain finding the data you need if there are multiple drives. For /dev/sda you would do:

parted /dev/sda print
parted /dev/sda p  # SHORT FORM


~~DISCUSSION~~

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
pages/howtos/linuxunix/find_partition_table_type.txt · Last modified: 2021/12/09 23:23 by The Thing That Should Not Be