Securely wipe hard drives using linux

Howto securely erase a harddrive .

Simply deleting, formating or zero writing a hard drive is not enough to keep a determined individual from restoring data from a hard drive. To ensure that your data really is deleted use a CD based distribution such as knoppix to boot the computer.

You can either issue the following commands seperated by a semicolon (;) or put them into a script. This is essentially a fire and forget process, but it will take a really long time.

Also, each pattern (writing 0’s, 1s, and random) should be done 4 to 8 times for maximum security.

dd if=/dev/zero of=/dev/hdx dd if=/dev/full of=/dev/hdx dd if=/dev/urandom of=/dev/hdx

If you have a SATA drive or are connecting your drive via a USB enclosure, then the device name would be /dev/sdx instead of hdx.

x equals the drive letter from the following table:

a=Primary Master b=Primary Slave c=Secondary Master d=Secondary Slave

If you have a promise or 3ware controller your drive letter might be e f g or h. Do an ls /mnt to see what partitions were detected.