Wipe a drive clean

Ted Mittelstaedt tedm at toybox.placo.com
Wed Jun 25 04:33:37 UTC 2008



> -----Original Message-----
> From: owner-freebsd-questions at freebsd.org
> [mailto:owner-freebsd-questions at freebsd.org]On Behalf Of Wojciech Puchar
> Sent: Monday, June 23, 2008 1:40 PM
> To: Steve Bertrand
> Cc: freebsd-questions at freebsd.org; Andrew Falanga
> Subject: Re: Wipe a drive clean
> 
> 
> >> I'm having no luck finding hits for "wipe drive" or "zero drive" in
> >> the mail list archives and I can't believe I'm the first to ask this
> >> question but here it is anyway.  How can I simply write 0's across a
> >> USB thumb drive?  I'd rather not install a port, if I can avoid it.  I
> >> was thinking that something like dd would work, but everything I've
> >> tried thus far is not working.  What suggestions does everyone have?
> >
> > Will...
> >
> > dd if=/dev/zero of=/dev/disk
> >
> 
> dd if=/dev/zero of=/dev/disk bs=1m
> 
> bs may be smaller but not the default 512 bytes. it's a block 
> size. having 
> very small block will make the process slow
> 

dd if=/dev/random  of=/dev/disk  bs=1024

The above will wipe the drive clean per the 
United States Department of Defence Standard 5220.22-M 

To "sanitize" it per the 5220.22-M stnadard, do the above
3 times.  This is intended to destabilise the remnants of
data that may exist on the edges of the track of the disk
to which the data is written

The random device is a lot slower than /dev/zero so
the bs isn't as important.

Ted


More information about the freebsd-questions mailing list