Search This Blog

2010-09-06

Erasing a Hard Drive with Ubuntu Live CD

It is common for most people to just format a disk or remove all of their partitions without fully removing traces of their personal data. The data as most know is still easily recoverable using many tools available throughout the internet such as TestDisk which is commonly available through almost every live distribution of linux.

The easiest way to remove all traces of these files is to write over the portions of your drive with either zeros or with a randomly generated file. There are other methods like dban which is likely your best bet but most times it takes far too long (unless you are really paranoid).

I tend to use an Ubuntu Live CD and use the following commands to either write zeros or randoms to erase my disc.

Zeroing
sudo dd if=/dev/zero of=/dev/sda bs=1M
Note: if you would just like to create a large empty file with this command you can add count= to the end to specify the file size.

Random
Just replace /dev/zero with /dev/random as follows:
sudo dd if=/dev/random of=/dev/sda bs=1M

That's about it!

No comments:

Post a Comment