1

I recently purchased a 1 TB hard drive to replace the failed one in a laptop. However, this new drive is not working as well (as fast) as expected and I would like to return it. As of now, I have only managed to put an operating system and a few programs on it. Since the hard drive contains the activation keys for this software, I would like to make sure that the drive is clean before I return it. Unfortunately, I do not have the time or the want to run a full pass of zeros, and am looking for a way to wipe only the few sectors I have used so far.

In short, how do I wipe only the used portion of a 1 TB HD in a timely manner?

[EDIT]:

The suggestions offered this far are valid solutions, however they are not quite what I was looking for. Please know that I am not a big linux user, and don't have a linux boot cd on hand or the time to get one.

Since I have yet to really delete anything on the drive, I suppose what I am looking for is a way to zero the existing data without wasting time on the empty space. For the most part, there is a good chance that 9/10ths of the drive have yet to be touched, and I was hoping it possible to avoid changing that.

[EDIT]:

I wish to thank those of you who have offered their solutions to my questions. However, it has come apparent that there is no acceptably secure method of accomplishing what I asked. Next, I wish to record what I have decided to do: a single-pass zeroing of the drive. Keep in mind that I am not returning this drive to some paranoid branch of the U.S. government, as if they were that paranoid, I am certain that they would already know full well what was on it. Additionally, for those of you who think a single pass is insecure, I encourage you to investigate the latest literature on the subject of mechanical drive security. I highly doubt someone at staples is going to spend a small fortune just to get my windows product key.

Thanks Again!

RlonRyan

RlonRyan
  • 113

5 Answers5

0

Start the laptop with any linux live CD. Ubuntu would work perfectly well (https://help.ubuntu.com/community/LiveCD). Just follow the prompts until you have a LiveCD desktop. Launch the command line (Terminal). Become root on the command line (try sudo -i or su - with a blank password). Find your drive by running "ls /dev/sd*" . I will refer to the partition as sdyX where it'll actually have a name like /dev/sda1. Run fdisk -l /dev/sdyX to see what partitions you have. Run the command "dd if=/dev/zero of=/dev/sdyX bs=10240" to overwrite the partition with zeros. Repeat this for all the partitions from fdisk and finish with the "sync" command. Your drive will now be zerod.

There's also a boot disk called DBan which you can use if you're not very comfortable with linux.

0

dd'ing your drive with zero's using a Linux LiveCD is probably the best (read: safest) way to go.

To answer your question (only delete occupies sectors), use a Linux live CD/USB and use srm (secure remove) to delete all files.

mount -t ntfs /device/path /mnt/WinDisk
srm /mnt/WinDisk/*

Not sure if this is faster than the dd'ing though, but it answers your question.

If you're in a real hurry, you can also just delete the partition table and boot record. It will obfuscate, not delete your data, but it's the fastest way I can think of.

dd if=/dev/random of=/device/path bs=512 count=1024
agtoever
  • 6,402
0

why don't you just use DBAN to completely erase your data? It is easy en secure. If you want something that is a bit faster, please use Diskwipe build into HBCD. You can make an usb bootable using "Yumi" Let me know if you have questions.

0

Disregard the answers that ask you to mount the disk and perform a secure erase there (that would work but unnecessary complexity and not 100% reliable), instead shred the entire device which will overwrite it many times with random data, leaving no trace of the data nor even partition table or file systems :

shred -v /dev/sda # assuming sda is your disk

If you really care about zeroing the disk, shred has an option to make the last pass zeros instead of random data, check its manual page.

0

There is no way to ensure that there is no data left on the disk except by overwriting every single sector of the filesystem partition. The list of currently allocated sectors is just that: it will not tell what may have been allocated and written to earlier. Many apps create temporary files which are subsequently discarded, and the sectors used by those apps are returned to the unallocated list, perhaps containing data you wouldn't wish to share.

kreemoweet
  • 4,742