Getting the extra GPT info; a “fdisk -l” equivalent

disk-imagefdiskgdiskgpthard-disk

What is the equivalent for GPT using HDDs of:

# fdisk -l /dev/hda > /mnt/sda1/hda_fdisk.info

I got this from https://wiki.archlinux.org/index.php/disk_cloning (under "Create disk image") for getting the extra hdd info which may be important for restoring or extracting from multi-partition images.

When I do this I get an error similar to:

"WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted."

Best Answer

some unix partitioner, are deperecated and GPT partition table is new and some tools doesn't work GPT. GNU parted is new and gparted is GNOME Parted

for example:

root@debian:/home/mohsen# parted -l /dev/sda
Model: ATA WDC WD7500BPVT-7 (scsi)
Disk /dev/sda: 750GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system     Flags
 1      32.3kB  41.1MB  41.1MB  primary   fat16           diag
 2      41.9MB  2139MB  2097MB  primary   fat32           boot
 3      2139MB  52.1GB  50.0GB  primary   ext4
 4      52.1GB  749GB   697GB   extended
 5      52.1GB  737GB   685GB   logical   ext4
 6      737GB   749GB   12.0GB  logical   linux-swap(v1)

NOTE: GPT is abbrivation of GUID Partition Table and much new. GPT

Related Question