Wipe hard drive Partition freeware

Started Sep 4, 2009 | Discussions thread
Jim Cockfield Forum Pro • Posts: 16,333
Re: Wipe hard drive Partition freeware

Vernon, it sounds like you want to erase one partition on a drive, versus an entire drive.

If you read my original post, you can do that using a Linux command called dd (which can overwrite everthing on a device using zeros if desired).

Note that the other product I mentioned (dban) is not a linux distribution. It's just a wipe utility designed to erase all drives (hence the need to disconnect any drives you don't want wiped). Don't use it for deleting one partition.

You'll want to use a Linux Live CD instead.

I haven't booted into a GParted Live CD lately. So, I don't know if it's got any other common linux utilities on it's CD or not. Chances are, it does. But, I don't know how easy it is to get to a console (terminal program) to use them.

The SimplyMEPIS Linux distro I mentioned in my first post has many utilities on it (including GParted). . But, again, you don't want to use it to securely erase anything. That's not what it's designed for.

You can very easily delete a partition with it and still recover it later using a tool like testdisk designed to analyze a drive for known partitions and update the MBR to include them again.

Even if you can't update the MBR with the old partition information (because you've expanded an existing partition to use the space previously occupied by one you removed using GParted), you can still recover any files on it using utilities designed to ignore the underlying partition table and file systems on a drive and go after files instead.

To easily overwrite all data on a drive, use the dd utility I mentioned instead. To repeat the instructions in my first post:

Jim Cockfield wrote:

Boot into almost any Linux distro with a Live CD available (for example, SimplyMEPIS, which is free, where you can find more info and download links from http://www.mepis.org )

Then, use this command from a console (substituting the correct drive name for sda. where sda is the first drive in your system, sdb is the second drive in your system, etc.).

dd if= dev/zero of= dev/sda bs=1M

If you don't know the drives naming, just type this and you can get a list of drives and partitions:

fdisk -l

Basically, that dd command "zero fills" the entire drive, making it pretty securely erased unless you're using specialized forensic utilities.

To expand upon that answer, yes, you can also use it to overwrite data on an individual partition versus an entire drive.

Open a Terminal (Console) in most Linux distros and do this, typing the root password when prompted, which is going to be "root" (without the quotes) on a Live CD like SimplyMEPIS:

fdisk -l

That will give you a list of drives and partitions in your system. With most newer Linux distros, your first drive will be sda, your second drive will be sdb, your third drive will be sdc, your fourth drive will be sdd, etc. Those are physical drives, not drive letters assigned to partitions, and most linux distros will go by their boot order in the BiOS.

If you want to reference an individual partition, you'll see them numbered after the drive identifier. For example, sda1 is the first partition on your first drive, sda2 is the second partition on your first drve, sda3 is the third partition on your first drive, etc.

For example, if you wanted to reference the second partition on your second drive, it would be sdb2 (where sdb is the second hard drive and the 2 represents the second partition on it).

So, if you wanted to "zero" fill the second partition on the second drive (to overwrite all data used by that partition), you could do this from a terminal:

dd if= dev/zero of= dev/sdb2 bs=1M

Note that the bs is optional (it's just the number of bytes it's writing at one time). Here's a wiki about it:


If you wanted an even more secure way to do it (more than one pass, so you're overwriting it more than once), you could use a utility called shred. It's syntax is a bit different: The easiest way to use it is like this (using it's defaults, which overwrites the target device 25 times using random data by default):

shred dev/sdc2

Or, like this (which also zero fills it after overwriting it to help hide the evidence of shredding, while giving you a progress report during the operation:

shread -vfc dev/sdc2

In those two examples, I'm overwriting all data on the second partition of the third drive (sdc), hence the target device of sdc2

You can see more options by typing this from a terminal:

shred --help

If all of that sounds a bit complicated, the main thing is to make sure you've got the correct target partion, and you can see a list of drives and partitions using the fdisk -l command mentioned like this:

fdisk -l

IOW, it's really not that hard, once you understand Linux device naming. If you want me to talk you through it via phone, send me an e-mail with a phone and I'll be glad to help out.

-- hide signature --
Post (hide subjects) Posted by
Keyboard shortcuts:
FForum PPrevious NNext WNext unread UUpvote SSubscribe RReply QQuote BBookmark MMy threads
Color scheme? Blue / Yellow