On Mon, 2019-07-01 at 22:09 +0200, Philip Hands wrote:
I think it's probably rather hard to do safely, as IIRC one often
needs
to try hdparm, then in order to cause the drive not to be locked do
something like suspend and resume the system, then set an admin
password, and only then do the secure erase ... which then takes
quite a while.
I believe that modern drives (both HD and SSD) often have their own
encryption layer, and secure erase is implemented by erasing the
encryption key and (on an SSD) marking all blocks free in the flash
translation layer.