views:

50

answers:

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 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?

A: 

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

caf