[plug] boot from stick

Daniel J. Axtens danielax at gmail.com
Tue Jan 12 21:04:53 WST 2010


> It should have been-
> $ dd if=/dev/sda of=/dev/sdb count=512 (only 512 bytes)

That (probably) doesn't do what you think it does.

dd works in "blocks" of bytes, and usually, 1 block != 1 byte. Your
command would have copied 512 blocks. For example, on my Mac, a block
is 512 bytes by default so that command would have copied 512*512 =
262144 bytes = 256 KB (KiB? 256 lots of 1024 bytes, whatever we call
that these days).

Consult the manual for dd to find the default blocksize on your system.

I believe the canonical way of copying the first 512 bytes is:
dd if=... of=... bs=512 count=1

I'm fairly sure this significantly faster than bs=1 count=512, but I'm
not going to venture an opinion on why.

Daniel Axtens



More information about the plug mailing list