开发者

Dump of first 512 bytes of a flash drive different, when done via hexdump and fdisk

开发者 https://www.devze.com 2023-01-11 07:36 出处:网络
I first zeroed out the first 512 bytes of the USB flash drive using dd if=/dev/zero of=/dev/sdb bs=512 count=1

I first zeroed out the first 512 bytes of the USB flash drive using

dd if=/dev/zero of=/dev/sdb bs=512 count=1

Then i saw that the开发者_C百科 output of

hexdump -n 512 /dev/sdb

and from within fdisk (the raw dump of the partition table) is different.

Specifically, hexdump shows that all bytes are really zeroed out. But, in fdisk I see that the 441-444th bytes have random values each time you restart fdisk. Also, the last 2 bytes have the boot signature AA55. This boot signature doesn't change each time i restart fdisk. All the other bytes are zeroed out even in fdisk.

Why this discrepancy?


Presumably fdisk is correcting the block of zeroes to be a valid boot sector.

0

精彩评论

暂无评论...
验证码 换一张
取 消