Data recovery and disk repair questions and discussions related to old-fashioned SATA, SAS, SCSI, IDE, MFM hard drives - any type of storage device that has moving parts
October 2nd, 2011, 17:53
I am using HDPARM to flag a sector as bad(for testing purposes). Is there any way to recover the data on that sector?
I know write uncorrectable just garbles the ecc for the sector to flag it as bad. HDPARM has a repair sector command but it writes 0's to fix it and I want to recover the data.
If anyone knows a better way to simply flag and unflag a good sector as bad on the hardware level I'd love to hear it.
October 2nd, 2011, 18:48
What is your end goal, to recover data from a sector which you have intentionally corrupted the ECC data for? Why not read the sector before you change it?
October 2nd, 2011, 20:23
The end goal is to recover data from a sector I have intentionally made bad, yes.
October 3rd, 2011, 1:57
The idea is to 'hide' data behind a normally unreadable sector ...
October 3rd, 2011, 8:14
Well, you can use Read Long, but then obviously without the ECC data you have no way of knowing if it was read correctly or not.
October 5th, 2011, 4:52
AIUI, Read Long and Write Long were retired from the standard in ATA-4, so it could be that the OP's drive may not respond to these commands. In any case, I believe they were restricted to 28-bit LBA mode.
Moreover, the documentation for the WRITE UNCORRECTABLE EXT command doesn't specify how a particular sector is to be rendered uncorrectable, so it may not simply be a case of manipulating the ECC bytes. The standard also does not provide for simply "unflagging" the affected sector. Instead it appears that data must be written to it.
"If the host writes to a pseudo uncorrectable or flagged uncorrectable sector, the device shall attempt to write the data to the sector. The write shall clear the uncorrectable status of the sector and should verify that the sector may now be read without error."
Working Draft AT Attachment 8 - ATA/ATAPI Command Set (ATA8-ACS):
http://www.t13.org/documents/UploadedDo ... A8-ACS.pdf
October 6th, 2011, 19:47
Thats what I was afraid of. There is no way to unflag a write uncorrectable command.
October 6th, 2011, 20:31
Would it possible to instead of sending an ATA command to instead use a hex editor or something to change the header of the sector itself?
October 6th, 2011, 20:54
AIUI, the drive does not expose a sector's ECC bytes to the outside world. But I could be wrong ...
Powered by phpBB © phpBB Group.