[CentOS] erase disk

Sat Sep 28 14:14:59 UTC 2013
David G. Miller <dave at davenjudy.org>

Steve Thompson <smt at ...> writes:

> 
> On Thu, 26 Sep 2013, Bret Taylor wrote:
> 
> > A fairly simple solution is
> > dd if=/dev/zero (or urandom) of=/dev/(device)
> 
> I usually hit the disk with a hammer. Satisfying 
> 
> -s
> 
I run badblocks in write mode on the drive.  badblbocks does four passes
(all zeroes, alternating ones and zeroes both ways and all ones).  This is
sufficient to keep all but a high-end forensics lab from getting anything
useful off of the disk and even such a lab will have a hard time.  For the
OP's question, this lets him know that the disk is both clean and is still
good to use.

For me, if badblocks says the disk is good, it goes on the shelf as a spare
until it is hopelessly obsolete.  Otherwise, the disk gets used for target
practice.  Also, very satisfying.

Cheers,
Dave