zeroing out part of an SDcard

Chris Adams linux at cmadams.net
Thu Aug 21 13:50:20 UTC 2014


Once upon a time, Robert Moskowitz <rgm at htt-consult.com> said:
> >># dd if=/dev/zero of=/dev/sdb bs=1M seek=1007620
<snip>
> Well, man says about seek:
> 
>        seek=N skip N obs-sized blocks at start of output
> 
> and obs defaults to 512 bytes, and I *THOUGHT* fdisk was reporting #
> 512 blocks, not bytes.

fdisk reports sectors (that's the default in recent years, it can be
configured to report in different units).  However, look again at the dd
command; the block size was set to 1M (=1048576 bytes), and then the
seek was set to 1007620 blocks, which is almost 1TB.  If you are going
to raise the block size, you have to recalculate everything else that is
expressed in blocks.
-- 
Chris Adams <linux at cmadams.net>


More information about the users mailing list