James Harris
2020-02-27 11:49:04 UTC
A few comments and queries on the ATA IDENTIFY command.
This issue came up because my PC locked up and wouldn't reboot. On
putting the PC's (SATA) disk in a server the Linux kernel said, among
other things,
both IDENTIFYs aborted
That raises a few questions. I see that there is an IDENTIFY DEVICE
command 0xEC and I know it returns 512 bytes of data about the disk. But
what's the other IDENTIFY?
Could it be that:
* Linux tried the command twice
* Linux tried the IDENTIFY PACKET DEVICE command 0xA1
* there's some way to tell the disk to look for a backup IDENTIFY sector
or something else?
Interestingly, from what I have read I gather that the disk is likely to
have stored the IDENTIFY data in hidden sectors - indicating that
there's a part of the disk that I presume is completely inaccessible to
an OS by any other mechanism.
Do you think there's any way I could read the disk - even just as a
block device - if it does not even know its own IDENTIFY data? Could I,
for example, substitute the IDENTIFY data for an identical or similar disk?
Much as I'd like to get the data back perhaps the most interesting
question is what an OS ought to do when it cannot read IDENTIFY data
from a disk but maybe can read normal sectors. (The OS may not be able
to use the disk normally but rather than giving up altogether I am
thinking that perhaps the OS could make it easier for someone to do data
recovery.) What do you think?
This issue came up because my PC locked up and wouldn't reboot. On
putting the PC's (SATA) disk in a server the Linux kernel said, among
other things,
both IDENTIFYs aborted
That raises a few questions. I see that there is an IDENTIFY DEVICE
command 0xEC and I know it returns 512 bytes of data about the disk. But
what's the other IDENTIFY?
Could it be that:
* Linux tried the command twice
* Linux tried the IDENTIFY PACKET DEVICE command 0xA1
* there's some way to tell the disk to look for a backup IDENTIFY sector
or something else?
Interestingly, from what I have read I gather that the disk is likely to
have stored the IDENTIFY data in hidden sectors - indicating that
there's a part of the disk that I presume is completely inaccessible to
an OS by any other mechanism.
Do you think there's any way I could read the disk - even just as a
block device - if it does not even know its own IDENTIFY data? Could I,
for example, substitute the IDENTIFY data for an identical or similar disk?
Much as I'd like to get the data back perhaps the most interesting
question is what an OS ought to do when it cannot read IDENTIFY data
from a disk but maybe can read normal sectors. (The OS may not be able
to use the disk normally but rather than giving up altogether I am
thinking that perhaps the OS could make it easier for someone to do data
recovery.) What do you think?
--
James Harris
James Harris