Quickly and Securely Wipe an HDD/SSD using ATA Secure Erase

Recently, I had a mechanical hard drive with bad sectors, which I wanted to wipe1 before sending it in for an RMA. Of course the reason I wanted to return it was because of the bad sectors–which means any process that tried to access those sectors would hang. I figured that even a tool like Darik’s Boot And Nuke would choke on it. (I did not try.)

While researching this, I came across HDDErase, which uses the low-level ATA Secure Erase command to securely wipe an ATA or SATA HDD. HDDErase seems to be the most commonly-mentioned tool that uses this method, but I couldn’t get it to see the drive. I tried two different PCs, and mucking around with the BIOS settings as described in the readme–no luck.

Wilson’s blog post “How to secure erase your hard drive (HD/SSD)” gives some more options. (1) HDDErase and (2) hdparm both use the ATA Secure Erase command. hdparm? Score! Now I can use Linux…

The last link in (2) is to Secure Erase With bootable CD/USB Linux.. Point and Click Method. First I used UNetbootin to make a bootable Parted Magic USB thumbdrive, then I followed the guide. I used a Thermaltake BlacX ST0005U drive dock to connect the bad drive to the PC via eSATA. Note from the guide, “If Secure Erase fails you can try hot-plugging the drive after bootup”–I had to do this. It took a couple hours on a 500GB 2.5″ HDD, and it worked like a charm.

I love open source.

Further reading:


tl;dr: To quickly and securely wipe an HDD or SSD, even if it has bad sectors, use UNetbootin to make a bootable Parted Magic USB thumbdrive, then follow this guide: Secure Erase With bootable CD/USB Linux.. Point and Click Method.


[1] By “wipe”, I mean I wanted to securely erase all the data on it, so that it would be unrecoverable.