[GUIDE] How to unbrick a totally dead MBL

I just debricked using the guide and all looks good

MyBookLive:~# mdadm --detail /dev/md0
mdadm: md device /dev/md0 does not appear to be active.
MyBookLive:~# mdadm --detail /dev/md1
/dev/md1:
        Version : 00.90
  Creation Time : Wed May 29 01:39:20 2013
     Raid Level : raid1
     Array Size : 1999808 (1953.27 MiB 2047.80 MB)
  Used Dev Size : 1999808 (1953.27 MiB 2047.80 MB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Thu May 30 06:13:00 2013
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : 38f0e15d:c4eac77a:c40cd559:bc7d869a
         Events : 0.4303

    Number Major Minor RaidDevice State
       0 8 1 0 active sync /dev/sda1
       1 8 2 1 active sync /dev/sda2

@helzayat I think it is some new upgrade code that is flawed. I have noticed this after upgrading to the latest firmware as well…

This is a direct copy paste from my terminal. I don’t know linux but this doesn’t look good even to me.

root@sysresccd /root % mkdir /mnt/usb

root@sysresccd /root % mount -t vfat /dev/sdb1 /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 destroy

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

script will use the following disk: 

Model: ATA WDC WD30EZRX-00M (scsi)

Disk /dev/sda: 3001GB

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/sda

image_img:    rootfs.img

destroy:      true

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

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

11+0 records in

10+0 records out

10485760 bytes (10 MB) copied, 0.00281475 s, 3.7 GB/s

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

1+0 records in

0+0 records out

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

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

1+0 records in

0+0 records out

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

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

1+0 records in

0+0 records out

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

Testing with pattern 0x00: done                                                 

Reading and comparing: done                                                 

GNU Parted 3.1

Using /dev/sda

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.7 (21-Jan-2013)

/dev/sda4 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: size set to 10176K

mdadm: ADD_NEW_DISK for /dev/sda1 failed: No such device or address

mke2fs 1.42.7 (21-Jan-2013)

mkfs.ext3: 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.

mdadm: cannot get array info for /dev/md0

synchronize raid… 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.0340234 s, 0.0 kB/s

mount: /dev/md0: can’t read superblock

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: stopped /dev/md0

BLKGETSIZE: Inappropriate ioctl for device

BLKGETSIZE: Inappropriate ioctl for device

all done! device should be debricked!

root@sysresccd /mnt/usb % 

Have you tried to reboot and run the script a second time? It seems to be hanging up on reading the partition table after the partitions are created.

I am new to this forum and of course I have a my book live (3TB) that refuses to boot.  All was well until bam, no boot and red light.  First of all I really want to thank nfodiz and everyone else in here who posts their results as the information is invaluable.  Thank you thank you.  I know when I get this repaired I will be smiling ear to ear and forever grateful.

Now to my problems; I am attempting to de brick my drive and save all of the files on it which are extremely valuable. I have read all of the posts in this thread, have downloaded and run all of the programs and have tried to run the de brick command lines in the terminal window of the systemrescuecd Linux system.  When only the My Book Live hard drive is connected to my computer’s SATA connector, the thumb drive is /dev/sdh and the my book drive is /dev/sda.  My first question is should I be hitting the return key after every command line and should I be typing in the spaces I see in each command line?  I am doing both but I am having problems.  The first line (mkdir /mnt/usb) seems to work without error.  The second command line (mount -t vfat /dev /sdh /mnt/usb) delivers the following error:

mount: wrong fs type, bad option, bad superblock on /dev/sdh, missing codepage or helper program, or other error  In some cases useful info is found in syslog -try dmesg | tail or so

So I can’t get beyond this point.  Any help is appreciated.

Barry

Yes press enter or return after each command

Yes the spaces are required

Is the drive with the rootfs.img and script formatted to FAT32? If not you need to make a change. For example if the drive is formatted to NTFS the command would be

 mount -t ntfs /dev/sdh1 /mnt/usb

If it is formatted as FAT32, try the following and see if it makes a difference

mount -t vfat /dev/sdh1 /mnt/usb

nfodiz, thanks for the reply.  I entered the command the way you typed it and that version of the "mount -t vfat command seems to have worked.  Now on the next command I get an error as well:

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

mdadm: -s does not set the mode, and so cannot be the first option.

I am assuming the md0 is zero not the letter O and I’ve tried it both ways.

That is correct but it is a capital S not a little s

mdadm -S /dev/md0

You may want to use the web browser built into the system rescue cd. It is called midori and you can bring up the guide as you go through the process. It’s what I have to do sometimes due to my aging memory lol

ok that worked (capital S) down to the last command ./debrick.sh rootfs.img /dev/sda  and I get:

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

zsh: no such file or directory: ./debrick.sh

I know the 2 files are on the fat32 thumb drive but how do I prove that?  is there a directory command for Linux?  And by the way, I am running the midori browser thanks for that.  I placed the thumb drive in another computer and show both the debrick.sh file and the rootfs.img file are present.

Barry

type

ls

then hit enter

@bnwitt did I lose you?

No I’m still here.  I did a reboot.  Ok when I did the ls thing after all the commands this is what I now have:

root@sysresccd /root % mkdir /mnt/usb

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

root@sysresccd /root % cd /mnt/usb

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

mdadm: stopped /dev/md0

root@sysresccd /mnt/usb % ls

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

zsh: no such file or directory: ./debrick.sh

root@sysresccd /mnt/usb % 

I assume the /mnt/usb is representitive of my 32GB fat32 formatted thumb drive even though it is referenced as /dev/sdg in GParted.  I have the thumb drive on a USB hub connected to one of my MB USB connectors.  It shows up in the GParted device list but if the ls command means list files then I guess it is not seeing thoses files.  I’m going to move it a usb connection without the hub and refresh to see if it works.

Yep ls should list the files in the current directory you are in. I would move it off the hub for sure, I bet it fixes your issue. You MAY need to reboot the system rescue cd for the changes to take effect.

It is now directly connected to a motherboard USB connection and I see the unit still as /dev/sdg but ls doesn’t show any files nor does the debrick.sh file run.  It still comes back no such file or directory

I will reboot and come back

reboot the system rescue cd

Also your pasted command is missing spaces and the 1

mount -t vfat/dev/sdg/mnt/usb

Should be

mount -t vfat /dev/sdg1 /mnt/usb

Ok, I now have sda and sdb.  sdb is the thumb drive.  I am typing the commands as follows:

mdkir space /mnt/usb

mount space -t vfat space /dev/sdb1/mnt/usb (with no spaces in the last part as directed before which works)

cd space /mnt/usb

mdadm space -S space /dev/md0 (this doesn’t work)

See below:

root@sysresccd /root % mkdir /mnt/usb

mkdir: cannot create directory ‘/mnt/usb’: File exists

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

root@sysresccd /root % cd /mnt/usb

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

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

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

zsh: no such file or directory: ./debrick.sh

root@sysresccd /mnt/usb % 

Nope it has to be

mount space -t vfat space /dev/sdb1 space /mnt/usb