Linux-Noob Forums
Securely ERASE a hard disc in linux - Printable Version

+- Linux-Noob Forums (https://www.linux-noob.com/forums)
+-- Forum: Linux Noob (https://www.linux-noob.com/forums/forum-3.html)
+--- Forum: Tips and Tricks (https://www.linux-noob.com/forums/forum-59.html)
+---- Forum: Filesystem Management (https://www.linux-noob.com/forums/forum-26.html)
+---- Thread: Securely ERASE a hard disc in linux (/thread-3109.html)



Securely ERASE a hard disc in linux - anyweb - 2004-10-19


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




Securely ERASE a hard disc in linux - grep420 - 2004-10-27

:)


Securely ERASE a hard disc in linux - znx - 2005-03-31


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.




Securely ERASE a hard disc in linux - xDamox - 2005-03-31


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







Securely ERASE a hard disc in linux - znx - 2005-04-01


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