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
Post a reply

Re: Old Seagate ST351A/X Recovery

June 4th, 2016, 18:28

@maximus, my first thought in regard to cloning in CHS mode was your HDDSuperTool.

I had envisioned the following pseudocode:

Code:
Initialize Drive Parameters command (91h) - 6 heads, 17 sectors/track

from CYL = 0 to 818
  from HEAD = 0 to 5
   sector number = 1
   sector count = 17
   read track (17 sectors)
   append track to image file
  next HEAD
next CYL

However, your documentation doesn't appear to explain how to append data to an existing file.

Re: Old Seagate ST351A/X Recovery

June 4th, 2016, 19:21

However, your documentation doesn't appear to explain how to append data to an existing file.

That is part of why I stated that it may be easier for someone to write a shell script to do the main work and just do calls to hddsupertool using the read pio script for the reads. Hddsupertool cannot directly append one file to another, but if you look at the WRITEBUFFER command it has a file offset parameter, and an example command to write a second sector to a file. If you want to append a file to another file then use Linux shell (bash) commands, which can easily be looked up online. Plus hddsupertool can perform shell commands from within the script as needed with ‘CALLCOMMAND’ .
Code:
‘WRITEBUFFER’

    Write the buffer or part of the buffer to a file. The format is "WRITEBUFFER filename bufferoffset fileoffset size", where filename is the name of the file to write to, bufferoffset is the byte offset of the starting point in the buffer, fileoffset is the byte offset of the write point in the file, and size is the size in bytes to be written. If the file does not exist it will be created. This will overwrite the designated data in the file, but will not erase any other data in the file, meaning you can keep adding data to the file at different offsets.

    # write the first 512 bytes of the buffer to the file named image.bin
    WRITEBUFFER image.bin 0 0 512
    # write 512 bytes to the second sector of the file
    WRITEBUFFER image.bin 0 512 512

Re: Old Seagate ST351A/X Recovery

June 4th, 2016, 20:12

Thanks.

BTW, I found the following manual:

Seagate ATA Interface Reference Manual (36111-001, Rev. C, 21 May 1993):
ftp://ftp.seagate.com/acrobat/reference/111-1c.pdf

It seems to be suggesting that you shouldn't normally need to poll the status register after every word, but I can see why it would be much safer to do so.

Re: Old Seagate ST351A/X Recovery

June 4th, 2016, 20:57

It seems to be suggesting that you shouldn't normally need to poll the status register after every word, but I can see why it would be much safer to do so.

I have not read the documentation yet, but thanks for the link. I will add this to my collection.

Another thing to think about, my software only uses polling, so I tend to forget about the use of interrupts. Normal computers use the interrupts, but because my software needs to not conflict with the OS it only uses polling and does the best it can to avoid interrupts. There is not much info out there about doing things this way.
Post a reply