25 - Securely ERASE (wipe) your hard disk of ALL data (before disposing of it)

Unique page hits tumblr hit counter

Introduction

If you want to sell or give away or dispose of your system you should first wipe the data from the disk. Just re-installing the Operating System using the original manufacturers CD/DVD will not remove your personal data! So first you should wipe all the data from your hard disk so that no data at all (i.e. remove Windows, Linux, boot code, Master Boot Record, partition tables, pictures, games, music, browser password files, financial spreadsheets - everything) remains. You can use a special 'Erase' utility to wipe your entire hard disk. However, you must reboot your system to a different operating system first as Windows normally will not allow you to overwrite it's system files whilst it is running.


Many 'Erase' programs work by writing all 00's to all normal sectors on the drive. This can be very slow. However, if you use CMRR Secure Erase (HDDErase), it sends a special command to the hard disk which tells it to erase itself. This is MUCH faster as the erase utility does not have to write GBs of data to the drive. You can save hours of time when erasing a hard drive. HDDErase also wipes hidden sectors and also those sectors marked as 'bad' and which cannot be overwritten by normal wipe programs - these sectors contain old user data which could be accessed by an advanced engineer or hacker. So HDDErase is actually both faster and better as a 'security wipe' program than other types which merely erase the normally accessible sectors of a disk.

The first section below describes how to prepare a bootable USB Flash drive (or any USB drive), so that you can boot from it and run HDDErase.exe on any system that will boot from a USB drive.

Note: if you have an Easy2Boot USB drive, just copy the .iso file into the \_ISO\UTILITIES folder, rename it as HDDErase.isoDOS01 and run B:\HDDErase.exe from DOS after it has booted.

The second section ('NUKE') describes how you can run HDDErase directly from the same system disk that you want to erase and this method does not need any other form of boot media (i.e. does not need a bootable USB drive or bootable CD).

If you have problems on a particular (newish) system when using HDDErase or MHDD, I suggest your try the latest version of DBAN.



Use a Windows Installation ISO or WinPE

This method requires some care - ensure you select the correct drive.

  1. Boot to any Windows 8 or 10 ISO - e.g. Windows 10 Installation ISO or WinPE 8/10
  2. Press SHIFT+F10 to open a command console window
  3. Type DISKPART to run diskpart
  4. Display all disks
    LIST DISK
  5. Select the disk you want to erase
    SELECT DISK 0
  6. Erase the disk (all partitions, all data) - it may take a while!
    CLEAN ALL
  7. Quit
    exit

HDDErase from a bootable USB drive


WARNING: HDDERASE erases all partitions on a hard drive. If your hard disk has two partitions, say C: and D:, then this program will erase BOTH partitions. It will basically return your hard drive to a factory fresh state with no files or data on it at all.

NOTE: You can erase your hard disk without needing to make a CD or bootable USB. See NUKE at the end of this page).

Requirements

  1. A USB flash drive (or SD card if the target computer has a bootable SD card slot)
  2. RMPrepUSB full download
  3. The program HDDERASE.exe which can be downloaded from here
Your target system (the one you want to erase) must be capable of booting from a USB drive. HDDERASE needs to run under FreeDOS or MS-DOS.

If you want to wipe a SATA drive, you will probably need to set the BIOS to IDE\Legacy mode first. If your system does not have such a disk controller BIOS setting, you can plug the HDD into a system that does, wipe it, and then return the HDD to the original system.

Instructions

  1. Prepare your USB drive using RMPrepUSB as follows:


    Note that you need to set the 'Copy OS files' option to the FREEDOS_USB_BOOT folder (which is included in the RMPrepUSB download).
    The latest version of RMPrepUSB will prompt you to set the FreeDos folder.
    If the target system does not boot, try the Boot as HDD option instead of Boot as FDD.

  2. Copy the program HDDERASE.exe to the USB drive
  3. Switch on your target system - it MUST be off to start with (if it is a notebook, make sure it is running from the mains as erasing a hard disk can take hours), enter the BIOS Setup menu (e.g. by pressing F2 or DEL usually) and change your SATA HDD controller settings from 'AHCI' or 'Enhanced' to Compatible/Legacy IDE. If your BIOS does not have these settings then don't worry. Also, change the boot priority to make sure you boot from the USB drive. Save the settings and exit.
  4. Boot from the USB drive on the target system (the one you want to erase).
  5. Type HDDERASE from the FreeDOS command prompt to start the utility...

  6. Answer Y to proceed

  7. After a few more prompts, you will be given a list of detected drives:

    P0 is none
    P1 is none
    S1 is ATA DEVICE
    XXXXXXXX
    S2 is none

    PLEASE SELECT A DRIVE

    Enter XX for aaaaa drive
    Enter EX to EXIT the program

    PLEASE ENTER YOUR SELECTION:


    (if no drives are listed then change your BIOS HDD settings to disable AHCI/Enhanced mode and try again!)

  8. Now type in the drive you wish to erase - e.g. S1 (note: Some SSD drives also support this feature - make sure you select the correct drive!)
  9. If the drive supports the necessary ATA Security feature set command, you can proceed
    If HDDErase says that the drive is password locked and offers to try to unlock it, say Yes. If the unlocking is successful you will be prompted to do a 'hard reboot' - this means turn off your system and turn it on again. When you re-run HDDErase, the drive should now be unlocked.
  10. Type Y to proceed to the options menu.
  11. Follow the prompts to start the erase process.

    An example sequence is shown below. Also please read the Readme and FAQs below for more information.
Active HDD: Hitachi HTS722016K9SA00

****************************************************
| This drive supports the ATA security feature set |
| This drive supports enhanced secure erase |
****************************************************

Do you want to procede to the options menu? (Y/N) y

**********************************************************
| Active HDD: Hitachi HTS722016K9SA00 |
+--------------------------------------------------------+
| Enter 1 for executing secure erase |
| Enter 2 for executing enhanced secure erase |
| Enter C to change the active HDD |
| Enter E to exit the program |
**********************************************************

Please enter your selection: 1

+----------------------------------------------------------+
| It is required to set a password to the HDD to perfom a |
| SECURE ERASE. |
| Setting HDD security with the following password: idrive |
| Set password command: Successful! |
+----------------------------------------------------------+

Do you want to proceed? (Y/N) y

The estimated duration of this process is: 120 minutes

The secure erase started now at: Sat Apr 12 12:52:12 Sept 2008
The current time is: 14:50:21

Secure erase complete

Audit log successfully written to LBA sector 0

Do you wish to view LBA sector 0? (Y/N): Y
This drive: Serial number = 070526DP0D00DVG0L9KA, Model = Hitachi HTS722016K9SA00
was successfully erased on...Sat Apr 12 14:50:21 2008

To go back to the options menu press ENTER . . .

This procedure can also be used on SSD Flash drives to reset them back to their 'as new' performance by erasing all data blocks.


If you wish to add HDDErase as a single bootable image file to your multiboot grub4dos USB boot pen, copy the file hdderase.img.gz from the Beta downloads page to your USB drive and add the following lines to your menu.lst file:

title HDDErase floppy boot disk
find --set-root /hdderase.img.gz
map --mem --heads=0 --sectors-per-track=0 /hdderase.img.gz (fd0)
map --hook
root (fd0)
chainloader (fd0)+1

You can also add Darik's Boot and Nuke to the menu, in case HDDErase does not work with your hard disk:

title Dariks Boot and Nuke dban-2.2.6_i586.iso
find --set-root --ignore-floppies /dban-2.2.6_i586.iso
map --mem --heads=0 --sectors-per-track=0 /dban-2.2.6_i586.iso (0xff)
map --hook
root (0xff)
chainloader (0xff)