Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
Securely erasing all data from a hard drive

I'm going to give my HDD away, so I'm writing it full of crap so there is no possibility to recover any of my files I had there. Although, I have heard even re-written drives can be recovered some data from them, but I don't consider a high tech guys ever touching it, unless its very easy? I would like to know if it's possible... and how many times I need to write it over?

On the real question here; could it be possible to write into the multiple disks inside the HDD simultaneously and thus increasing total data write rate? So lets say if there are 6 disks inside, I could get 6x write speed if I wrote the same data to each one of them at same time.

Any other suggestions are welcome, since I am writing with 22MB/s speed ATM (old drive, or crappy code?), this will take a while.

Edit: For a security note, my HDD is around 10 years old, or less, and 60GB in size. Does this need only one wipe?

share|improve this question

migrated from stackoverflow.com Dec 11 '11 at 18:59

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Ƭᴇcʜιᴇ007, soandos, DragonLord, 8088, ChrisF Dec 12 '11 at 14:37

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
@Jason, sorry, heh, edited it just when you asked it. –  Rookie Dec 11 '11 at 18:58
1  
fastest is a one pass of zero fill as suggested by Basile Starynkevitch, No data can be recovered after a single overwrite, multiple overwrites are a waste of time...nber.org/sys-admin/overwritten-data-guttman.html –  Moab Dec 11 '11 at 19:06
    
Unscrew it and empty your bin in to it! :) –  William Hilsum Dec 11 '11 at 19:06
2  
too bad this was migrated, i would liked to know about how to do it in c++... –  Rookie Dec 11 '11 at 19:07
3  
@Rookie: Then ask again on StackOverflow, and specify that you want a C++ solution. –  SLaks Dec 11 '11 at 19:13

7 Answers 7

up vote 13 down vote accepted

I used CCleaner a few times, which is a free tool that does the job. enter image description here

share|improve this answer
1  
+1, as CCleaner does not only fill your HDD with garbage, it also does it securely (unrecoverable). I don't think CCleaner does it faster, but I also don't think you can write at the same time to multiple platters in a hard disk. –  jcisio Dec 11 '11 at 19:18
1  
@jcisio, looks to be 2x faster than my own program, probably because this is writing zeroes only? also weird that i cant hear my HDD "scratch" at all now. my version did a lot sound, even when i just wrote one file in one big partition. –  Rookie Dec 11 '11 at 19:34
3  
Keep in mind that wiping only the free space (even if you've removed all the files) could leave some crumbs behind in the filesystem structures. –  Mark Johnson Dec 11 '11 at 19:48
    
@Mark, CCleaner doesnt remove the hidden data? –  Rookie Dec 12 '11 at 16:06
    
@Rookie It can remove everything, you just need to select this option in the Wipe combobox. –  oleksii Dec 12 '11 at 17:23

sdelete - there is really no need for any of those multiple overwrite DoD stuff anymore

edit: sdelete is written by microsoft, it 'knows' about NTFS hidden regions, out-of-band data and all the other fun little features. It requires no install and is quick and easy.

The Mil Spec 'you must overwrite exactly 37 times with random data in the following order' stuff is mostly security app marketing and half remembered DoD requirements. It was argueably necessary on early bit-for-bit and even MFM hard drives where you had a chance of recovering partial zones if you read it under an EM. Although in practice it was more to do with wandering heads that often left earlier tracks entirely intact. With modern GMR hard drives the main concern is the firmware mapping out bad sectors leaving valid data that the OS doesn't know about.

share|improve this answer
    
Care to explain why its not needed and why sdelete is the right tool for the job? –  Ivo Flipse Dec 12 '11 at 6:43
1  
Density of bits on the disk mean that, with current technology, there's no way to see or read the "lasting" force like they can do with REALLY REALLY old hard drive platters. Something like that, anyway. –  Rob Dec 12 '11 at 15:39

Linux has a standard tool called shred which overwrites a file (or drive) several times with random data, to prevent retrieval of deleted files. If you don't want anyone to know you've used shred, there is an option to overwrite everything with zeroes in the last pass.

To use shred on a disk, find out what it's called (usually something like /dev/hda or /dev/sdc). Then open a terminal and run:

shred -vfz -n 10 /dev/hda

Where /dev/hda is replaced by whatever is the device's name. This will overwrite the entire disk ten times and one last time with all zeroes.

share|improve this answer

Use a Linux LiveCD to run something like

dd if=/dev/urandom of=/dev/sda1 bs=1M

That way you can be sure that you're overwriting everything in the partition and not just the free space. If you're ultra-paranoid you can also run it multiple times, but unless you're sending a disk which formerly had military secrets to someone with ties to foreign governments you probably don't have to worry.

share|improve this answer
1  
/dev/zero is secure enough and would be MUCH faster. –  Rob Dec 12 '11 at 15:38

Whatever tool you go with, ideally you want to wipe the entire drive, overwriting each sector. Tools that create a large file to take up all the free space on a filesystem could leave behind a few crumbs. I highly recommend DBAN as SLaks suggests, and it will wipe multiple drives at once (though only the ones you've selected) and it offers zeros, multiple patterns and random to suit your level of paranoia. It also works from its own boot media, so it's OS agnostic.

One pass with zeros will stop the amateurs, if you're worried about a TLA, make it one pass with random data, more if you're paranoid. I'm not aware of any proof that a TLA can recover data from a drive overwritten even once. I'm not aware of any proof that it can't be done, either. I would think any success stories would be classified.

What you really have to watch out for is remapped sectors...if you can't wipe those and the data is sufficiently sensitive, you should probably degauss it or physically damage / destroy the platters. Outfits that deal with classified data usually have special arrangements with the manufacturers so that they only return the part of the drive case with the label when getting warranty replacements. As far as I know, getting at data in remapped sectors requires tools that only the manufacturer or data recover outfits have, but tools like this worry me.

If you use full disk encryption on a new drive from day one, you probably don't have to worry about remapped sectors. Assuming your confident in your control of the key material and the software used, wiping the drive may even be unnecessary.

share|improve this answer

Just fill it with zero bytes, on Linux with something like

dd if=/dev/zero of=/dev/sdb bs=1M count=1000

this is enough for most purposes and is the fastest thing available.

(there is probably an equivalent on your system, and you could boot a live-boot CDROM linux to run it otherwise)

Of course, if you had military grade secrets on the disk, and/or you are afraid of the CIA, it is probably not enough. (In that case, destroy physically your disk).

share|improve this answer
3  
The question kinda has Win XP in tags... –  Violet Giraffe Dec 11 '11 at 19:02
    
Indeed, i guess he answered just before i edited the tags, sorry. –  Rookie Dec 11 '11 at 19:05
1  
Yes. I added a suggestion to find the equivalent on WinXP which I don't know... (I am using Linux since 1993) –  Basile Starynkevitch Dec 11 '11 at 19:10
    
chrysocome.net/dd –  grawity Dec 11 '11 at 19:14

You should use DBAN or similar tools.

share|improve this answer
    
I think ill pass, since i have 2 terabytes of data in my 3 other disks that i would like to keep. "DBAN will automatically and completely delete the contents of any hard disk that it can detect" o.O if i understood it correctly? –  Rookie Dec 11 '11 at 19:07
    
@Rookie You did understand that correctly. In your case the use of DBAN is inadvisable. –  Duijf Dec 11 '11 at 19:13
5  
@Rookie: DBAN only wipes drives you select (though I think there is a wipe all option). I think it prompts you for confirmation, too. –  Mark Johnson Dec 11 '11 at 19:14
    
Just physically disconnect drives with data you want to keep. DBAN is the solution for this problem. You can use something like Eraser inside of Windows to overwrite free space, but that won't ensure everything is wiped. The only way to do that is to overwrite the entire drive. –  DaleSwanson Dec 12 '11 at 1:45
    
@SLaks would you care to explain why this is better than CCleaner or the other suggestions? –  Ivo Flipse Dec 12 '11 at 6:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.