linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: harddisk suddenly locked?!
  2001-07-31 11:00 harddisk suddenly locked?! Thomas Tanner
@ 2001-07-29 20:58 ` Alan Cox
  2001-08-02 20:57   ` Dan Hollis
  2001-08-01  0:05 ` Guest section DW
  1 sibling, 1 reply; 5+ messages in thread
From: Alan Cox @ 2001-07-29 20:58 UTC (permalink / raw)
  To: Thomas Tanner; +Cc: linux-kernel

>  A locked drive rejects all media access commands.
>  When a new master password is set, the drive won't be locked.
>  Setting a new user password locks the drive the next time it is powered-on.
> 
>  Something must have sent a lock command to my hd. Maybe a bug in the IDE
> code?

Or someone broke into the box and did it. In fact given this feature
is actually enabled on ibm disks Im amazed the windows viruses havent
all started doing it


^ permalink raw reply	[flat|nested] 5+ messages in thread

* harddisk suddenly locked?!
@ 2001-07-31 11:00 Thomas Tanner
  2001-07-29 20:58 ` Alan Cox
  2001-08-01  0:05 ` Guest section DW
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Tanner @ 2001-07-31 11:00 UTC (permalink / raw)
  To: linux-kernel

Please help me! I'm desperate

 I can't access the data on my harddrive any longer ;-((

 The IBM Disk Fitness Test tool tells me:
   Model                   : IBM-DJNA-372200
   Microcode level         : J71OA30K
   ATA Compliance          : ATA-4
  ...
   Settings
  ...
     S.M.A.R.T. status     : Good
     Security feature      : Supported
       Password            : Set
       Password level      : High
       Security mode       : Locked

 However, I haven't set any password. I don't even know how to set it!!
 My system is (was) Linux 2.4.7 with PIIX support and "SCSI over IDE"
enabled,
 experimental IDE code disabled.
 After booting the system and leaving it one hour alone (idle, no internet
connection)
 I wanted to start XWindows (4.01). However, it switched the video mode and
suddenly
 locked up for ~10 sec. I pressed Ctrl-Alt-Backspace/Del several times to
reboot.
 After some seconds it responded and seemed to shut down as usual.
 Since then the hd is locked and I don't know why.

 According to the ATA-3 specification there are two passwords: a master and
a user password.
 The passwords are stored in the EPROM of the hd and are certainly very very
hard to remove.
 A locked drive rejects all media access commands.
 When a new master password is set, the drive won't be locked.
 Setting a new user password locks the drive the next time it is powered-on.
 A drive can be unlocked by one of the two passwords.
 IBM sets the master password to all ASCII blanks (0x20) during
 manufacturing.

 To unlock a drive one has to send the command SECURITY UNLOCK (0xBB)
 and transfer a single sector to the drive:
 Word
 0     Bit 0 Identifier: 0=compare user password, 0=compare master password
 1-16  Password (32 Bytes)
 17-255 reserved

 Word 128 of the Identify Drive command contains the Security status:
 Bit
 8 : Security level  0=High (can be unlocked), 1=Maximum (disk must be
erased)
 4 : 1=Security count expired (more than five failed unlock tries,
hard-reset necessary)
 3 : 1=Security frozen (all security commands aborted)
 2 : 1=Security locked (media access not allowed)
 1 : 1=Security enabled
 0 : 1=Security supported

 Something must have sent a lock command to my hd. Maybe a bug in the IDE
code?
 I hope to be able to unlock my drive using the default master password.
 My question is: how can I send the unlock command to the hd?
 Is there any program that can do it?
 AFAICS one can send only the command code using a HDIO_DRIVE_CMD ioctl.
 But how can I transfer the password?

 Any ideas?

 Thank you very much in advance!

PS: please CC to me

Thomas Tanner-------------------
tanner@(ffii.org|gnu.org|gmx.de)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: harddisk suddenly locked?!
  2001-07-31 11:00 harddisk suddenly locked?! Thomas Tanner
  2001-07-29 20:58 ` Alan Cox
@ 2001-08-01  0:05 ` Guest section DW
  1 sibling, 0 replies; 5+ messages in thread
From: Guest section DW @ 2001-08-01  0:05 UTC (permalink / raw)
  To: Thomas Tanner, linux-kernel

On Tue, Jul 31, 2001 at 01:00:07PM +0200, Thomas Tanner wrote:

>  I can't access the data on my harddrive any longer ;-((
> 
>  The IBM Disk Fitness Test tool tells me:
>    Model                   : IBM-DJNA-372200
>    Microcode level         : J71OA30K
>    ATA Compliance          : ATA-4
>      Security feature      : Supported
>        Password            : Set
>        Password level      : High
>        Security mode       : Locked
> 
>  However, I haven't set any password. I don't even know how to set it!!
>  My system is (was) Linux 2.4.7 with PIIX support and "SCSI over IDE"
> enabled,
>  I wanted to start XWindows (4.01). However, it switched the video mode and
> suddenly locked up for ~10 sec. I pressed Ctrl-Alt-Backspace/Del
>  After some seconds it responded and seemed to shut down as usual.
>  Since then the hd is locked and I don't know why.

Better shield your monitor?

>  According to the ATA-3 specification

ATA-4 is also online.

>  To unlock a drive one has to send the command SECURITY UNLOCK (0xBB)
>  and transfer a single sector to the drive:

Maybe someone has already done it. Otherwise you'll have to play a little
with the code. It is easy. You could try to take setmax and hdparm as example
and add an ioctl that combines HDIO_DRIVE_TASK and HDIO_DRIVE_CMD.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: harddisk suddenly locked?!
  2001-07-29 20:58 ` Alan Cox
@ 2001-08-02 20:57   ` Dan Hollis
  2001-08-02 21:09     ` Alan Cox
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Hollis @ 2001-08-02 20:57 UTC (permalink / raw)
  To: Alan Cox; +Cc: Thomas Tanner, linux-kernel

On Sun, 29 Jul 2001, Alan Cox wrote:
> Or someone broke into the box and did it. In fact given this feature
> is actually enabled on ibm disks Im amazed the windows viruses havent
> all started doing it

Destroying the bios is a bit more straightforward and certainly more
universal.

-Dan

-- 
[-] Omae no subete no kichi wa ore no mono da. [-]


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: harddisk suddenly locked?!
  2001-08-02 20:57   ` Dan Hollis
@ 2001-08-02 21:09     ` Alan Cox
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Cox @ 2001-08-02 21:09 UTC (permalink / raw)
  To: Dan Hollis; +Cc: Alan Cox, Thomas Tanner, linux-kernel

> On Sun, 29 Jul 2001, Alan Cox wrote:
> > Or someone broke into the box and did it. In fact given this feature
> > is actually enabled on ibm disks Im amazed the windows viruses havent
> > all started doing it
> 
> Destroying the bios is a bit more straightforward and certainly more
> universal.

And a lot less damaging. Its "Oh dear put the disk in aother box and
disinfect" not "oh god, all our web server data is lost"

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-08-02 21:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-31 11:00 harddisk suddenly locked?! Thomas Tanner
2001-07-29 20:58 ` Alan Cox
2001-08-02 20:57   ` Dan Hollis
2001-08-02 21:09     ` Alan Cox
2001-08-01  0:05 ` Guest section DW

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).