Quantcast
Channel: Complitly debricking guide (draft)
Viewing all articles
Browse latest Browse all 58

Re: Complitly debricking guide (draft)

$
0
0

First off, let me thank EVERYONE who's helped in this forum, it's been a huge help to me.
While I was playing with my shiny new MBL, I partially bricked it and decided to do a full factory restore (I had already backed up my data). While I was in the UI I got desperate and unplugged my MBL believing it was done, but I was fooled: the red LED isn't working, so I couldn't see the white light! Needless to say, the device was now fully bricked.

It's been a long and torturous week, but I've finally managed to debrick it, and it's all been possible thanks to this thread.

I can say that it does work, but with a few modifications. I'll explain them here, in hope that somebody new to this won't spend so much time fixing their MBL as I did.
Before this (and while you do it too, if you want to), you have to download a firmware from WD. Just google it (Firmware My Book Live), and it should appear there.
All of this was done with the hard drive plugged into a PC running Ubuntu 11.04:

1. Create the three .sh that are in the GP, as well as swap.c .

2. Change the sh files to executable:

  chmod +x freshInstall.sh chmod +x partitionDisk.sh chmod +x disk-param.sh 

3. Find out the name of your disk as it was detected by Ubuntu (in my case, it was /dev/sdb).

4. Modify partitionDisk.sh:
change the path of /path/to/disk-param.sh to its actual path (i.e. /home/_your-user-name/). If it's in the same folder as freshInstall.sh and disk-param.sh, you can just leave it as ./disk-param.sh

5. Modify disk-param.sh:
change the name of your disk (if needed) to the one in your system (the one you found in step 3)

6. Modify freshInstall.sh:
a. change the path of disk-param.sh again, just as you did in step 4 for partitionDisk.sh
b. change the line:

 mdadm --create ${rootfsDevice} --verbose --raid-devices=2 --level=raid1 --run ${rootfsDisk1} missing 

to:
 mdadm --create ${rootfsDevice} --verbose --metadata=0.9 --raid-devices=2 --level=raid1 --run ${rootfsDisk1} missing 

(thank you, seeARMS!)
NOTE: this step is only necessary in some distros. I had to do it because mdadm in ubuntu 11.04 had the problem described by seeARMS.

c. Run freshInstall.sh:

 ./freshInstall.sh 

d. If the script prompts you to accept something (I don't remember well, but it was something about the block size of partition 4 being too large), just say yes.

7. After the script stops, extract the firmware file you downloaded from WD:

 ar x apnc-010303-20110119.deb 

8. extract the file in which the image comes

 tar --lzma -xvf data.tar.lzma 

9. navigate to the folder in which rootfs.img is located

10. Copy the image to your hard drive

 dd if=rootfs.img of=/dev/md0 bs=1M 

11. When dd is done, mount your filesystem
 mkdir /mnt/rootfs mount /dev/md0 /mnt/rootfs 

12. Copy the boot file to its folder

 cp /mnt/rootfs/usr/local/share/bootmd0.scr /mnt/rootfs/boot/boot.scr 

13. Enable ssh

 echo "enabled" > /mnt/rootfs/etc/nas/service_startup/ssh 

14. Sync and unmount:

 sync umount /mnt/rootfs 

15. Compile swap.c

 gcc swap.c -o swap 

16. Modify the endianness of the boot partitions

 mdadm —stop /dev/md0 ./swap /dev/sdb1 ./swap /dev/sdb2 

And it's done! unplug your hard drive from your PC and plug it into your MBL. Device is fully debricked by now.

I want to make very clear that I've only done a compilation of all the steps I needed to take with my particular recovery, hoping that it helps the unexperienced (as me) get the job done in less time.
I'm very grateful to everybody who made my recovery possible (megadoz, tomas123, bourgeoa, seeARMS) and who are actually responsible for my successful experience.


Viewing all articles
Browse latest Browse all 58