I mean really erase. In a secure way.
(It's Ubuntu)
UPDATE: Ok, "shred -vfz -n 10 /dev/hda" looks like what I was after.
I mean really erase. In a secure way.
(It's Ubuntu)
UPDATE: Ok, "shred -vfz -n 10 /dev/hda" looks like what I was after.
dd if=/dev/zero of=[raw disk device] bs=512
Some authorities suggest that you need to do this as many as 7 times to really be sure, but if you want to eBay a hard disk, once ought to be sufficient in my opinion.
Be sure you use the correct disk device! You don't want to do that to any disk that has anything important on it!
GNU Shred will wipe everything. Boot from a livecd and run sudo shred /dev/sda
(or whatever hard drive you want wiped is). This will even protect from magnetic analysis of the disk.
There are various commercial tools that also do this, but shred is free.
Randomly write bytes across the drive, perhaps several times. The scene from Cryptonomicon comes to mind.
Use the "shred" command:
Suppose I want to erase all the data on my hard disk, then I boot using a LiveCD like Knoppix and open a shell and type the following command:
shred -vfz -n 10 /dev/hda
Here /dev/hda is my whole hard disk. And I am asking shred to make (-n) 10 passes by overwriting the entire hard disk with (-z) zeros. And shred program (-f) forces the write by changing the permissions wherever necessary.
10 passes is probably way overkill, I'm not aware of a single confirmed example of someone recovering data from an erased disk even after 1 pass. Its a time-paranoia trade off.
Thermite, or a industrial metal shredder. Drilling some holes in it with a power drill may do in a pinch.
Depends on the threat model.
If you're only worried about someone reading bits off the disk in the usual way, then overwrite it once with zeros.
If you're concerned about physical analysis of the platters, use GNU shred. And look into full-disk encryption next time.
If you want to be absolutely sure that no data can be recovered, then nothing beats smashing the platters with a hammer and throwing the pieces in an incinerator. Only destruction ensures that no future advance in hard disk forensics will allow the "history" of the drive to be recovered.
shred will not wipe everything if you are using a journalling filesystem. Even manpage for shred mentions it:
CAUTION: Note that shred relies on a very important assumption: that the file system overwrites data in place. This is the traditional way to do things, but many modern file system designs do not satisfy this assumption. The following are examples of file systems on which shred is not effective, or is not guaranteed to be effective in all file system modes: ...
In the past there was enough redundancy on the disc that after one pass of erasing it was possible (using special equipment) to recover data. Probably nothing to worry about for most people but if you had good reason to think people would really want your data then multiple passes were reccommended.
As I understand it, with the densities of modern disks, there really isn't much redundancy and after a single pass there's not really any detectable data left.
dd if=/dev/zero of=/dev/sda bs=512 from a LiveCD. Lather, rinse, repeat up to 35 times if you want to be as secure as the Department of Defense.
Then, when you're done with it all, shoot it a few times with a nail gun, go Office Space on it, and then throw it into a volcano.
A single overwrite will do it (Heise Security)
There's a propability of 56% that one single bit can be correctly recovered. It's just 6 % points better than guessing!
One byte has the propability of 0,97% to be recovered. Calculate for yourself what does this means for a 3 MB word document...
A nice comment were posted in the German Heise Forum:
This recovery method would be as effective as guessing, but guessing would work even if the data haven't even written down yet!
So: Don't panic! :)
As others have suggested, DBAN is good. Anything which overwrites the entire contents of the disc, just once, is good enough.
There is no evidence that, on a modern disc, there is ANY way of getting anything back that's been overwritten once.