[plug] wiping a hard disk clean

Mark O'Shea mark at musicalstoat.co.uk
Tue May 11 17:09:47 WST 2004


On Tue, 11 May 2004, Russell Steicke wrote:
> On Tue, May 11, 2004 at 03:59:26PM +0800, Ben Jensz wrote:
> > Hey all,
> >
> > Just curious if anyone has any suggestions for something to run under
> > Linux to completely wipe all data from a hard disk, irrespective of
> > filesystem etc?  Some of the disks I'm looking at wiping may have
> > Windows partitions and some have Linux partitons.
>
>  dd if=/dev/zero of=/dev/hdXX bs=1M
>
> > Basically such that you couldn't retrieve the data even if you tried hard?
>
>  dd if=/dev/random of=/dev/hdXX bs=1M
>
> But this will block waiting for random data quite frequently, so use
> /dev/urandom if it's not really critical.
>
> Increasing the buffer size from 1M could be useful to increase the
> speed, too.
>
Also remember that the hard drive is a magnetic medium, so when you write
something to it you are only actually changing the orientation of *most*
of the stuff on the disk, some gets through unaltered and this is how
people with the $$$s can get at the data.  I read somewhere once that
writing random data to the whole disk three times was considered to be
good enough to stop all but those with much more time and money than sense
(like US government agencies).

The idea of melting the disk sounds the most fool proof if you really
don't want anyone seeing your data...

-- 
Mark O'Shea



More information about the plug mailing list