All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 33 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 935 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: 1626
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.

_________________
My firmware database:
https://mega.nz/folder/O01DkBRI#MxP2J6ZNqXDcrX40I8MoQQ


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: 15462
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: 15462
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 755 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: 3844
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 
Offline

Joined: October 16th, 2013, 13:21
Posts: 713
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: January 22nd, 2019, 16:47 
Offline
User avatar

Joined: November 25th, 2018, 16:03
Posts: 48
Location: Portugal
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............



for each model WDdrive need edit MOD 32?"regs = $d6 $3c .. ??

can any one do script for me? WD2500BEVT 250GB

i get it erro on script from Volks...
ERROR: NO DRQ
https://imgur.com/a/fDRL4vS

:wink:


Top
 Profile  
 
 Post subject: Re: hard drive reads in short bursts
PostPosted: January 22nd, 2019, 18:48 
Offline
User avatar

Joined: November 25th, 2018, 16:03
Posts: 48
Location: Portugal
There is a strange problem with the drive. Smart is good but bad sectors not clean on DBAN,,MHDD,,victoria
I already read,,clear and write mod3 relolist and fit 00 00 ,,

I followed this tutorial. WD - Fixing the "Slow Issue" manually :

please any check my pictures,, what is wrong ..

https://imgur.com/a/DKdLcCi
https://imgur.com/a/W7ZJaA4
https://imgur.com/a/oWYZ8ER
https://imgur.com/a/cQXYcv2
https://imgur.com/a/R9KPB8p

THANK


Top
 Profile  
 
 Post subject: Re: hard drive reads in short bursts
PostPosted: January 22nd, 2019, 18:53 
Offline
User avatar

Joined: November 25th, 2018, 16:03
Posts: 48
Location: Portugal
yes I followed this tutorial. WD - Fixing the "Slow Issue" manually :

but my module is different from your tutorial
and i no know where start fit 00 00 00 00
and i im using the WDR ,, may i need try WDmarvel but is same result ...

can check edit to me my modules 2 and 32 pleaase to me write here or my problem is other on smart bad sector?

Attachment:
mod2and32.rar [1.19 KiB]
Downloaded 399 times


Top
 Profile  
 
 Post subject: Re: hard drive reads in short bursts
PostPosted: January 23rd, 2019, 7:16 
Offline
User avatar

Joined: November 25th, 2018, 16:03
Posts: 48
Location: Portugal
fzabkar wrote:
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.



how to run it?



yes thank i folow all they tutorial on secure erase ,,
and also on SEDIV i able to clear o password, clear smart and Plist ,, but no solve, bad sectors comeback ...

theses two archives wd32clr2.bas wd32clr2.exe means to run on script mhdd? or need open on HxD to edit it?

sorry i dont undestand what to do on it 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............

it code to put on scrip on line-19 REGS = $d6 $3c ???


Top
 Profile  
 
 Post subject: Re: hard drive reads in short bursts
PostPosted: January 23rd, 2019, 9:41 
Offline
User avatar

Joined: November 25th, 2018, 16:03
Posts: 48
Location: Portugal
here is original backup modules 02 and 32 can you fix it to me write here?
at mod2 no have 4F 44 44 portion of the data to the 01 00 28 64 to fit 00 ... then i no know where start it ...

Attachment:
~id0002~id00032.rar [903 Bytes]
Downloaded 410 times


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

All times are UTC - 5 hours [ DST ]


Who is online

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