Skip to content

Instantly share code, notes, and snippets.

@ctrl-freak
Created October 1, 2023 11:55
Show Gist options
  • Save ctrl-freak/076a4ddce73513f0ab9bf62493c25b36 to your computer and use it in GitHub Desktop.
Save ctrl-freak/076a4ddce73513f0ab9bf62493c25b36 to your computer and use it in GitHub Desktop.
Clear ATA Security Lock (Encryption) on ex-Pure Storage array drives
# Done successfully on a Toshiba THNSNJ512GCSY
# WARNING: ALL DATA ON THE DRIVE WILL BE LOST; DON'T DO THIS UNLESS YOU KNOW ITS WHAT YOU NEED
# This is a series of shell commands, not a functional script
# Once unlocked, the drive should be able to be initialized/MBR written and partitions created.
sudo -s
# Identify drives
lsblk
#NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
#sda 8:0 0 476.9G 0 disk
hdparm -I /dev/sda
# Look for Security section, often near the bottom
#
#Security:
# Master password revision code = 65534
# supported
# enabled
# locked
# not frozen
# not expired: security count
# supported: enhanced erase
# Security level maximum
# 2min for SECURITY ERASE UNIT. 2min for ENHANCED SECURITY ERASE UNIT.
# https://www.reddit.com/r/purestorage/comments/14bks8j/comment/jsggp6t/
hdparm --user-master m --security-erase PUR3_DrIvE_RETSAM_K3Y /dev/sda
#security_password: "PUR3_DrIvE_RETSAM_K3Y"
#
#/dev/sdb:
# Issuing SECURITY_ERASE command, password="PUR3_DrIvE_RETSAM_K3Y", user=master
# No I/O error, password accepted
hdparm -I /dev/sda
#Security:
# Master password revision code = 65534
# supported
# not enabled
# not locked
# not frozen
# not expired: security count
# supported: enhanced erase
# 2min for SECURITY ERASE UNIT. 2min for ENHANCED SECURITY ERASE UNIT.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment