Re: dd if=/dev/zero of=/dev/hda

Top Page
Attachments:
Message as email
+ (text/plain)
+ (application/pgp-signature)
Delete this message
Reply to this message
Author: Bill Jonas
Date:  
To: plug-discuss
Subject: Re: dd if=/dev/zero of=/dev/hda
On Sun, Jun 27, 2004 at 05:28:24PM -0700, ec wrote:
> What is the purpose of this command?


Overwrite the entire drive with zeroes.

> What is the difference between it and just formatting
> and reinstalling?


All data is actually erased and invisible to the HD controller, although
it can be recovered by an entity that has enough money and patience. As
a side note: To bring it up to military specs, one would need to either
melt the platters (for the most sensitive classified data) or overwrite
with random data about seven times (for sensitive but unclassified
data). Note that this might be incorrect on what specific data gets
what treatment, but it's approximately correct. You'd probably want to
use /dev/random or /dev/urandom and do it a few times to make sure it's
nearly unrecoverable, but it would take longer.

> Can it be done on multipartitioned hard drives and
> what partitons(s) does it do it to? The whole drive,
> or just the specified one(s)?


It can be done on any block device. It will operate on whatever device
you specify, whether it is the whole drive or only one partition.

> What about a v-fat partition? Or does it only work on
> linux types?


It can be done on any block device.

See also wipe(1) (available at http://wipe.sf.net/) or shred(1) (which
probably came with your system, although wipe(1) is better IMO) for
securely removing files.

-- 
Bill Jonas    *        *    http://www.billjonas.com/
"It's a dangerous business, Frodo, going out your front door.  You step
into the Road,  and if you don't keep your feet,  there  is  no knowing
where you might be swept off to."  --  Bilbo Baggins