Linux-Noob Forums

Full Version: Securely ERASE a hard disc in linux
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

as root do this

 



Code:
dd if=/dev/random of=/dev/hda && dd if=/dev/zero of=/dev/hda




 

ps. this takes a long time, so be patient (do it overnight or something)

 

thanks to Grep420

 

cheers

 

anyweb

:)

Nice....

 

Not to rain on a great example but the DoD does suggest three write passes to full erase data. I seriously doubt normal recovery software could be done successfully after the 2 passes but companies like Vogon International do make claims of that sort of crazy recovery.

 

Also for some more dry reading a techinal proposal on ATA secure erase.


I though it was hard trying to recover files on the normal ext3 file system [img]<___base_url___>/uploads/emoticons/default_dry.png[/img] never did

recover them.

 

Anyways also run the shred command :)this overwrites the file

 



Code:
shred -v -n 1024 file.txt





o_O

 



Code:
shred -v -n 1024 file




 

heh i know i said more than 2 but 1024 maybe a little bit of paranoia kickin in! exactly what dont you want us to find [img]<___base_url___>/uploads/emoticons/default_laugh.png[/img]

 



Code:
shred -n 25 -u -v -z file




 

i think that should be enough.

 

-n 25 = 25 times over (the default)

-u = remove file first before writing

-v = be verbose (always do this to stop yourself from getting itchy)

-z = final overwrite with zeroes (to clear evidence of shred)

 

 

And start from the man:

 

Quote:The following are examples of filesystems on which shred is not effective:* log-structured or journaled filesystems, such as those supplied with

    AIX and Solaris (and JFS, ReiserFS, XFS, Ext3, etc.)

* filesystems that write redundant data and carry on even if some writes

    fail, such as RAID-based filesystems

* filesystems that make snapshots, such as Network Appliance's NFS server

* filesystems that cache in temporary locations, such as NFS

    version 3 clients

* compressed filesystems