Sorry for the delay. No success using Linux to recover.
Using Native SATA port:
1) BIOS
always detects HDD correctly (name & size) after
power on.
2) Linux Kernel correctly scans ATA bus, detects disk name/partitions [its correctly reading LBA 0!)/disk size.
It says
"multi 16" (I think its 16*512 = 8K block transfers. DOES THIS OLD DRIVE supports it?). This is another PC (not the HDD original PC).
3) During Kernel booting libata issues a
BMDMA error (ATA_BMDMA in ATA spec) and from there some
more errors until sda is disabled.
4) After the system boots /dev/sda is not accessible anymore. If I try to read from it, just zero bytes, in hddsuperclone it is not listed or listed with 0 size.
5) I tried to issue Linux commands for "device delete", "scsi autodetect" and "sata hotplug" without success. Drive seems to be "dead" until power cycle. Maybe if I try a soft reset with terminal? Maybe its BUSY or maybe really "crashed" (firmware crash).
--> Tried to disable libata on ata1 during boot with kernel command line parameters. No success either.
--> Tried later with an USB converter and same results (plugged event on kernel log time=659.88).
--> Tried different sata/power cables, three different PCs, cleaned motor/sensors/connector contacts
From userspace I tried hdparm -I (ATA command IDENTIFY 0xEC sent using IOCTL to the kernelspace in HDIO_DRIVE_CMD).
Finally I wrote my own C program to send this "ask for identity" ATA command using ioctl without success.
I took note of the LBA48 addresses giving read errors and using TERMINAL I could read them!. I will document this later, but i wrote a python script that I provide an arbitrary LBA and it returns 512byte data from it.
Using this script I read the MBR, hand-decoded the two NTFS partitions and I was able to read their boot sector and from there the address of the $MFT table.
As a last resort I will write a very simple NTFS read-only implementation that uses this "serial read method" to see if I can list the files. Or maybe using network block device kit so I can use kernel ntfs driver and filter out write operations.
What are the possible causes?
- Maybe a bad RAM chip on the HDD PCI? And when processing ATA commands things go crazy?
- The BIOS of the original DELL PC lost its CMOS. It has a default "RAID" mode for SATA and I'm not sure if it was enabled while the disc was working. I have to dig deeper on this, but
can this be the case?
- I am not sure if this HDD is from that transition era of 512byte -> 4Kbytes sectors and there was a severe data loss due to incompatibility after CMOS was lost
-
Any other ideias?I took a look at DEEP SPAR and I saw it has a very clever function that resets the drive after a failed read much earlier than the drive timeout itself so "bad" sectors are "discarded" in the first pass very quickly and without torturing the drive. But
I'm not ENTIRELY sure that the BOARD is good.
I think I will buy a replacement PCB, swap "BIOS" SPI Flash and give it a try. I will also search for an older PC that I can configure in BIOS to use just PIO modes or slower DMA.
Any more guidances? Desperation here...
[ 14.888038] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[ 14.888050] ata1.00: BMDMA stat 0x24
[ 14.888056] ata1.00: failed command: READ DMA EXT
[ 14.888064] ata1.00: cmd 25/00:80:80:28:03/00:01:00:00:00/e0 tag 0 dma 196608 in
res 51/40:00:d3:29:03/40:00:00:00:00/00 Emask 0x9 (media error)
[ 14.888074] ata1.00: status: { DRDY ERR }
[ 14.888079] ata1.00: error: { UNC }
[ 15.008149] ata1.00: configured for UDMA/100
[ 15.008170] sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 15.008172] sd 0:0:0:0: [sda] tag#0 Sense Key : Medium Error [current]
[ 15.008174] sd 0:0:0:0: [sda] tag#0 Add. Sense: Unrecovered read error - auto reallocate failed
[ 15.008177] sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 03 28 80 00 01 80 00
[ 15.008179] blk_update_request: I/O error, dev sda, sector 207315 op 0x0:(READ) flags 0x80700 phys_seg 2 prio class 0
[ 15.008222] ata1: EH complete
[ 17.624045] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[ 17.624055] ata1.00: BMDMA stat 0x24
[ 17.624060] ata1.00: failed command: READ DMA EXT
[ 17.624068] ata1.00: cmd 25/00:00:00:0a:00/00:02:00:00:00/e0 tag 0 dma 262144 in
res 71/04:04:9d:00:32/04:00:00:00:00/e0 Emask 0x1 (device error)
[ 17.624078] ata1.00: status: { DRDY DF ERR }
[ 17.624083] ata1.00: error: { ABRT }
[ 17.684072] ata1.00: both IDENTIFYs aborted, assuming NODEV
[ 17.684073] ata1.00: revalidation failed (errno=-2)
[ 17.684086] ata1: hard resetting link
[ 17.684087] ata1: nv: skipping hardreset on occupied port
[ 18.156050] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 18.182188] ata1.00: both IDENTIFYs aborted, assuming NODEV
[ 18.182190] ata1.00: revalidation failed (errno=-2)
[ 23.240031] ata1: hard resetting link
[ 23.240033] ata1: nv: skipping hardreset on occupied port
[ 23.712049] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 23.776070] ata1.00: both IDENTIFYs aborted, assuming NODEV
[ 23.776072] ata1.00: revalidation failed (errno=-2)
[ 23.776080] ata1.00: disabled
- Attachments
-
hdparm-usb.txt
- hdparm -I (which issues an ioctl -> kernel -> identity ATA command)
- (755 Bytes) Downloaded 315 times
-
dmesg_usb.txt
- Kernel log with usb-sata converter
- (59.94 KiB) Downloaded 366 times
-
dmesg_native_sata.txt
- Kernel log with native sata
- (64.36 KiB) Downloaded 388 times