Is there a tool on Ubuntu Lucid which can dump the GPT (GUID partition table) of a block device in a human-readable form? The most important information I'm interested in is the byte offset of each partition.

4 Answers 4


parted should be able to print the table, and will give you starting and ending of each partition, but I'm not sure that GPT uses byte offsets. gdisk gives its offsets in sectors, you'd multiply sectors by Logical Sector Size to figure out # of bytes.


If you are asking that you probably want to read this: http://www.rodsbooks.com/gdisk/repairing.html


To dump raw bytes :

xxd /dev/sdx | more

replace x in sdx with your gpt device character more is used to prevent data flowing without control on terminal.

happy hacking :)

  • Thank you for trying to help. The output of this command doesn't contain the byte offset of each paritition (directly), which was specified as a requirement in the question.
    – pts
    Apr 26, 2021 at 13:52

I used the answers to https://unix.stackexchange.com/q/154076 as inspiration.

Recent sudo fdisk -l, sudo gdisk -l DEVICE and sudo parted -l dump the partition table of DEVICE or all block devices, and all of them support (and autodetect) MBR and GPT. However, they don't display the byte offsets directly. They do display the unit (logical sector size) they use though, which is 512 bytes by default.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .