Jump to content
Sign in to follow this  
anyweb

Securely ERASE a hard disc in linux

Recommended Posts

as root do this

 

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

Edited by anyweb

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

I though it was hard trying to recover files on the normal ext3 file system <_< never did

recover them.

 

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

 

shred -v -n 1024 file.txt

Share this post


Link to post
Share on other sites

:blink:

 

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 :lol:

 

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:

 

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...