I have an MBR formatted sd card and when connect to a Linux machine (xubuntu 12.04) it can mount a partition and parse the file system (as can GParted). However, when I try to read the MBR from the device using dd it gives me a bunch of spurious data.
Could anyone shed any light into how Linux/GParted is able to read and make sense of the MBR when dd isn't able to read the MBR. Do they use different methods to get at the data? I.E not open(), read()
DD command is:
dd if=/dev/sdb of=mbr.bin bs=512 count=1
DD output is:
1+0 records in
1+0 records out
512 bytes transferred in 0.000786 secs (651345 bytes/sec)
mbr.bin dump with hexdump -C mbr.bin
is:
00000000 04 16 41 53 4d 49 2d 53 44 03 00 00 00 00 16 f1 |..ASMI-SD.......|
00000010 00 7f 00 32 1f 5b 80 00 36 db bf bf 96 c0 00 01 |...2.[..6.......|
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000030 6f 00 00 10 00 00 02 2e 00 00 00 00 00 00 00 00 |o...............|
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000200
dd
give? – qdii May 12 '13 at 15:59fdisk -lu /dev/sdb
,gdisk -l /dev/sdb
andgrep sdb /proc/partitions
? – Stéphane Chazelas May 12 '13 at 20:50/proc/partitions
? – Gilles 'SO- stop being evil' May 12 '13 at 20:57