Secure wiping your hard drive in Linux
Usually I get a copy of the System Rescue CD and use the DBAN option at the boot prompt. DBAN is an automatic drive wiping utility that doesn’t require you to boot into the Linux environment. But sometimes DBAN doesn’t work right for example in the case of my Toshiba Satellite A215-S4747 laptop. As soon as I try to boot DBAN it gives an error saying that it failed and that it’s probably due to bad sectors on the disk. If this happened in the middle of wiping, I might believe that it was bad sectors but this morning I had a brand new laptop do the same thing. So instead I booted into the System Rescue CD and used shred:
shred -n 7 -z -f -v /dev/sda
The “-n 7” tells shred to write /dev/sda 7 times with random data and then “-z” says to pass over it with zeros on a final pass in order to hide the fact that it was wiped. “-f” means to force it and “-v” has it print out the status as it goes.
Thanks to HERE