linux-mybook-tools icon indicating copy to clipboard operation
linux-mybook-tools copied to clipboard

Thank you! The tutorial is now 3-4 years old but still works for me in 2021 on ubuntu 20.04

Open enthuseuser opened this issue 4 years ago • 4 comments

My 7-8 years old WD MyBook with 3TB capacity started to show signs of old age in recent weeks but I chose to ignore it. The external enclosure finally failed on me couple of days ago. It used a JMicron JMS538S but it is disappointing that WD encrypts the data in the drive even though I chose not to encrypt my data with password during initial setup.

If you're using similar drive and facing the same issue as me, don't give up. The tool works.

Before you start connecting WD internal drive in your desktop, google "Shuck WD drive".

A couple of notes from me, as someone who've never compiled a kernel module before.

  • goto your linux kernel source folder, mine is /usr/src/linux-headers-5.8.0-50-generic/crypto
  • create a new folder, say rev16
  • create a new file, i use sudo nano. Copy the source code at the start of Appendix D into the file, write the file and exit
  • next the echo command to create a makefile didn't work for me. Instead, use sudo nano and copy the codes between the inverted, write the file and exit
  • next run the make command. Here I encountered a number of errors and solved it one by one by looking at the errors and install the package(s) required. I wasn't able to install ALL the pre-requisites listed in the PDF document, some of them were probably outdated already as it was for kernel 3.13. I only have some of the packages I installed along the way through trial and error, hope it'll be useful for someone out there:
  • sudo apt-get install exfat-fuse exfat-utils linux-source flex
  • There are others but I could not find it from my bash_history so you'll have to resolve the errors one by one as you run make

After I create the encryption filter and ran sudo file -sL /dev/mapper/wd, I do see DOS/MBR boot sector .... however I also see a couple of errors around partition table and whatnot. I pressed on with the entire section on mounting with a loop device and lo and behold the drive is now readable. I'm copying all my files out to a new HDD and going to look into setting up RAID as a next step.

Lastly, thanks to the creator for documenting the steps and working a solution for all of us. Kudos to you !!

enthuseuser avatar Apr 27 '21 09:04 enthuseuser

Glad it worked.

So you know, I put the module sources here on github, in the "drivers" folder.

Thanks for letting me know about the packages that you needed. If I have the time, I might download the latest Ubuntu and work through it, and update the PDF.

Would you mind sending me a copy of your keyblock, a copy of the (undecrypted) sector 0, and the manufacture date of your drive? The JMS538S chips generate their keys in a way that makes the password protection easy to bypass, but once in a while there is an anomalous drive. I can use the information from your drive for testing. Thank you.

Also, if you upload the module that you built (the .ko file), I can add it to the drivers folder as well, to possibly save someone else some time. Thanks again.

themaddoctor avatar Apr 27 '21 12:04 themaddoctor

Hi Thomas,

I’m happy share a copy with you. Which of the file is the keyblock? I ran through some of the codes not knowing exactly what I was doing. I’ll look up the manufacture date from the label and also upload the .ko file tomorrow.

Cheers.

On Tue, 27 Apr 2021 at 10:21 pm, themaddoctor @.***> wrote:

Glad it worked.

So you know, I put the module sources here on github, in the "drivers" folder.

Thanks for letting me know about the packages that you needed. If I have the time, I might download the latest Ubuntu and work through it, and update the PDF.

Would you mind sending me a copy of your keyblock, a copy of the (undecrypted) sector 0, and the manufacture date of your drive? The JMS538S chips generate their keys in a way that makes the password protection easy to bypass, but once in a while there is an anomalous drive. I can use the information from your drive for testing. Thank you.

Also, if you upload the module that you built (the .ko file), I can add it to the drivers folder as well, to possibly save someone else some time. Thanks again.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/themaddoctor/linux-mybook-tools/issues/68#issuecomment-827562495, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHVNKZ7AGESIVXOHUV3BOK3TK2T3XANCNFSM43USJOKA .

-- Best Regards, Jacky Wong

enthuseuser avatar Apr 27 '21 12:04 enthuseuser

The keyblock is the one from sector 5860528160. Thanks!

themaddoctor avatar Apr 27 '21 20:04 themaddoctor

Here you go :-)

files.zip

Manufacturing date 4 Sep 2012

enthuseuser avatar May 03 '21 06:05 enthuseuser