All times are UTC - 5 hours [ DST ]


Forum rules


Please do not post questions about data recovery cases here (use this forum instead). This forum is for topics on finding new ways to recover data. Accessing firmware, writing programs, reading bits off the platter, recovering data from dust...



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: STUart - Seagate sectors over UART driver
PostPosted: August 24th, 2016, 16:26 
Offline

Joined: August 15th, 2016, 6:05
Posts: 9
Location: Czech Republic
Hello,

While trying to recover my ST2000DL003 drive I have adapted a BUSE userspace linux block driver.

The block driver handles data as addressable blocks. The userspace client allows the addressing for any application - what about receiving blocks from a faulty Seagate drive.

How this works:

You can learn some of functioning from source code itself, but main sequence of operation is:
  • STUart (userspace driver) inicialize HDD parameters ("/TO1", speed, etc.)
  • STUart connects to NBD (network block device) driver in kernel
  • When you open /dev/nbdX at some address, the NBD driver creates demand with an offset and a block(s) size.
  • STUart compute LBA sector (4k) and number of how many is needed to read
  • By "/ARxxxx", the HDD sectors are read
  • From a drive buffer, the data are transfered over UART by "/FD" command. As console is in a binary mode the sectors are transfered at full UART speed.
  • STUart then parses raw 4k sector data (512B subsector + 2 crc? + 6 thrash? + 512B subsector + 2 crc + 6 thrash ...) into 512B block request
  • ... and sends them to the kernel driver and waits on another request
Funny thing about STUart is you can actually mount /dev/nbdX as HDD and copy some data from it (very slowly, but most likely safer than "/Ti" and/or "/Tm" commands) and mounting is faster than whole drive imaging (it would take about half a year to download whole 2 TB :-/ in my case the drive was partitioned to 4 partitions and only 2 of them are filled with data - around 26%).

Due to a block based adressing you can just skip any bad sectors and continue to copy the data (although you must do it manually as STUart will crash probably). Download speed is pretty slow - about 34kBps of the filesystem with 460kbps UART. My drive supports up to 1.25 Mbps so maximum speed is probably nearly 100kBps. Up to this date it have worked with only one data retrieval failure (probably UART buffer overrun) and transfer run for several hours.

I'm pretty sure that there are similar functionalities in commercial software, but I'm offering you a GPLed source code (as is). If someone wants to maintain this software, I'm OK with it (after recovering all my files I hope I will never need to use it again ;-) ).

If you find my driver useful, you can help me with my drive http://forum.hddguru.com/viewtopic.php?f=1&t=34001 or you can send me some bitcoins ;-)

1HrSeYBcScVunpw6uKWk6Xo81LBZy3ARYo


Attachments:
File comment: Seagate UART linux block driver
stuart-0.1.tar.bz2 [13.57 KiB]
Downloaded 122 times
Top
 Profile  
 
 Post subject: Re: STUart - Seagate sectors over UART driver
PostPosted: August 24th, 2016, 19:14 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 9302
Location: Australia
Thanks.

You can change the baud rate in two ways.

At level T you can specify the baud rate and delay in msec for the host to respond with a carriage return.

    B[rate in decimal], [delay in msec]

The same command at level F is ...

    b[rate in decimal], [delay in msec]

Note the difference in case.

If you specify an unsupported rate, then you will get a list of supported rates.

The delay parameter is optional.

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: STUart - Seagate sectors over UART driver
PostPosted: August 25th, 2016, 13:07 
Offline

Joined: August 15th, 2016, 6:05
Posts: 9
Location: Czech Republic
I know, but my UART dongle supports only max speed of ~400 kbps and you cannot guess which baudrate is actually set in congen.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group