[clug] Secure Erase of disks/drives
michael.cohen at netspeed.com.au
Tue May 8 10:16:38 GMT 2007
On Tue, May 08, 2007 at 07:46:43PM +1000, Eyal Lebedinsky wrote:
> After reading a mention of "security erase"ing an ata disk, I searched
> for a program that issues this command and did not find any.
> I checked the kernel sources and all I can find is in
> #define WIN_SECURITY_ERASE_PREPARE 0xF3
> #define WIN_SECURITY_ERASE_UNIT 0xF4
> #define SECURITY_ERASE_PREPARE 0xBC
> #define SECURITY_ERASE_UNIT 0xBD
> So, is such a command implemented? How does it operate, and more
> importantly - how does one issue it?
That stuff is related to the ATA commands mentioned at one of the references
earlier in this thread. The usual problem is that although you can overwrite
the disk with data, modern hard disks do block level remapping transparently so
you normally have no idea if you are overwriting all blocks. Blocks can be
substituted even when the hdd detects they are close to failing but not
actually failed. In that case it is possible to recover the old blocks data
(which have been remapped) even though technically they were overwritten.
The above ATA commands are supposed to ensure that remapped blocks are also erased.
I think this is implemented using the hdparm --security-erase stuff but i have
never tried it. The man page sounds ominous though:
The Linux kernel up until 2.6.12 (and probably later) doesnÂ´t handle the
security unlock and disable commands gracefully and will segfault and in
some cases even panic. The security commands however might indeed have
been executed by the drive. This poor kernel behaviour makes the PIO data
security commands rather useless at the moment.
Maybe this has been fixed with later kernels.
More information about the linux