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?

5
  • For some BIOS you need first convert "pwd" to a scancode sequence. See:thaeial.blogspot.de/2013/01/…
    – student
    Oct 26, 2013 at 19:44
  • I get the same error on a Samsung SSD 840 Pro in a Dell Latitude 6400 ATG laptop (Bios Version: A34), german keyboard; even if I try to translate the ascii code to scan codes: sudo hdparm --user-master m --security-set-pass "$( printf 'testmasterpassword' | tr '1234567890qwertzuiopasdfghjklyxcvbnm' '\2-\11\20\21\26\27\30\31\40-\45\60-\70\104-\107\110\111\120')" /dev/sda security_password=" 1 P01 %011$2" /dev/sda: Issuing SECURITY_SET_PASS command, password=" 1 P01 %011$2", user=master, mode=high SECURITY_SET_PASS: Input/output error
    – student
    Oct 27, 2013 at 10:25
  • why can't you do this from within the BIOS? Oct 28, 2013 at 9:30
  • I didn't find an option to do this in the BIOS, there you can only set the user hdd password and you can set the option that typing in the master password invokes a secure erase instead of unlocking the ssd. However I don't know the master password which DELL has set up so I cannot test if this works. Thus I just want to overwrite the master password.
    – student
    Oct 28, 2013 at 11:31
  • 1
    @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...
    – student
    Oct 30, 2013 at 19:59

2 Answers 2

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.

1
  • 1
    great advice! I've just done this on my laptops samsung 850 pro. After putting it again into a running machine the state was unfrozen. thx
    – dr0bz
    Feb 25, 2017 at 11:08
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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .