Wipe your hard drive clean

By Craig Simms on 09 November 2009

If you've ever wanted to get rid of an old hard drive, but want to make sure that people can't get at any potentially sensitive information, there's a few steps to get the job done.

Note that this tutorial assumes that you're already running an operating system off a different drive, and that the old one you wish to dispose of is plugged into and accessible by your new system.

Step one: back-up the whole hard drive

Considering the abundance and cheapness of storage available these days, it's entirely possible to simply create an image of your old hard drive and store it somewhere else, restoring individual files and folders when necessary. Just don't do the dense thing of storing the image file on the hard drive you made the image of.

Windows
If you're after a free solution, Runtime's DriveImage XML will fit the bill. Those who find more comfort in commercial solutions can't go past the excellent Acronis True Image Home 2010.

OS X
OS X has a disk image tool built in. Just go to your Applications/Utilities folder and run Disk Utility, select the disk or partition you wish to create an image of, and click the New Image button.

You can then view the contents of the image simply by double clicking on the file, or you can restore it entirely by clicking the Restore button in Disk Utility and following the instructions.

Linux
(Editor's note: depending on your set-up, you may need to sudo these commands) dd is the tool of choice here. For example, dd if=/dev/sda of=hdd.img will create an image file called hdd.img from the hard drive located at /dev/sda. Obviously you'll have to replace /dev/sda with the hard drive or partition of your choice.

In this command if represents the input file or device, whereas of represents the output file or device. If you've got multiple partitions on the one disk it can get tricky, so if you want to keep things easy, perhaps take an image of individual partitions rather than the whole disk.

To restore to another drive, just use dd again, but use the hdd.img file as the if argument, and your target drive as of.

If you'd rather not restore the entire image just to look at what's in it, you can mount the file to a folder to browse:

mount -r -o loop ./hdd.img /mnt/test

You should now see the contents of hdd.img in /mnt/test (assuming you've created the directory beforehand) — obviously you'll need to substitute in your own values for the image file and folder where you want to mount it. The -r argument to mount the image as read only is likely overkill, but we want to be safe.

To unmount, simply point umount at the directory the image is mounted in.

umount /mnt/test

Topics: disk, wipe, clean, reinstall, glitches, crash, guide, drive, hard, hdd, windows, errors

Related Articles

Comments (2)

  • drg55 commented on 11/11/2009 09:57 Report abuse

    Thanks for a really useful article. I'm currently trying to clean up an old laptop and had a free utility, kill disk, that was painfully slow, ran in dos and told me little.

  • SPC_75 commented on 09/11/2009 15:18 Report abuse

    The only 100% guaranteed way of ensuring your data is not recoverable is by shredding it into pieces. Even DBAN can be recoverable if someone is determined enough. Though for everyday users, tools like DBAN are fine.

Post your own comment

You must read and type the 6 chars within 0..9 and A..F

You must read and type the 6 chars within 0..9 & A..F

Submit

Enter your personal information to the left, or sign in with your Facebook account by clicking the button below.

Connect

The Explain Series

Must read