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.
Asked
Active
Viewed 1,979 times
4 Answers
1
If you are asking that you probably want to read this: http://www.rodsbooks.com/gdisk/repairing.html
0
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 '21 at 13:52
0
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.

pts
- 435
- 1
- 5
- 16