I'm planning on selling a USB external hard drive that currently contains an old Ubuntu installation with stored passwords and banking information.
How can I securely erase the drive before selling it?
|
I'm planning on selling a USB external hard drive that currently contains an old Ubuntu installation with stored passwords and banking information. How can I securely erase the drive before selling it? |
|||||||||||
|
Securely erasing a storage deviceThere's a command-line utility in Ubuntu called First of all, you need to identify the name of the device. This might be something like Then type:
(replacing You can also set all bits to zero after the last iteration by adding the option After this, you would have to repartition the device. The easiest way is to install GParted and use it:
Choose your device in the upper-right corner list. Then select Device -> Create partition table to create a partition table on the device. Then add a single partition that uses all of the unallocated space on the device, choosing fat32 as the file system. Apply the changes by click the Apply button (the green checkmark) in the toolbar. Tips
|
|||||||||||||
|
|
Just 'zero' it using the
This will overwrite the whole disk with zeros and is considerably faster than generating gigabytes of random data. Like all the other tools this won't take care of blocks that were mapped out for whatever reason (write errors, reserved, etc.), but it's highly unlikely your buyer will have the tools and the knowledge to recover anything from those blocks. PS: Before you Bruce Schneier fanboys downvote me: I want proof that it's possible to recover data from a non-ancient rotational hard drive that has been overwritten with zeros. Don't even think about commenting otherwise! :P |
|||||||||||||||||||
|
|
Have a look at this definitive question on Security Stack Exchange How can I reliably erase all information on a hard drive This discusses various secure deletion options, along with physical destruction and wiping so you can decide which option may be your best bet. Remember though that the current recovery status for different storage is as follows:
|
||||
|
|
For your information: See the following links,
Note:
|
||||
|
|
|
you can use wipe Installation
You can use that software or use the following command:
Were the "?" is, put the number of times you wan to shred the drive, then for were "(drive)" is, put the drive that you want to shred. Once your done, do whatever you want with it. I think that this method is more effective since you can control what is done to your drive and have immediate results. Links |
||||
|
|
|
Those recommending to use shred are giving bad advice. Shred's own man page says it's effectively useless on journaled filesystems, which Ubuntu is almost guaranteed to be using if you don't change its filesystem defaults (ext3 and ext4 are journaled. As is resierfs and Reiser4 as well as many MANY other common Linux filesystems.). Not to mention shred is completely useless for completely blanking or randomizing a disk, as it only works on individual files or sets of files (On the filesystem level, not a raw data level.). If you want to securely wipe a disk, you gotta use dd on the drive's main device node (For example: /dev/sdc instead of /dev/sdc1) while nothing is mounted on it. It WILL take a while, but unlike shred it will completely and IRREVERSIBLY wipe a hard disk from MBR to final sector. Also, BIG WARNING on dd, make sure you are using it on the correct device or you'll at least PARTIALLY wipe the wrong disk. This could be disastrous if you accidentally use dd on a system drive, which will not only make it unbootable, but may irreversibly corrupt any given partition on the drive. This has given it the nickname "disk destroyer." Shred is NOT a reliable tool for securely wiping a drive. If you're selling or giving your computer away the CORRECT way to empty the drive is to zero or randomize it with dd and never, ever use shred, as filesystem journals will effectively restore shredded files with no effort at all. |
|||
|
|
|
Go root and
Be certain you've got the right drive! |
|||||||||||
|
|
|||
|
|
|
I generally use a destructive read-write test using
Note that if the report indicates a problem, I'd no longer sell the disk as it is likely to fail soon. |
|||
|
|
|
DBAN is an open source Boot CD to wipe the hard disk. Down load from burn it and boot the machine from CD, that's all. |
|||
|
|