Ubuntu – Secure erase returns input/output error

hdparmpasswordsecure-erase

I've already given a detailed description of my predicament in my previous question.
Now I've got this:

sudo hdparm --user-master u --security-erase my_password /dev/sda  

returns:

security_password: "my_password"

/dev/sda:
Issuing SECURITY_ERASE command, password="my_password", user=user
SECURITY_ERASE: Input/output error

What's going on?

Best Answer

FYI: unlocking a Kingston SSD by use of hdparm, after setting a user password appears to be impossible.

NOTE: The drive will appear as locked next time you reboot after setting your password. Until then, security will only appear as enabled.

Whether trying the very user-password you just set, or other variants, such as "", "NULL", NULL or a row of 32 spaces, either as a user-password or as a master-password, will not unlock your drive, but instead give you an Input/output error.

sudo hdparm --user-master m --security-erase "" /dev/sda

will, however, do the job (that's m as in master, since in Kingston's case the master-password is apparently NULL by default).

The very same master password ("") that returns the Input/output error for the security-unlock command, works just fine with the security-erase command.

So don't lock your ssd unless you really intend to erase it, 'cause it's far from certain whether you'll be able to unlock it.

I've been reading reports of similar issues and I've even stumbled across a patch, which I have, however, not tested.