如果结果是“frozen”的,有可能是主机的BIOS禁止发送ATA Security Erase指令,这需要找到BIOS中打开这个限制。
第二步:设置一个密码
hdparm --user-master u --security-set-pass user123 /dev/X
user123是设置的一个密码.
#hdparm --user-master u --security-set-pass user123 /dev/sde
security_password="user123"
/dev/sde:
Issuing SECURITY_SET_PASS command, password="user123", user=user, mode=high
SECURITY_SET_PASS: Invalid exchange
结果可能是“SECURITY_SET_PASS: Invalid exchange”,但密码也可能是设置上了,可以使用hdparm -I /dev/X检查是否设置上了,输出结果应该是“enabled”:
Security:
Master password revision code = 65534
supported
enabled
not locked
not frozen
not expired: security count
第三步:执行删除操作
hdparm --user-master u --security-erase user123 /dev/X
#hdparm --user-master u --security-erase user123 /dev/sde
security_password="user123"
/dev/sde:
Issuing SECURITY_ERASE command, password="user123", user=user
SECURITY_ERASE: Invalid exchange
然后再检查Security被禁止了:
使用hdparm -I /dev/X检查是否设置上了,输出结果应该是“not enabled”:
Security:
Master password revision code = 65534
supported
not enabled
not locked
not frozen
not expired: security count