LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   partition table info (https://www.linuxquestions.org/questions/linux-newbie-8/partition-table-info-663116/)

ufmale 08-15-2008 11:12 PM

partition table info
 
This question is related to my previous post, but it is kind of different question,
http://www.linuxquestions.org/questi...ith-dd-662897/


when I use
$ dd if=/dev/sda bs=16 count=2 | od -t x1
I got
2+0 records in
2+0 records out
32 bytes (32 B) copied, 0.000151352 s, 211 kB/s
0000000 fa eb 21 01 b4 01 4c 49 4c 4f 16 08 d2 17 59 48
0000020 00 00 00 00 00 00 00 00 2a d9 6e 3e 01 00 80 60
0000040


what is the 0000000, 0000020, and 0000040?
They seem like a memory index, but it does not add up..
It seems like each row is 16 bytes, but 2nd row has
0000020, I thought the index of the 2nd row should have been 0000010?
what did I miss here?


Now, I try change the count to 16, I got a stranger index,
there is no 0000080.. why it skip???

# dd if=/dev/sda bs=16 count=6 | od -t x16+0 records in

6+0 records out
96 bytes (96 B) copied, 0.000108512 s, 885 kB/s
0000000 fa eb 21 01 b4 01 4c 49 4c 4f 16 08 d2 17 59 48
0000020 00 00 00 00 00 00 00 00 2a d9 6e 3e 01 00 80 60
0000040 64 3d 00 00 b8 c0 07 8e d0 bc 00 08 fb 52 53 06
0000060 56 fc 8e d8 31 ed 60 b8 00 12 b3 36 cd 10 61 b0
0000100 0d e8 66 01 b0 0a e8 61 01 b0 4c e8 5c 01 60 1e
0000120 07 80 fa fe 75 02 88 f2 bb 00 02 8a 76 1e 89 d0
0000140

syg00 08-15-2008 11:47 PM

I don't use "od", but that looks very much like an address radix issue. See the manpage.
I hope you realize you are looking at the loader code, not the partition table.

jlliagre 08-16-2008 12:55 AM

Definitely a radix issue.

Hint: The "o" in "od" means octal ...

pixellany 08-16-2008 07:45 AM

Yep, counting the addresses in octal, and displaying the data in hex---makes perfect sense...;)

Why not use hexdump?


All times are GMT -5. The time now is 01:53 PM.