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.
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.
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.
parted
should be able toprint
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 :
replace
x
insdx
with your gpt device charactermore
is used to prevent data flowing without control on terminal.happy hacking :)
I used the answers to https://unix.stackexchange.com/q/154076 as inspiration.
Recent
sudo fdisk -l
,sudo gdisk -l DEVICE
andsudo parted -l
dump the partition table ofDEVICE
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.