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 %