[GUIDE] How to unbrick a totally dead MBL

Same problem. Have you solved it? Thank yo

No, I wasn’t able solve it. I ended up buying a new NAS.

OK. Thank you!

I have what I thought to be a bricked WD MYBook Live 2TB drive. It was slow blinking blue with the occasional orange blink. I followed the instructions up to step 5 but now im stuck. when I run gparted, my WD drive does not show up. I have it connected via SATA cables to a USB. its a simple setup (C2G / Cables To Go 30504 33IN USB 2.0 to IDE or Serial ATA Drive Adapter Cable (Black), Model: 30504). Then connected, the drive spins up but it is not recognized by my computer. What am I doing wrong? Also, in step 2, when I tried to run “diskinternals Linux reader” nothing showed up there either.

Any suggestions would be really appreciated.

Thank you

Hello, I tried to execute this procedure to recover My old MyBookLive 1To and updating it with a 2TO
I’ve some warnings at the swap.c compilation (talking about implicit definition of lseek64).
I’m using a newer version of the systemrescuecd.
afterwards everything seem to be working but the system does not start and the light stays yellow on the MBL.

Finally I dowloaded the 3.81 version of this cd and started on an olc computer (my current computer start correctly with old systemrecuecd version).

Using this version does not prompt any lseek64 warning and produce smaller smaller journals (about 32000 blocks instead of about 131k blocks).

I suspect an incompatibility of lseek64 with newer version of libs included in newer linux version.

but it still does not work ! I get the LED blue then solid Yellow and the NAS never appears on my network…
what can I try ?

I tried on another disk and i worked almost (partition 4 is corrupted but this disk was smaller than 1GO).
on my WD blue 2TO nothing is working…
perhaps I have tu update swap.c as the sector size is 4096 on this disk and not 512 as on the original one.

I also tried to dd the 3 first partitions (including MBR) from the workig disk to the 2TO WD blue but it didn’t worked (corrupted partition table)…

Does someone have an idea to help me??

I decided to give this another shot this past weekend. Instead of using SATA to USB, I went SATA to SATA. That made all the difference. The drive was found following the procedure listed above. I got to the end of the unbricking process where it says its now unbricked. I went to give the drive a try and i think i made things worse. The light was mostly a steady blue with flashes of red. Then the red stopped and an mostly steady blue. I redid the unbricking but with the more recent firmware and the same end result. However, this time, the lights went out and now get nothing. the drive is still spinning but no lights.

I really want the data to be pulled off. I dont care about ever reusing this drive, i just want the files. Is there a way to access the data and copy it off to another drive? The data is there. I know it is.

Please help.

I ran the debrick.sh along with the rootfs.img (latest from the page 1 of this thread).

Here is the output

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

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

script will use the following disk:

Error: Invalid argument during seek for read on /dev/sda
Model: ATA WDC WD5000AAKX-0 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
is this REALLY the disk you want? [y] y

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

swap.c:12:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
main(int argc, char *argv)
swap.c: In function ‘main’:
swap.c:32:9: warning: implicit declaration of function ‘lseek64’; did you mean ‘lseek’? [-Wimplicit-function-declaration]
if (lseek64(fd, offset, 0) < 0LL) {

********************** 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: error writing ‘/dev/sda1’: No space left on device
10+0 records in
9+0 records out
10354688 bytes (10 MB, 9.9 MiB) copied, 0.00752334 s, 1.4 GB/s
dd: error writing ‘/dev/sda2’: No space left on device
1+0 records in
0+0 records out
0 bytes copied, 0.00081279 s, 0.0 kB/s
dd: error writing ‘/dev/sda3’: No space left on device
1+0 records in
0+0 records out
0 bytes copied, 0.00077578 s, 0.0 kB/s
dd: error writing ‘/dev/sda4’: No space left on device
1+0 records in
0+0 records out
0 bytes copied, 0.000726765 s, 0.0 kB/s
Testing with pattern 0x00: done
Reading and comparing: done
GNU Parted 3.2
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.43.9 (8-Feb-2018)
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/sda1 is not a block device
mdadm: Cannot find /dev/md0: No such file or directory
mke2fs 1.43.9 (8-Feb-2018)
The file /dev/md0 does not exist and no size was specified.
mdadm: error opening /dev/md0: No such file or directory

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

copying image to disk…
dd: writing to ‘/dev/md0’: No space left on device
1+0 records in
0+0 records out
0 bytes copied, 0.000205677 s, 0.0 kB/s
mount: /mnt/md0: /dev/md0 is not a block device; 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 %

Further update.
There was success (to a large extent).
I managed to boot the device (despite the errors above).
After first boot, I was able to find the IP address from my router.
Then I connected to the dashboard (via my laptop browser) and could see the welcome screen.
It showed me there was 0 GB space and asked me to update the firmware to a new version. When I clicked the upgrade button, it said, there was not enough space and exited. Then, it kept on showing ‘initialization’ screen everytime I tried to navigate through the various settings.
Meanwhile, I tried SSH and it did not work. I clicked on the factory reset and that solved the problem of 0 GB space. The second time I tried the firmware upgrade, it ‘failed’ - not sure why.

Then after a few minutes I tried the firmware upgrade again, and it got stuck on 4% for a very long time. Finally it gave up saying:
31184: Error retrieving firmware upgrade information…

I realized I have to use http:///UI/SSH so that I can enable SSH first. Unfortunately it did not work. The drive is extremely slow it seems and seems unresponsive.
I will try one more factory reset since it is stuck on ‘initializing’ in the dashboard.

Thanks for all that. Where do I get “rootfs.img” from? It tells you to copy it to the thumb drive, but never mentions where it comes from. Thanks!..

Will these instructions also work for the old MyBook live ( wdh1nc20000n ) ?


Hi, I’m quite a newby in Linux and trying to recover data on a 3 TB HDD. I got to STEP 5 of your thread and got stuck at line: mdadm -S /dev/md0 --error opening /dev/md0: No such file or directory. Do you have any suggestions on how to go over this ?. Much appreciated, Erol

I gave My Book to a Computer Tech who said he has retrieved before, he returned it to me and said it was dead, nothing he could do about it.
I have another drive I used for recording of the cable box but not longer use, thought I could use the bd. of it.
When I plugged the drive as you see it here, it in fact does spin up!
But I cannot see the contents of the drive, even when I use disk Internals Linux reader-
Can anyone suggest a way I may be able to get the data off this drive beside taking it a recovery site?
Thanks in advance

Hy 2 All,
i’m trying to copy data from my bricked 2TB WD Live. I’ve started 5 days now verifying and copying data with R-Linux (linked to PC through USB)
Hope this info’s helps someone else.

I just tried both scenarios how to unblock my WD WE Blue rings 1TB - no success.
has anybody had a success?

May be someone has got Mybook Rescue Tool for win ?
Easy to recover…

Please advice.

Install 7zip and point it to your MyBookLive firmware “apnc-021109-053-20120413.deb” and double click and you will see “data.tar” where you will again double click and be presented with a “.” Double click the “.” then double click “cache volume” then double click “upgrade” and then highlight “rootfs.img” and hit extract.

WD Mybook Live resurrection - my personal edition. It is basically a manual, step-by-step debrick.sh. I hope it might help someone, since debrick.sh didn’t work for me, always failing halfway with some error.
This guide assumes that you know how to sudo su, since most of the commands require root access.
Sorry if it’s a bit messy - my English and my thought processes are no better.
You are required to read the guide of the OP of this post, and, perhaps, a couple of other guides to get a grasp of what’s going on here.
And yes, the following will DESTROY your data, so please make a backup beforehand.

  1. As a file restoration (copying) tool, I used R-Linux.

  2. Download the firmware (I used apnc-024310-048-20150507.deb from the wd website)
    Use your favorite unarchiver to unpack the rootfs.img that we’ll need later (you may save it to an external FDD).

  3. Boot into some linux with both mdadm, parted and gcc installed (KNOPPIX_V8.6.1-2019-10-14-EN worked for me)
    To put Knoppix on the FDD in Windows 7, I used Rufus app.
    Don’t forget to unplug your system HDD before the next steps, just in case.

  4. Clean the HDD, deleting all the partitions using GParted and running (assuming our HDD is /dev/sda)

dd if=/dev/zero of=/dev/sda

for a couple of minutes (press Ctrl+C to interrupt)

  1. Check if the HDD is empty

fdisk -l /dev/sda

  1. Make the partition table

parted /dev/sda
(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

  1. Check if the partitions are there

fdisk -l /dev/sda

and create the filesystem for the data partition

mkfs.ext4 -b 65536 -m 0 /dev/sda4

  1. Check if the RAID is not running

mdadm --stop /dev/md0

!important: Knoppix tends to automount RAIDs as /dev/md* (where * is some number), so check if no /dev/md* exist. Otherwise, stop them as well.

  1. Create the RAID

mdadm --create /dev/md0 --verbose --metadata=0.9 --raid-devices=2 --level=raid1 --run /dev/sda1 missing
mdadm --wait /dev/md0

and the filesystem in it

mkfs.ext3 -c -b 4096 /dev/md0

  1. Add the second partition to the RAID

mdadm /dev/md0 --add --verbose /dev/sda2
mdadm --wait /dev/md0

  1. To copy the firmware to the RAID, run in the folder with rootfs.img

dd if=./rootfs.img of=/dev/md0

  1. Copy the boot script (here you will probably also need to check that no other /dev/md* exists, and close them accordingly)

mkdir /mnt/rootfs
mount /dev/md0 /mnt/rootfs
cp /mnt/rootfs/usr/local/share/bootmd0.scr /mnt/rootfs/boot/boot.scr

  1. Turn on the SSH access

echo «enabled» > /mnt/rootfs/etc/nas/service_startup/ssh

  1. Unmount the RAID

umount /dev/md0

  1. Here we need to patch the RAID partitions with the custom file (don’t ask, that’s some voodoo with the byte ordering).
    The source (save it somewhere as swap.c) is the following (basically, I fixed the compiler warnings in the source file from debrick.sh, otherwise it’s exactly the same code):

#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/mount.h>
#include <sys/types.h>

#define MD_RESERVED_BYTES (64 * 1024)


int main(int argc, char *argv[])
int fd, i;
unsigned long size;
unsigned long long offset;
char super[4096];
if (argc != 2) {
fprintf(stderr, "Usage: swap_super device\n");
fd = open(argv[1], O_RDWR);
if (fd<0) {
if (ioctl(fd, BLKGETSIZE, &size)) {
offset = MD_NEW_SIZE_SECTORS(size) * 512LL;
if (lseek64(fd, offset, 0) < 0LL) {
if (read(fd, super, 4096) != 4096) {

for (i=0; i < 4096 ; i+=4) {
char t = super[i];
super[i] = super[i+3];
super[i+3] = t;
/* swap the u64 events counters */
for (i=0; i<4; i++) {
/* events_hi and events_lo */
char t=super[32*4+7*4 +i];
super[32*4+7*4 +i] = super[32*4+8*4 +i];
super[32*4+8*4 +i] = t;

/* cp_events_hi and cp_events_lo */
t=super[32*4+9*4 +i];
super[32*4+9*4 +i] = super[32*4+10*4 +i];
super[32*4+10*4 +i] = t;

if (lseek64(fd, offset, 0) < 0LL) {
if (write(fd, super, 4096) != 4096) {


  1. After saving, compile the source

gcc swap.c -o swap

stop the RAID

mdadm --stop /dev/md0

and patch the partitions!

./swap /dev/sda1
./swap /dev/sda2

  1. Now we can

shutdown -h now

and try our newly made HDD with Mybook Live PCB.

  1. If the web interface says “Data volume failed to mount” after you first boot the device, you’ll need to format /dev/sda4 from ssh with the following:

mkfs.ext4 -b 65536 -m 0 /dev/sda4

and then reboot your device.

  1. It is recommended to do the “soft” restore once after the resurrection, using the *.deb firmware file and the web UI.

External references (in Russian):

1 Like


Can anyone help me with updating firmware?
I have tried to do it over SSH, but I run into some problems:

MyBookLive:/bin# sudo bash /usr/local/sbin/updateFirmwareFromFile.sh /DataVolume/shares/Public/Software/apnc-024310-048-20150507.deb
updateFirmwareFromFile.sh:10/07/20 17:22:12:: ( /DataVolume/shares/Public/Software/apnc-024310-048-20150507.deb )
updateFirmwareFromFile.sh:10/07/20 17:22:12:upgrade start: /DataVolume/shares/Public/Software/apnc-024310-048-20150507.deb
updateFirmwareFromFile.sh:10/07/20 17:22:12:check_size=
updateFirmwareFromFile.sh:10/07/20 17:22:13:version_current=024105034
updateFirmwareFromFile.sh:10/07/20 17:22:13:version_newfile=024310048
updateFirmwareFromFile.sh:10/07/20 17:22:13:package_newfile=apnc
updateFirmwareFromFile.sh:10/07/20 17:22:13:master_package_name=apnc
updateFirmwareFromFile.sh:10/07/20 17:22:13:master_package_new=apnc
updateFirmwareFromFile.sh:10/07/20 17:22:13:update_container=
(Reading database ...
dpkg: warning: files list file for package `ramlog' missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `libparted0' missing, assuming package has no files currently installed.
19089 files and directories currently installed.)
Preparing to replace apnc 02.41.05-034 (using .../apnc-024310-048-20150507.deb) ...
preinst: currentRootDevice=/dev/md0
preinst: master_package_name=apnc
preinst: update_container=
Restore raid device: /dev/sda1
Restore raid device: /dev/sda2
Prepare for upgrade install to /dev/sda1 ...
Stopping periodic command scheduler: crond.
Stopping standby monitor: monitorio.
1 pids were not killed
No process in pidfile '/var/run/tally.pid' found running; none killed.
Stopping Access Daemons: dms_smm mpe_server.
Stopping itunes server: forked-daapd.
Kill Miocrawler Process...
Killed the mediacrawler process
Wed Oct  7 13:23:24 EDT 2020 - %W - Communication Manager - process is not running
Prepare for upgrade pkg install...
mdadm: Unrecognised md component device - /dev/sda1
mdadm: size set to 500672K
mdadm: array /dev/md1 started.
preinst: current device=/dev/md0
preinst: upgrade device=/dev/md1
Unpacking replacement apnc ...
Setting up apnc (02.43.10-048) ...
postinst: upgradeDevice=/dev/md1
postinst: currentRootDevice=/dev/md0
postinst: upgradePath=/mnt/rootfs
Copy image to upgrade device /dev/md1:
blockSize=64k blockCount=31247
Compare checksum
md5sum: WARNING: 1 of 1 computed checksum did NOT match
ok 1
Upgrade failed
mdadm: stopped /dev/md1
mdadm: /dev/sda1 not large enough to join array

Good evening all, my first post on this Forum.
I am trying to follow instructions for upgrading my 1Tb MBL to 3Tb. Instructions seem to be easy to follow but I’m not getting very far. I have a brand new WD Red HDD, 3TB. do I need to partition / format the disk before I start or even do something like clone the original, and working, 1Tb disk.
I have tried to copy the 3Tb .img file onto a USB stick formatted to NTSF and not seen by rescue disk, will FAT be better?
Any suggestions will be welcome! Thanks for reading!

Hello Thank you for the guide, i could recover my WD with the destroy option and the Swap is OK.

Now, my transfers rate plummet, i was doing 18-34mb/s via wifi and now the same equipment cant do more than 4mb/s, also it cant hold static ip, i can configure it in the web portal but whenever it resets it goes back to DHCP, both issue tell me there is something in the networking side (not the reason i recover the drive), does anyone know what could it be?