5

I've been trying to set the password on my Seagate drive:

sudo hdparm --user-master m --security-set-pass pwd /dev/sda

I get

Issuing SECURITY_SET_Pass command, password="pwd", user=master, mode=high SECURITY_SET_PASS: Input/output error

Why do I keep getting that error?

Hennes
  • 65,804
  • 7
  • 115
  • 169
Glad
  • 51

2 Answers2

2

@Glad: Did you check if the drive was frozen? I figured out from the ata specs that it should not be frozen. There are some tricks to get it to a unfrozen state such doing a suspend to RAM and waking it up. Then my I/O error dissappeared but the master password didn't work...

I agree with @Glad and this is what I think is happening - your BIOS probably issues the "SECURITY FREEZE" command which blocks a few security related ATA commands on bootup.

If this is a SATA drive, you can boot off of a Linux live CD (try one with as recent of a kernel as possible for the best hdparm support). Disconnect the power from the drive after the system has rebooted, then reconnect it. This should get the drive in an unfrozen state because the BIOS does not touch it then.

This is electrically safe for SATA drives which support hotswap. This is not safe for internal IDE or SCSI drives.

However ...

If this is a USB attached drive, the USB bridge chip in the enclosure of the external drive may not support forwarding all ATA commands to the unit. You should remove the drive from the enclosure and attach it to a real SATA port on a motherboard.

LawrenceC
  • 75,182
1

I had my Samsung PM830 (MZMPC256HBGJ-000L1) cleaned because I tried to get rid of S.M.A.R.T. Errors (uncorrectable error count / ecc error rate -> which caused windows update errors like 800f0922 -> it was just a guess that something like internal wiping could help to recover my SSD)

Read here what caused "SECURITY_SET_PASS: Input/output error" on my system:

Well I ended up using parted magic and used "Erase" -> Internal Secure Erase I had to unlock the drive using a short standbytime. I used enhanced secure erase. I did not read https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase before ;) I waited until the program told me the Harddisk internally finished.

The Notebook was a Lenovo Yoga 13. When I restarted my system I was prompted a password. But I never set it and according to some Sources it had been set to an empty value with security enabled.

How I got rid of my error

I started another laptop (asus eee 1000h) without the harddisk, waited for parted magic to boot. Then hotpluged the harddisc in. Opened the Console. When I executed "hdparm -I /dev/sda" the Program saw the harddisk and told me that "Security" was enabled and locked.

I followed https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase and only got outputs alike

Issuing SECURITY_SET_Pass command, password="xxxx", user=master, mode=high
 SECURITY_SET_PASS: Input/output error 

Finally, after some angermanagement, I went to re-erase it a second time and afterwards I recognised that the "enabled" and "locked" had been gone.

I suppose

hdparm --user-master u --security-erase NULL /dev/X

did the job, but I cannot confirm it! According to the Input/Output Errors all my other tries failed, only this worked.

WARNING: Please read other sources and the warnings about setting the password to NULL, especially on Lenovo-Laptops!!

But may this help someone who thinks that the harddrive already has been bricked.

Nibbels
  • 21