[GUIDE] How to unbrick a totally dead MBL

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) {
^~~~~~~
lseek

********************** 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
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 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 %