Sunday, January 29, 2023

Securely eraseing disk and file

 I used Hiren's Boot Disc and DBAN boot disc to erase my HDD securely most of the time.  I did use dd command but found out there were few other useful commands recommended in this link.  

The first one mentioned in the article is quite useful.  It will overwrite the disk five times and add a final overwrite with zero to hide shredding.

 # shred -n 5 -vz /dev/hda

The command below will use shred and /dev/urandom as the source of random data.
 
shred -v --random-source=/dev/urandom -n1 /dev/sda
 
Another option is to install scrubbing program like scrub in Unix.  You can use it to erase a single file with algorithm.  
scrub -p nnsa|dod|bsi|old|fastold|gutmann|random|random2 fileNameHere
 
Or you can even use it to erase disk with dod standard.  
scrub -p dod /dev/sda
 
*** WARNING: Please test the commands before running it on your data.  Commands mentioned in this article will delete the data permanently.  *** 
  

No comments: