[PLUG-TALK] Netbook computer disassembly

Galen Seitz galens at seitzassoc.com
Thu Nov 24 00:14:00 UTC 2016


On 11/23/16 15:32, Galen Seitz wrote:
> 
> Wipe the first megabyte dd if=/dev/zero of=/dev/destination_disk
> count=1 bs=1M
> 
> Now determine the size of your disk in your granularity of choice.
> You probably know how many 512 byte sectors there are, since you've
> been messing about with partitioning.
> 
> N = number of 512 byte sectors (a very large number)
> 
> 
> Now let's wipe the last ~5MB of disk.
> 
> M = N - (5 x 2048) = N - 10240
> 
> dd if=/dev/zero of=/dev/destination_disk seek=M bs=1b count=10240

Rereading this, I realize using M as a variable wasn't the best
choice, as it can be confused with dd's megabyte suffix.

N = number of 512 byte sectors (a very large number)
SEEK_SIZE = N - (5 x 2048) = N - 10240
dd if=/dev/zero of=/dev/destination_disk seek=SEEK_SIZE bs=1b count=10240

where bs=1b is a block size of 512 bytes, and count is the 
number of 512 byte blocks to write with zeroes.


galen
-- 
Galen Seitz
galens at seitzassoc.com



More information about the PLUG-talk mailing list