Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SG_IO Error #4

Open
exequeryphil opened this issue May 23, 2021 · 2 comments
Open

SG_IO Error #4

exequeryphil opened this issue May 23, 2021 · 2 comments

Comments

@exequeryphil
Copy link

I used your patch for hdparm 9.45 and successfully created "$P"
But then, I receive the following error on security-unlock:

SG_IO: bad/missing sense data, sb[]: 70 00 ...
SG_IO: bad/missing sense data, sb[]: 70 00 ...

And binary characters are displayed along with some other messages in the terminal.
Do you know why this is happening?

@abraxa
Copy link

abraxa commented Aug 28, 2023

Facing the same issue here, though with hdparm 9.64:

# hdparm --security-unlock "$P" /dev/sdc
security_password: "�J�,9�lI����S�j&p�oF��"

/dev/sdc:
 Issuing SECURITY_UNLOCK command, password="�J�,9�lI����S�j&p�oF��", user=user
SG_IO: bad/missing sense data, sb[]:  70 00 0b 00 00 00 00 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

I wonder if it could be external USB enclosure. Or, since my T61 doesn't use a UEFI BIOS, maybe the hash function is different.

@kymodoke
Copy link

kymodoke commented Nov 7, 2023

.Got the same issue today. I know the user password but no more the master password and I wanted to remove password totally on this drive. So I've tried this "lenovo-password" tool.

But I got this error:

SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 04 51 40 01 21 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

And I found the clue here https://superuser.com/a/1213754
My disk is in a "frozen" state regarding any security change ! I'm running the tool on my Thinkpad, and it's the BIOS that freeze any disk security at boot, even if I boot from another disk. Probably because there is a master password set...

From sudo hdparm -I /dev/sdb:

Security: 
	Master password revision code = 16385
		supported
		enabled
	not	locked
		frozen
	not	expired: security count
		supported: enhanced erase
	Security level high
	6min for SECURITY ERASE UNIT. 6min for ENHANCED SECURITY ERASE UNIT.

Yeah, frozen...

What I've done to bypass that, is trying the hotplug method. Thanks to my old Thinkpad T430 I did put the disk I want to unlock into an ultrabay caddy, boot from another disk on main sata port, then inserting the ultrabay caddy after system is booted. I got some error message in dmesg, of course, but then my disk appeared as /dev/sdb. And hdparm listed it as "not frozen". then hdparm --security-unlock and hdparm --security-disable did work!


@abraxa USB enclosure cannot pass ATA commands, that's probably why you get this error. It needs a real sata port.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants