De-bricking script errors

I’m attempting to resurrect a bricked MyBookLive (2TB), using the popular de-bricking script. Using a USB enclosure, connected to my Win7 laptop (Lenovo W520), via WMware Workstation / Ubuntu. Here are the errors:

mdadm: /dev/sdc1 appears to contain an ext2fs file system
size=1999808K mtime=Wed Dec 31 16:00:00 1969
mdadm: /dev/sdc1 appears to be part of a raid array:
level=raid1 devices=2 ctime=Sat Oct 13 19:54:47 2018
mdadm: size set to 1999808K
mdadm: creation continuing despite oddities due to --run
mdadm: Fail create md0 when using /sys/module/md_mod/parameters/new_array
mdadm: /dev/md0 is already in use.
mdadm: stat failed for /dev/md0: No such file or directory
mke2fs 1.44.1 (24-Mar-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: stat failed for /dev/md0: No such file or directory
done
copying image to disk…
dd: writing to ‘/dev/md0’: No space left on device
1956201+0 records in
1956200+0 records out
1001574400 bytes (1.0 GB, 955 MiB) copied, 35.7046 s, 28.1 MB/s
mount: /mnt/md0: wrong fs type, bad option, bad superblock on /dev/loop15, missing codepage or helper program, or other error.
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
./debrick.sh: line 366: ./swap: No such file or directory
./debrick.sh: line 367: ./swap: No such file or directory
rm: cannot remove ‘./swap’: No such file or directory

I’m a complete linux novice, and have no idea what’s going on here. Any insight would be well appreciated!

I had this happen to me after the script failed. Reboot your computer to free up md0 and try again :wink:

I had to use SystemRescueCd (x86, version 4.4.0) to run the script. mdadm in ubuntu 16.04 refuses to create raid array of partitions, which is required. you also probably don’t have compiler installed and even then the swap.c would need to be edited. using sysresccd is just so much easier for this task.

or you can edit the script to use md1 (or 2,3,4 etc.) instead of md0 and rebooting the pc.