I accidentally locked an HDD with an ATA password, trying to issue a secure erase command. It was on Linux, I entered this command :
# hdparm --security-erase PWD /dev/sda
So the password is PWD (no need to keep it secret as it doesn't protect anything). Fine. But now the drive is locked, the BIOS asks for the password when I boot with the drive plugged, "PWD" doesn't work, and I think I found why : the BIOS accepts only lower-case letters.
I tried to remove the drive, boot on a live USB (Fedora) and plug the HDD, but the system doesn't recognize the drive. And I can't boot with the drive plugged : the BIOS won't even let me in the setup screen to boot on the USB stick, without the ATA password.
How can I unlock it if I know the password but the BIOS doesn't accept it ?
Best Answer
This is a "feature" of many BIOS implementations. Fortunately, the ATA security spec is only enforced by the BIOS, not the drive itself. That means if you can get around the BIOS, you can access the drive.
Please note, a USB enclosure may not work. Issuing ATA commands to a SATA drive in a USB enclosure may fail. It depends on whether or not the USB controller in the enclosure will reject the commands.
Here's a better way:
hdparm
to remove the password from the drive.If your laptop does not support SATA hotplugging, then this trick will have to be performed on another computer -- preferably a desktop, since desktops are usually more standards-compliant than laptops are.
Also, the SATA controller must be set to AHCI for this to work. IDE or RAID modes will fail.