All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 29 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: hard drive reads in short bursts
PostPosted: August 16th, 2014, 12:41 
Offline

Joined: August 2nd, 2014, 15:13
Posts: 18
We moved to private messages for various reasons but i am proud to say fzabkar helped me fix my drive by updating modules 02 and 32 with an MHDD script.

Firstly let me state that the change at 0x0C i didn't recognize was the module checksum:
Analysis of Western Digital ROYL firmware MOD 02:
http://malthus.zapto.org/viewtopic.php?f=59&t=821

I then got my feet wet by reading up on MHDD scripting:
Using MHDD to send Vendor Specific Commands (VSC) to a WD drive:
http://malthus.zapto.org/viewtopic.php?t=987&p=4308

After i felt comfortable i proceeded with this script fzabkar kindly made for me:
Code:
; VSC enable

reset
waitnbsy
regs = $45 $0b $00 $44 $57 $a0 $80
waitnbsy

; write 00h to section 0x1b at offset 02h in SA module 02

regs = $d6 $01 $be $4f $c2 $a0 $b0
waitnbsy
checkdrq
sectorsfrom = wrt_021b.bin
waitnbsy
regs = $d6 $01 $bf $4f $c2 $a0 $b0
waitnbsy
checkdrq
sectorsfrom = wd_021b.bin

; write 3Ch sectors to SA module 32

waitnbsy
regs = $d6 $01 $be $4f $c2 $a0 $b0
waitnbsy
checkdrq
sectorsfrom = wrt_32.bin
waitnbsy
regs = $d6 $3c $bf $4f $c2 $a0 $b0
waitnbsy
checkdrq
sectorsfrom = wd_32clr.bin


Binary file wrt_32.bin, wrt_021b.bin and wd_021b.bin were made with a hex editor(HxD). Below are the key sectors that need to be in the bin files if you want to make them yourself but i'll also attach all the files to this post. All files should have 512 bytes in them. You can try out one of HxD's features: Edit->Insert bytes...

wrt_32.bin (512 bytes) plus zero padding (the rest 496 bytes = 0x00);
Code:
0x0000 08 00 02 00 32 00 00 00 00 00 00 00 00 00 00 00


wrt_021b.bin (512 bytes) plus zero padding (the rest 496 bytes = 0x00);
Code:
0x0000 2a 00 02 00 02 00 1b 00 02 00 01 00 00 00 00 00


wd_021b.bin (512 bytes)
Code:
512 bytes of zeros


The file wd_32clr.bin is the modified MOD 32 (cleared relo-list) which fzabkar attached earlier above but i will include in attachment also for convenience. Please note that if the bin files are not filled with the 512 bytes the script will fail. The four files above should be in the same directory as MHDD.exe. The script should be in a subfolder called scripts(eg. SCRIPTS\SLOFIX).

Here is a sample log from running the script successfully:
Code:
MHDD>.SLOFIX
16.08.2014   9:50:08   MHDD ATA/SCSI TERMINAL v2.1
16.08.2014   9:50:08   Script: SLOFIX
16.08.2014   9:50:08   LINE 1: RESET
16.08.2014   9:50:08   LINE 2: WAITNBSY
16.08.2014   9:50:08   LINE 3: REGS = $45 $0B $00 $44 $57 $A0 $80
16.08.2014   9:50:08   LINE 4: WAITNBSY
16.08.2014   9:50:08   LINE 5: REGS = $D6 $01 $BE $4F $C2 $A0 $B0
16.08.2014   9:50:08   LINE 6: WAITNBSY
16.08.2014   9:50:08   LINE 7: CHECKDRQ
16.08.2014   9:50:08   LINE 8: SECTORSFROM = WRT_021B.BIN
16.08.2014   9:50:08   LINE 9: WAITNBSY
16.08.2014   9:50:08   LINE 10: REGS = $D6 $01 $BF $4F $C2 $A0 $B0
16.08.2014   9:50:08   LINE 11: WAITNBSY
16.08.2014   9:50:08   LINE 12: CHECKDRQ
16.08.2014   9:50:08   LINE 13: SECTORSFROM = WD_021B.BIN
16.08.2014   9:50:08   LINE 14: WAITNBSY
16.08.2014   9:50:08   LINE 15: REGS = $D6 $01 $BE $4F $C2 $A0 $B0
16.08.2014   9:50:08   LINE 16: WAITNBSY
16.08.2014   9:50:08   LINE 17: CHECKDRQ
16.08.2014   9:50:08   LINE 18: SECTORSFROM = WRT_32.BIN
16.08.2014   9:50:08   LINE 19: WAITNBSY
16.08.2014   9:50:08   LINE 20: REGS = $D6 $3C $BF $4F $C2 $A0 $B0
16.08.2014   9:50:08   LINE 21: WAITNBSY
16.08.2014   9:50:08   LINE 22: CHECKDRQ
16.08.2014   9:50:08   LINE 23: SECTORSFROM = WD_32CLR.BIN
16.08.2014   9:50:09   All done.

Before and after bin files will also be in attachment.

Thank you fzabkar and michael chiklis for all your help. I have definitely learned a lot.


Attachments:
slowfix.zip [9.93 KiB]
Downloaded 404 times
Top
 Profile  
 
 Post subject: Re: hard drive reads in short bursts
PostPosted: August 16th, 2014, 15:06 
Offline

Joined: December 5th, 2011, 5:38
Posts: 1120
Location: Italy
Well done Volks, happy that you got your data again :D
Backup all data you need on a second drive or even on third one.


Top
 Profile  
 
 Post subject: Re: hard drive reads in short bursts
PostPosted: August 16th, 2014, 19:43 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 10355
Location: Australia
Please be aware that the section of code that writes MOD 32 needs to be adapted to suit one's own drive. This is because the size of MOD 32 is not the same for all models.

Specifically, one would need to modify the second hexadecimal number in the "regs = $d6 $3c ..." line to reflect the size of MOD 32 expressed in sectors. Offsets 0Ah - 0Bh contain the module's size in little-endian format.

Code:
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  52 4F 59 4C 01 00 30 00 32 00 3C 00 D4 E4 6A 59  ROYL............

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: hard drive reads in short bursts
PostPosted: August 16th, 2014, 21:16 
Offline

Joined: August 2nd, 2014, 15:13
Posts: 18
fzabkar wrote:
Please be aware that the section of code that writes MOD 32 needs to be adapted to suit one's own drive. This is because the size of MOD 32 is not the same for all models.

Specifically, one would need to modify the second hexadecimal number in the "regs = $d6 $3c ..." line to reflect the size of MOD 32 expressed in sectors. Offsets 0Ah - 0Bh contain the module's size in little-endian format.

Code:
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  52 4F 59 4C 01 00 30 00 32 00 3C 00 D4 E4 6A 59  ROYL............

Is there anyway the MHDD script can check module size(0Ah - 0Bh) of module 32 and update the CNT register on the fly? Or if you are up to it, you can update wd32clr2.bas to spit out a script with the correct size to go along with wd_32clr.bin.

Also to anyone trying this script please use YOUR wd_32clr.bin not mine, i only included it for convenience. You can generate one with wd32clr2.exe.


Top
 Profile  
 
 Post subject: Re: hard drive reads in short bursts
PostPosted: August 17th, 2014, 18:36 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 10355
Location: Australia
MHDD's scripting language is fairly rudimentary. I don't believe it's possible to do what you suggest.

MHDD TERMINAL: Sample scripting batch and documentation:
http://webcache.googleusercontent.com/s ... RIPTS/TEST

I have attached an updated program that reports the size of MOD 32.


Attachments:
wd32clr2.7z [77.3 KiB]
Downloaded 294 times

_________________
A backup a day keeps DR away.
Top
 Profile  
 
 Post subject: Re: hard drive reads in short bursts
PostPosted: August 17th, 2014, 19:42 
Offline
User avatar

Joined: December 4th, 2012, 1:35
Posts: 3094
Location: Adelaide, Australia
You could probably write a Python script to output a script suitable for MHDD.

Good work guys, and thanks for writing it up after you had your success.


Top
 Profile  
 
 Post subject: Re: hard drive reads in short bursts
PostPosted: April 22nd, 2018, 16:06 
Offline

Banned User

Joined: April 22nd, 2018, 16:04
Posts: 1
Location: united state
Hello,

I have a peculiar problem. My hard drive is being accessed in short bursts every second - EXACTLY every second. I can hear my wall clock tick, and the ticks com.


Top
 Profile  
 
 Post subject: Re: hard drive reads in short bursts
PostPosted: April 22nd, 2018, 16:21 
Online

Joined: October 16th, 2013, 13:21
Posts: 574
Location: Brazil
@kavin441, you should start your own thread, not hijack this from four years past.

As for your problem, you should clone your drive to other while it is still working, before trying anything. More so if the drive belongs to a customer.

If you cannot do the clone, or cannot send the drive to a professional, then you may risk running the slow fix discussed in a lot of threads in this forum. Remember that doing something wrong with modules in your drive can render the data inacessible and make the recovery very much costlier or even impossible.


Top
 Profile  
 
 Post subject: Re: hard drive reads in short bursts
PostPosted: April 22nd, 2018, 16:23 
Offline
User avatar

Joined: December 19th, 2006, 8:49
Posts: 9053
Location: Portugal
kavin441 wrote:
Hello,

I have a peculiar problem. My hard drive is being accessed in short bursts every second - EXACTLY every second. I can hear my wall clock tick, and the ticks com.


Please start by posting the FULL model of the drive !!!

It's a WD one ?

Can you post a S.M.A.R.T. screen capture obtained with something like MHDD or Victoria ?

Does the drive have current pending sectors ?

I wouldn't attempt to clone/image the drive in this state. I would attempt to patch firmware in order to make cloning/imaging safer if possible at all.

_________________
1Q9xrDTzTddUXeJAFRn37aqh1Yr6buDCdw - (Bitcoin Donations)
paypal.me/Spildit - (PayPal Donations)
The HDD Oracle - Platform for OPEN research on Data Recovery.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 18 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