Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am planning on selling my laptop. So I formatted my disk using the Disk Utility and chose to overwrite the disk with zeroes.

Two questions:

Is this the same as overwriting the disk using dd?

sudo dd if=/dev/zero of=/dev/sda

And is this method secure enough so that buyers can't easily recover the previous data? Or should I take additional measures (like encrypting the disk, destroying the headers, etc.)?

share|improve this question
    
I would boot from a live USB or CD unmount my drive then use shred. See How can I securely erase a hard drive? for how –  Warren Hill Oct 15 '13 at 19:44
    
I still prefer a GUI for doing this kind of thing. Are there any advantages for using shred over the Disk Utility? –  Neftas Oct 15 '13 at 20:16
add comment

4 Answers 4

up vote 3 down vote accepted

Yes, the disk utility uses a method similar to the one with dd you describe, or a faster and more secure one more like:

dd if=/dev/urandom of=/dev/sda bs=$((1024*1024))

This introduces a lot more fuzz to the overwriting pattern than zeros only, which should be more difficult to restore but not noticeably slower to perform.

Some people claim, this is not enough and one should overwrite hard disks multiple times and with more elaborate patterns (scrub(1) can do both of that as per the other answer), but most will say once is enough, if an attacker wants to restore more than a few bits with a significant chance.

share|improve this answer
    
There are so many methods, I was just wondering if the Disk Utility is safe enough. I don't want to drag this thing out, just want to make it clean enough for a sale, and make sure no-one can easily to my data. Thanks for answering. –  Neftas Oct 15 '13 at 20:15
    
If you want to be sure, you need to either read the documentation or even the code of the disk utility (though I don't know why they would do something stupid over something so trivial), or do it yourself with dd or scrub. –  David Foerster Oct 15 '13 at 20:20
    
Yeah, or check if you can recover something yourself after the wipe is done. I think I'm going to trust the program. –  Neftas Oct 15 '13 at 20:24
1  
Even if you simply overwrite the drive with zeros once, you wouldn't be able to recover any data with software or home tools alone. –  David Foerster Oct 15 '13 at 20:25
add comment

The "bootom line" AFIK is that the data has to be over written or it can be retrieved. There are many tools / methods to do this.

The general consensus is that you only have to make one pass, so additional passes take additional time and put excessive wear and tear on the hard drive.

While there are many solutions, I prefer scrub.

scrub /dev/sda

Or if you prefer

scrub -p dod /dev/sda

See:

http://www.cyberciti.biz/tips/linux-unix-make-retrieving-data-more-difficult.html

http://www.robwhalley.co.uk/secure_erasing.html

http://linux.die.net/man/1/scrub

http://link.springer.com/chapter/10.1007%2F978-3-540-89862-7_21

share|improve this answer
    
Like I said in the comment on my question, I prefer using a GUI if there is one readily available, like in the Disk Utility. (I don't really like staring at my Terminal, wondering if it's doing something. I know there are ways to show progress with dd, but still.) Besides for me it's important that the process takes hours, not days, so overwriting everything with zeroes seems like my best bet? –  Neftas Oct 15 '13 at 20:22
add comment

Another option for reference is to use the ATA Secure Erase method using hdparm.

https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase

share|improve this answer
add comment

Zeroing in a single complete past (as both your examples show) is enough.

From http://www.h-online.com/newsticker/news/item/Secure-deletion-a-single-overwrite-will-do-it-739699.html

...a hard disk is overwritten with zeros just once, all of its data is irretrievably lost.

Craig Wright, a forensics expert, claims to have put this legend finally to rest. He and his colleagues ran a scientific study to take a close look at hard disks of various makes and different ages, overwriting their data under controlled conditions and then examining the magnetic surfaces with a magnetic-force microscope.

share|improve this answer
    
I noticed a lot of this 'recovering data' is theoretical. Has anyone actually ever succeeded recovering data from a securely erased device? –  Neftas Oct 15 '13 at 20:45
    
Have a read of nber.org/sys-admin/overwritten-data-gutmann.html - its not proof, but goes to great length to explain how difficult it is. –  NGRhodes Oct 15 '13 at 20:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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