How to do a hexdump of first track of HDD?
How would i do a hexdump in Ubuntu for the first track of a HDD?
I am looking for a winhex-esque output if that makes sense. The first track has 63 sectors, each 512 bytes long. I tried
dd if=/dev/sda bs=1 count=512 | hexdump -C
but that only gave me what appears to be the MBR, or first sector of the HDD. I guess i am confused about what bs and count should be. Bs means how many bytes to display and count is how many multiples of bs? Thanks!
Solution 1:
bs
is the block size, in bytes, and count
is the number of those blocks to grab. So the command you actually want to dump the first track is:
dd if=/dev/sda bs=512 count=63 | hexdump -C
The dd man page might be of help.