When selling old hardware, for instance an old laptop or external hard drive, you want to make sure nobody can access your private traces and data that you left on the device. Even if you clear the trash bin of your computer, the data is not always gone and can be recovered. In fact, the data is marked as deleted but can still be accessed and restored using special software tools. The data will be removed ultimately only after it is overwritten by new data. This article discusses how to nuke a hard drive with an Ubuntu live CD to safely erase data.
To avoid somebody seeing your private photos, having access to mails, or even worse your passwords, the hard drive must be overwritten with a random sequence of bits (yes, with zeros and ones).
Use DBAN to nuke a hard drive
One tool to archive that is Darik’s Boot and Nuke (DBAN). The tool can be downloaded as ISO image file and burned on a bootable CD, which allows you to boot the tool directly from the CD just as you would boot your operating system, and start erasing your hard drive. Of course, an operating system cannot delete itself, so you have to boot an external system just like DBAN from a disk (or USB device) to erase the hard drive but not let the tool erase itself.
Use nwipe and Ubuntu live disk
Another option is to use an Ubuntu live/installation disk (or again, USB device) to boot the Ubuntu operating system without installing it on the to-be-erased hard drive. After Ubuntu has been booted from disk, you can run a ported version of DBAN called nwipe to nuke the drive. nwipe does not come with the Ubuntu installation disk so you have download and install the package. The way to go is:
- Connect your device to the internet. Easiest way is to plug a LAN cable between the device and your router. The network connection is then established immediately, without configuration of WLAN or something alike.
- Open a Terminal window (CTRL + ALT + T).
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install nwipe
Now, nwipe should be installed on the Ubuntu live disk. You can now run it from the Terminal with the command
sudo nwipe. Note that you should run it using sudo. Otherwise, you may not be able to see (and erase) the hard drive. In the tool, you can select the drive with the space key and then press the S key to start the deletion.