[GUIDE] How to unbrick a totally dead MBL

rhartinger wrote:

The Test passes without an error. The HDD is ok. 

Did you by chance use a USB-2-Sata cable? I know it has caused issues for others where the drive would not boot if you debricked using one of those cables. I am really baffled otherwise and don’t know what else we could try.

@NFODIZ

Ok, tried it with keeping the data, no change same result as before, device not booting. Precedure went ok.

Second try with destroy all data. First deleted all partitions to one big unallocated drive.  

Then started the procedure again but I get several errors, see below :

root@sysresccd /root %  mkdir /mnt/usb

root@sysresccd /root % mount -t vfat /dev/sda1 /mnt/usb

root@sysresccd /root % cd /mnt/usb

root@sysresccd /mnt/usb % mdadm-S /dev/md0

zsh: command not found: mdadm-S

root@sysresccd /mnt/usb % mdadm -S /dev/md0

mdadm: stopped /dev/md0

root@sysresccd /mnt/usb % ./debrick.sh rootfs.img /dev/sde destroy

 

**********************DISK          **********************

 

script will use the following disk:

 

Model: ATA WDC WD20EARX-00P (scsi)

Disk /dev/sde: 2000GB

Sector size (logical/physical): 512B/4096B

Partition Table: gpt

Disk Flags:

 

Number  Start  End  Size  File system  Name  Flags

 

is this REALLY the disk you want? [y] y

 

**********************IMAGE         **********************

 

 

IMPLEMENTATION

 

everything is now prepared!

device:       /dev/sde

image_img:    rootfs.img

destroy:      true

 

this is the point of no return, continue? [y] y

 

dd: writing ‘/dev/sde1’: No space left on device

11+0 records in

10+0 records out

10485760 bytes (10 MB) copied, 0.0180326 s, 581 MB/s

dd: writing ‘/dev/sde2’: No space left on device

1+0 records in

0+0 records out

0 bytes (0 B) copied, 0.00125738 s, 0.0 kB/s

dd: writing ‘/dev/sde3’: No space left on device

1+0 records in

0+0 records out

0 bytes (0 B) copied, 0.00121124 s, 0.0 kB/s

dd: writing ‘/dev/sde4’: No space left on device

1+0 records in

0+0 records out

0 bytes (0 B) copied, 0.00119676 s, 0.0 kB/s

Testing with pattern 0x00: done                                                

Reading and comparing: done                                                

GNU Parted 3.1

Using /dev/sde

Welcome to GNU Parted! Type ‘help’ to view a list of commands.

(parted) mklabel gpt                                                     

(parted) mkpart primary 528M  2576M                                      

(parted) mkpart primary 2576M 4624M                                       

(parted) mkpart primary 16M 528M                                         

(parted) mkpart primary 4624M -1M                                        

(parted) set 1 raid on                                                   

(parted) set 2 raid on                                                    

(parted) quit                                                            

Information: You may need to update /etc/fstab.

 

Warning: blocksize 65536 not usable on most systems.                     

mke2fs 1.42.8 (20-Jun-2013)

/dev/sde4 is not a block special device.

Proceed anyway? (y,n) y

mkfs.ext4: Device size reported to be zero.  Invalid partition specified, or

                partition table wasn’t reread after running fdisk, due to

                a modified partition being busy and in use.  You may need to reboot

                to re-read your partition table.

 

 

destroying was done, would you like to continue with installation? [y] y

 

mdadm: /dev/sde1 is not a block device

mdadm: Cannot find /dev/md0: No such file or directory

mke2fs 1.42.8 (20-Jun-2013)

Could not stat /dev/md0 — No such file or directory

 

The device apparently does not exist; did you specify it correctly?

mdadm: error opening /dev/md0: No such file or directory

 

synchronize raid… mdadm: Cannot find /dev/md0: No such file or directory

done

 

copying image to disk…

dd: writing to ‘/dev/md0’: No space left on device

1+0 records in

0+0 records out

0 bytes (0 B) copied, 0.00164466 s, 0.0 kB/s

mount: /dev/md0 is not a block device (maybe try `-o loop’?)

cp: cannot stat ‘/mnt/md0/usr/local/share/bootmd0.scr’: No such file or directory

./debrick.sh: line 359: /mnt/md0/etc/nas/service_startup/ssh: No such file or directory

umount: /mnt/md0: not mounted

mdadm: /dev/md0 does not appear to be an md device

BLKGETSIZE: Inappropriate ioctl for device

BLKGETSIZE: Inappropriate ioctl for device

 

all done! device should be debricked!

 

root@sysresccd /mnt/usb %

 

Any suggestions before I send it back to WD ?

regards,

@grovers, try formatting the drive as one big NTFS partition and then try running the script again with the destroy flag

Also when you deleted the partitions did you use gparted on the system rescue cd? Sometimes after you make changes using that you have to shutdown and reboot into system rescue cd again. I think I have hit that issue before

@nfodiz

Funny, as I format the drive to one big partition, unallocated, and I use the dbrick script, i get all the errors but my drive is again partitioned exactly the way as before with even my data available again ?

Same result as make a formatted NTFS partition…, strange.

I have a MBL duo which cannot boot up and I am trying follow your guidance to fix it.

I used mdadm 3.2.5 and created a array with metadata=0.90, and clone the rootfs.img to the array,

and run mdadm --examine xxx xxx xxx xxx to ensure the metadata version and magic number, all thing seems ok.

Then I connect it to my PC via URAT on the board of MBL duo and execute u-boot command:

sata init; ext2load sata 1:1 100000 /usr/local/share/bootmd0.scr; source

Finally I got some error message below, what can I do next?

PS: I am very sure the metadata version on each part is 0.90, and have not changed the original infomation of partitions via gdisk or fdisk. why cannot be auto detected?

and I remembered that first time I connect HDDs to my PC, the rootfs (md0) cannot be detected automatically, but DataVolume can be auto detected as /dev/md126… may be something special in the superblock of md0?

I use a very old development board to connet MBL duo.

----- Message -----

 sdb1 sdb2 sdb3 sdb4
 sda1 sda2 sda3 sda4
sd 0:0:0:0: [sda] Attached SCSI disk
sd 1:0:0:0: [sdb] Attached SCSI disk
md: Waiting for all devices to be available before autodetect
md: If you don’t use raid, use raid=noautodetect
md: Autodetecting RAID arrays.
md: invalid raid superblock magic on sdb1
md: sdb1 does not have a valid v0.90 superblock, not importing!
md: invalid raid superblock magic on sdb2
md: sdb2 does not have a valid v0.90 superblock, not importing!
md: invalid raid superblock magic on sdb3
md: sdb3 does not have a valid v0.90 superblock, not importing!
md: invalid raid superblock magic on sdb4
md: sdb4 does not have a valid v0.90 superblock, not importing!
md: invalid raid superblock magic on sda1
md: sda1 does not have a valid v0.90 superblock, not importing!
md: invalid raid superblock magic on sda2
md: sda2 does not have a valid v0.90 superblock, not importing!
md: invalid raid superblock magic on sda3
md: sda3 does not have a valid v0.90 superblock, not importing!
md: invalid raid superblock magic on sda4
md: sda4 does not have a valid v0.90 superblock, not importing!
md: Scanned 8 and added 0 devices.
md: autorun …
md: … autorun DONE.
EXT3-fs: unable to read superblock
List of all partitions:
0800      1953514584 sda driver: sd
  0801         1999872 sda1
  0802         1999872 sda2
  0803          500736 sda3
  0804      1948998656 sda4
0810      1953514584 sdb driver: sd
  0811         1999872 sdb1
  0812         1999872 sdb2
  0813          500736 sdb3
  0814      1948998656 sdb4
No filesystem could mount root, tried:  ext3
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(9,0)
Rebooting in 180 seconds…

Sorry for my pool english :stuck_out_tongue:

@linuxhaha

For the MyBookLive DUO try following the MBL DUO debrick guide linked below

http://community.wd.com/t5/My-Book-Live-Duo/GUIDE-Debrick-a-MyBookLive-DUO/td-p/544860

1 Like

I’ve missed some steps, now it works well, so the swap.c is the most important thing…

think you. :smileyvery-happy:

I’m glad it worked for you :slight_smile: I was basically flying blind trying to put that guide together as I don’t own a MBL DUO but the community pulled together and we got it done :slight_smile:

Hi,

Great guide.  I’ve managed to back up my photos to another device and unbricked my MyBook live - Thanks!

I’m not out of the woods yet though, there is something wrong with the partitions on the disk.  In DiskInternals its says there is 2.7GB unallocated.  I also installed gdisk following one of your other guides, it tells me this…

MyBookLive:/DataVolume# gdisk /dev/sda
GPT fdisk (gdisk) version 0.8.5

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.

Warning! Secondary partition table overlaps the last partition by
1202 blocks!
You will need to delete this partition or resize it in another utility.

The partitions look like this:

Number Start (sector) End (sector) Size Code Name
1 1032192 5031935 1.9 GiB FD00 primary
2 5031936 9031679 1.9 GiB FD00 primary
3 30720 1032191 489.0 MiB 0700 primary
4 9031680 5860532223 2.7 TiB 0700 primary

I still have a lot of media on it so would rather not wipe it if I can avoid it

Any help would be very much appreciated

Thanks

MrT

Hello,

I really hope that this topic is still alive and would be grateful for some help. I’ve spent 3 days trying to debrick my MBL using different boot CDs and virtual machines with no luck. At this point, I have no ideas left and would really appreciate your help.

Unfortunately, boot CD provided here gave me “Kernel panic” on 3 different PCs so I had to try GRML boot CD ( http://grml.org/)..) I tried to use Guide 2, so I deleted all the partitions from my MBL in Windows Disk Management. Then I booted the PC using GRML live CD and the first attempt gave me many errors, here is the complete output (some strange things are highlighted with red):

 

After that, I rebooted and tried again. This time everything was better however, some errors were still there. For example, I again saw the message: “./debrick.sh: line 280: gc: command not found”, mdadm –S /mnt/md0 again gave me an error. Anyway this time mdadm worked better but I saw some messages that I did not see in normal script output from other users (highlighted with yellow on the screenshots below) – maybe they are there since I ran the script the second time after the failed first attempt. At the end, I again got messages about swap (highlighted with green) and that’s it. The problem is that when I connect my MBL the led is still yellow. Below is the complete script output of my second attempt.

Here is how the drive is recognized in Windows after running the script:

 

I’ve tried it many times on 2 different PCs (1-st is a laptop with SATA-USB interface, the 2d one is a PC and MBL was connected via SATA interface directly). The result is always the same and I always have to do 2 attempts.

As I mentioned, I’ve also tried to run the script on a VM running Ubuntu 12. I didn’t get the error message about line 280 in this case but mdadm gave me message like this:

destroying was done, would you like to continue with installation? [y] y

mdadm: super0.90 cannot open /dev/sdb1: Device or resource busy

mdadm: /dev/sdb1 is not suitable for this array.

mdadm: create aborted

mke2fs 1.42 (29-Nov-2011)

Filesystem label=

OS type: Linux

…… (some other stuff that for me is looking fine)

mdadm: Cannot open /dev/sdb2: Device or resource busy

synchronize raid… done

I’ve also tried finnix boot CD but it gave me even more errors.

Please help, your assistance is much appreciated! And please accept my apologies for my English.

Regards,

Vladimir Lyapunov

Please, disregard my post above. After trying 2 more Linux Live CDs Knoppix worked perferctly. Now sure what was wrong with others but now everything works fine. Great thanks for the guide!

hey 

tried to debrick my mbl

went through all the steps and below is the info from the terminal

root@sysresccd /root % mkdir /mnt/usb
root@sysresccd /root % mount -t vfat /dev/sdf1 /mnt/usb
root@sysresccd /root % cd /mnt/usb
root@sysresccd /mnt/usb % mdadm -S /dev/md0
mdadm: stopped /dev/md0
root@sysresccd /mnt/usb % ./debrick.sh rootfs.img /dev/sda

********************** DISK **********************

script will use the following disk:

Model: ATA WDC WD10EARS-00Y (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
3 15.7MB 528MB 513MB primary
1 528MB 2576MB 2048MB ext3 primary raid
2 2576MB 4624MB 2048MB ext3 primary raid
4 4624MB 1000GB 996GB ext4 primary

is this REALLY the disk you want? [y] y

********************** IMAGE **********************

********************** IMPLEMENTATION **********************

everything is now prepared!
device: /dev/sda
image_img: rootfs.img
destroy: false

this is the point of no return, continue? [y] y

mdadm: /dev/sda1 appears to contain an ext2fs file system
size=1999808K mtime=Thu Jan 2 23:46:23 2014
mdadm: size set to 1999808K
mdadm: creation continuing despite oddities due to --run
mdadm: array /dev/md0 started.
mke2fs 1.42.8 (20-Jun-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
125184 inodes, 499952 blocks
24997 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=515899392
16 block groups
32768 blocks per group, 32768 fragments per group
7824 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912

Checking for bad blocks (read-only test): 0.00% done, 0:00 elapsed. (0/0/0 errdone
Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

mdadm: added /dev/sda2

synchronize raid… done

copying image to disk…
dd: writing to ‘/dev/md0’: Input/output error
263209+0 records in
263208+0 records out
134762496 bytes (135 MB) copied, 39.5805 s, 3.4 MB/s
cp: accessing ‘/mnt/md0/boot/boot.scr’: Input/output error
./debrick.sh: line 359: /mnt/md0/etc/nas/service_startup/ssh: Input/output error
mdadm: stopped /dev/md0

all done! device should be debricked!

root@sysresccd /mnt/usb %

Plugged it back in and still getting yellow ligh

the green lan light keeps blinking

the amber is solid, and the discs sounds like its reading. and not stuck

Im seriously at a loss as to what to do now ??

any pointers would be appreciated

Thank you very much! I have been fighting for over a year trying to get my NAS up and running.

Really appreciate your contribution here. 
Best regards from Argentina!

Bernardo

@nfodiz wrote:  “I’m gonna debrick this drive again and call it a night, I think you are on the right track though.”

I finally had time to come back to this.  I think it might be drive failure, BUT I am thinking it might be with the electronics (the drive’s controller) rather than a platter issue.

I finally found a utility that can read the disk:  UFS Explorer.  After a few minutes, it recognized the drive, showed the two remaining partitions (including the ext4 data partition), along with the two partitions marked as “raw”.  (Refer back to our conversation starting on pg. 41 in this thread:   http://community.wd.com/t5/My-Book-Live/GUIDE-How-to-unbrick-a-totally-dead-MBL/td-p/435724/page/41 .)

I browsed some of my data partition and it appears all of the files are there!  This software gives me an option to copy the files elsewhere, and I have started on it.  Thing is, the process is taking f-o-r-e-v-e-r .  It has taken 11 hours to copy 1.4 GB of data.  As for the partitions, it recognizes my data partition and one of the RAID partitions as “ext2/3/4”, while the other two are flagged as being raw partitions.  This is exactly what gparted told me when it was still working.

Prior to starting the copy operation, I ran a couple of scans.  First, it did show a SMART error, something about file reallocation being one of the error flags thrown.  I did a small surface test (read-only), and the way it displays results, it shows square blocks of different colors based on access time of the blocks of data.  Normally most of them will be green, but the drive is alternating between green and red blocks, the red being >0.500ms access time.  There is a pattern to how the reading is alternating:  I would get maybe four rows of green blocks, followed by six or seven rows of red blocks.  It’s consistent.  And while copying the files, the progress bar operates in the same manner.  It will pause for a minute or three and do apparently nothing, then it will quickly copy another hunk of the file.

I figured two things might be happening.  The drive’s controller is damaged (probably from the power outage), causing it to read so much, then “hang” in some sort of wait state.  This is the most likely, since it has the same behavior when reading sequential blocks during the surface test, and when it is copying files.

Or, because of the corrupted partition information, the drive is taking a long time to seek out and retrieve the data.  The partition table does appear to be corrupted since it is still missing the descriptors for one of the two RAID partitions and the swap partition.  

I also wonder if the drive’s SMART error status might be preventing the drive from spooling up and copying the files.  I cannot find it, but somewhere, there was a diagnostic utility that bypassed SMART (and IIRC the system BIOS) to work with the drive directly, but I was not able to find it again.  I’m wondering that if the SMART parameters could be reset (the drive is probably a goner anyway), if the drive might free up again so I could at least copy the files off of it.  

Not that I can’t recreate the data, but that is time consuming, and I want the challenge of fixing this drive or at least getting the data off of it.

mdadm -S /dev/md0
./debrick.sh rootfs.img /dev/sdaCan I know why should type "mdadm -S /dev/md0" before running the script?Is it OK to skip "mdadm" for MBL 2T?

Is there an similar guide for My book Cloud ?

NFODIZ

Thank you, from yet another satisfied customer.

Having lost access to Dashboard, ssh and all non-public shares I began to think I’d lost access to it all. As this was my backup, I hadn’t kept another backup! Nevertheless, I wanted to keep it, so went with your version 1 guide, and after an unsuccessful first attempt (something to do with raid) , was able to restore full access to my MBL data, Dashboard and ssh on second attempt.

My only real hiccup, was in using a 16Gb Thumb drive, as this was formatted to ntfs, and although recognised as /dev/sdd1 in gparted, wouldn’t mount,  as file system wasn’t recognised !!!

I then used a 4Gb Thumb formatted as FAT. and success.

All my share partions were there, but at risk of losing data, I moved them all under the Public share, so that if it happens again (was my fault for trying to install mysql-server), I will still have access.

Hi, I have a non accessible drive. Blue flashing light with alternate green light flashing.

I have taken it out of the casing and accessed it via the linux reader and seen the drive partitions. I want to get all my images and music from the drive so have copied the data from the raid partition with the most data on but only seem to get a whole load of folders without the actual data im after. After doing a search in the retrieved data there doesnt seem to be anything there apart from the mass of folders.

My question is which part do i need to copy to retrieve my data before attempting to debrick it and get it working again?

if its a soft raid will I need to access it as a raid to get the fragmented data off?

thanks

Jim

I’m a new client for WD community forum.

I’ve been trying for a couple of days to debrick my wd my book live 2T.

I used both scripts supplied in this feed… but always had an error when copying image to disk.

I’ve used virtual machines … I’ve used my raspberry pi… and now i’m using my system rescue boot… but always with the same outcome…

"********************** DISK           **********************

script will use the following disk: 

Model: WDC WD20 EURS-63S48Y0 (scsi)

Disk /dev/sdd: 2000GB

Sector size (logical/physical): 512B/512B

Partition Table: gpt

Disk Flags: 

Number  Start   End     Size    File system  Name     Flags

 3      15.7MB  528MB   513MB                primary

 1      528MB   2576MB  2048MB  ext3         primary  raid

 2      2576MB  4624MB  2048MB  ext3         primary  raid

 4      4624MB  2000GB  1996GB  ext4         primary

is this REALLY the disk you want? [y] y

********************** IMAGE          **********************

********************** IMPLEMENTATION **********************

everything is now prepared!

device:       /dev/sdd

image_img:    rootfs.img

destroy:      false

this is the point of no return, continue? [y] y

mdadm: /dev/sdd1 appears to contain an ext2fs file system

    size=1999808K  mtime=Tue Jun  3 00:56:43 2014

mdadm: size set to 1999808K

mdadm: creation continuing despite oddities due to --run

mdadm: array /dev/md0 started.

mke2fs 1.42.9 (28-Dec-2013)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

Stride=0 blocks, Stripe width=0 blocks

125184 inodes, 499952 blocks

24997 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=515899392

16 block groups

32768 blocks per group, 32768 fragments per group

7824 inodes per group

Superblock backups stored on blocks: 

32768, 98304, 163840, 229376, 294912

Checking for bad blocks (read-only test):   0.00% done, 0:00 elapsed. (0/0/0 errdone                                                 

Allocating group tables: done                            

Writing inode tables: done                            

Creating journal (8192 blocks): done

Writing superblocks and filesystem accounting information: done 

mdadm: added /dev/sdd2

synchronize raid… done

copying image to disk… 

dd: writing to ‘/dev/md0’: Input/output error

2911409+0 records in

2911408+0 records out

1490640896 bytes (1.5 GB) copied, 266.204 s, 5.6 MB/s

cp: cannot create regular file ‘/mnt/md0/boot/boot.scr’: Input/output error

mdadm: stopped /dev/md0

all done! device should be debricked!"

And everything stays the same! still bricked!

Can anyone help me put my NAS back on track… without deleting the information in the disk?

Thank you in advance

Hi Daremo, hope you are still active here…

Having problems with r-linux … When scanning my MBL it has a few errors early on - I/O errors at the moment.

Do you scan “showing files” first?

I’m at a loss as i’ve never been this deep into it before. I have pictures i need to get off of the kids :frowning:

Any guidance greatly appreciated.