Welcome! Log In Create A New Profile

Advanced

RN104 bricked

Posted by K20 
K20
RN104 bricked
September 17, 2020 09:25AM
Hi All,

I hope someone can help me with restoring my NAS to its default readynas OS 6
The previous seller has installed Debian on it and I wanted to restore the NAS to its sock OS 6 and while I was doing that I have erase the entire nand chip by command: nand erase.chip

Now whenever I power on my NAS I am getting following

BootROM 1.20
Booting from NAND flash
BootROM: Bad header at offset 00000000
BootROM: Bad header at offset 00010000
BootROM: Bad header at offset 00020000
BootROM: Bad header at offset 00030000
BootROM: Bad header at offset 00040000
BootROM: Bad header at offset 00050000
....
BootROM: Bad header at offset 012A0000
BootROM: Bad header at offset 012B0000
BootROM: Bad header at offset 012C0000
BootROM: Bad header at offset 012D0000

I have manage to get uboot for my model from readynas OS 6 pack from netgear website and now I am trying to restore.
K20
Re: RN104 bricked
September 17, 2020 09:31AM
Ran the following command on my Ubuntu machine

kwboot -t /dev/ttyUSB0 -b ./uboot.bin -B 115200 -p

Manage to load the uboot via kwboot now I don't know how to save uboot to nand so whenever NAS powers on it reads the uboot from nand instead of me booting up from kwboot


Sending boot message. Please reboot the target...|
Sending boot image...
  0 % [......................................................................]
  1 % [......................................................................]
  2 % [......................................................................]
  3 % [......................................................................]
  4 % [......................................................................]
  5 % [......................................................................]
  6 % [......................................................................]
  7 % [......................................................................]
  8 % [......................................................................]
  9 % [.........

General initialization - Version: 1.0.0

High speed PHY - Version: 2.1.4 (COM-PHY-V20) 
Update PEX Device ID 0x6710
High speed PHY - Ended Successfully
0000
DDR3 Training Sequence - Ver 5.7.1
DDR3 Training Sequence - Run without PBS.
DDR3 Training Sequence - Ended Successfully 
.............................................................]
 10 % [......................................................................]
 11 % [......................................................................]
 12 % [......................................................................]
 13 % [......................................................................]
 14 % [......................................................................]
 15 % [......................................................................]
 16 % [......................................................................]
 17 % [......................................................................]
 18 % [......................................................................]
 19 % [......................................................................]
 20 % [......................................................................]
 21 % [......................................................................]
 22 % [......................................................................]
 23 % [......................................................................]
 24 % [......................................................................]
 25 % [......................................................................]
 26 % [......................................................................]
 27 % [......................................................................]
 28 % [......................................................................]
 29 % [......................................................................]
 30 % [......................................................................]
 31 % [......................................................................]
 32 % [......................................................................]
 33 % [......................................................................]
 34 % [......................................................................]
 35 % [......................................................................]
 36 % [......................................................................]
 37 % [......................................................................]
 38 % [......................................................................]
 39 % [......................................................................]
 40 % [......................................................................]
 41 % [......................................................................]
 42 % [......................................................................]
 43 % [......................................................................]
 44 % [......................................................................]
 45 % [......................................................................]
 46 % [......................................................................]
 47 % [......................................................................]
 48 % [......................................................................]
 49 % [......................................................................]
 50 % [......................................................................]
 51 % [......................................................................]
 52 % [......................................................................]
 53 % [......................................................................]
 54 % [......................................................................]
 55 % [......................................................................]
 56 % [......................................................................]
 57 % [......................................................................]
 58 % [......................................................................]
 59 % [......................................................................]
 60 % [......................................................................]
 61 % [......................................................................]
 62 % [......................................................................]
 63 % [......................................................................]
 64 % [......................................................................]
 65 % [......................................................................]
 66 % [......................................................................]
 67 % [......................................................................]
 68 % [......................................................................]
 69 % [......................................................................]
 70 % [......................................................................]
 71 % [......................................................................]
 72 % [......................................................................]
 73 % [......................................................................]
 74 % [......................................................................]
 75 % [......................................................................]
 76 % [......................................................................]
 77 % [......................................................................]
 78 % [......................................................................]
 79 % [......................................................................]
 80 % [......................................................................]
 81 % [......................................................................]
 82 % [......................................................................]
 83 % [......................................................................]
 84 % [......................................................................]
 85 % [......................................................................]
 86 % [......................................................................]
 87 % [......................................................................]
 88 % [......................................................................]
 89 % [......................................................................]
 90 % [......................................................................]
 91 % [......................................................................]
 92 % [......................................................................]
 93 % [......................................................................]
 94 % [......................................................................]
 95 % [......................................................................]
 96 % [......................................................................]
 97 % [......................................................................]
 98 % [......................................................................]
 99 % [.........................................................]
[Type Ctrl-\ + c to quit]

 __   __                      _ _
|  \/  | __ _ _ ____   _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| |  | | (_| | |   \ V /  __/ | |
|_|  |_|\__,_|_|    \_/ \___|_|_|
         _   _     ____              _
        | | | |   | __ )  ___   ___ | |_ 
        | | | |___|  _ \ / _ \ / _ \| __| 
        | |_| |___| |_) | (_) | (_) | |_ 
         \___/    |____/ \___/ \___/ \__| 
 ** LOADER **


U-Boot 2011.12-gec25d27-dirty (Oct 26 2015 - 16:56:14) Marvell version: v2011.12 2014_T2.0p1 
06/23/2015 ReadyNAS-104 V2.0

Board: DB-88F6710-BP
SoC:   MV6710 A1
CPU:   Marvell PJ4B v7 UP (Rev 1) LE
       CPU    @ 1200 [MHz]
       L2     @ 600 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 600 [MHz]
       DDR 16Bit Width, FastPath Memory Access
DRAM:  512 MiB

Map:   Code:		0x1feef000:0x1ff9f514
       BSS:		0x1ffef8a0
       Stack:		0x1f9eeef8
       Heap:		0x1f9ef000:0x1feef000

NAND:  (ID 0xf1ad)	128 MiB
MMC:   MRVL_MMC: 0
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
nand_read_bbt: Bad block at 0x000001660000

Initialize and scan all PCI interfaces
PEX unit.port(active IF[-first bus]):
------------------------------------------
PEX 0: Root Complex Interface, Detected Link X1, GEN 2.0
PEX 1: Root Complex Interface, Detected Link X1, GEN 2.0
FPU not initialized
USB 0: Host Mode
USB 1: Host Mode
Shutting down unused interfaces:
       SDIO
       AUDIO
       TDM
Modules/Interfaces Detected:
       RGMII0 Phy
       RGMII1 Phy
       PEX0 (Lane 0)
       PEX1 (Lane 1)
       SATA0 (Lane 2)
       SATA1 (Lane 3)
Net:   egiga0, egiga1 [PRIME]
Power On!

FDT loaded successfully
Hit any key to stop autoboot:  0 

NAND read: device 0 offset 0x200000, size 0x400000
 4194304 bytes read: OK

NAND read: device 0 offset 0x800000, size 0x400000
 4194304 bytes read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Marvell>>



Edited 1 time(s). Last edit at 09/17/2020 09:32AM by K20.
K20
Re: RN104 bricked
September 17, 2020 09:40AM
I have followed this https://forum.doozan.com/read.php?3,95249

I can't find any info on how to copy and write into mtd0 the original uboot from netgear
K20
Re: RN104 bricked
September 17, 2020 10:05AM
Also ran following commands for you to understand where I am currently.
arvell>> mtdparts

device nand0 <armada-nand>, # parts = 5
 #: name		size		offset		mask_flags
 0: u-boot              0x000000180000		0x000000000000		0
 1: u-boot-env          0x000000020000		0x000000180000		0
 2: uImage              0x000000600000		0x000000200000		0
 3: minirootfs          0x000000400000		0x000000800000		0
 4: ubifs               0x000007400000		0x000000c00000		0

active partition: nand0,0 - (u-boot) 0x000000180000 @ 0x000000000000

defaults:
mtdids  : none
mtdparts: none

Marvell>> printenv
AC_Power_fail_detect=open
CASset=min
HW_version=MVT
MALLOC_len=5
Manufacturer=NETGEAR
NANDboot=nand read.e 0x2000000 0x200000 0x400000;nand read.e 0x1000000  0x7e00000 0x20000;nand read.e  0x3000000 0x800000 0x400000;bootz 0x2000000 0x3000000 0x1000000
Product=ReadyNAS 104
SKUNum=RN104
Startup=Normal
USBboot=fatload usb 0:1 0x2000000 /zImage-recovery;fatload usb 0:1 0x1000000 /RN104-recovery.dtb;fatload usb 0:1 0x3000000 /initrd-recovery.gz;bootz 0x2000000 0x3000000 0x1000000
Version=V1.0
autoload=no
baudrate=115200
bootargs=console=ttyS0,115200 earlyprintk root-dev/sde1
bootargs_end=:10.4.50.254:255.255.255.0:KW40:eth0:none
bootargs_orig=bootargs=console=ttyS0,115200
bootargs_root=root=/dev/nfs rw
bootcmd=nand read 0x2000000 0x200000 0x400000; nand read 0x3000000 0x800000 0x400000; bootm 0x2000000 0x3000000 0x1000000
bootcmd_fdt=tftpboot 0x2000000 $image_name;tftpboot $fdtaddr $fdtfile;setenv bootargs $console $mtdparts $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel; bootz 0x2000000 - $fdtaddr;
bootcmd_orig=bootcmd=nand read 0x2000000 0x200000 0x400000
bootcmd_ubi=ubi part ubifs; ubifsmount rootfs; ubifsload 0x2000000 kernel; ubifsload 0x3000000 initrd.gz; bootm 0x2000000 0x3000000 0x1000000
bootdelay=0
bootfile=uboot.bin
cacheShare=no
check_usb=usb start; fatload usb 0:1 0x2000000 /NTGR_USBBOOT_INFO.txt
console=console=ttyS0,115200
disL2Cache=yes
disaMvPnp=no
eeeEnable=no
enaAutoRecovery=yes
enaClockGating=yes
enaFPU=no
enaWrAllo=no
envver=3
eth1addr=00:50:43:02:00:00
eth1mtu=1500
ethact=egiga1
ethaddr=00:50:43:02:02:00
ethmtu=1500
ethprime=egiga1
fdt_skip_update=no
fdtaddr=0x1000000
fdtfile=armada-370-db.dtb
fileaddr=1200000
filesize=46707F
image_name=uImage
initrd_high=0xFFFFFFFF
initrd_name=uInitrd
ipaddr=192.168.1.5
loadaddr=0x02000000
loads_echo=0
mtddevname=u-boot
mtddevnum=0
mtdids=nand0=armada-nand
mtdparts=mtdparts=armada-nand:0x180000@0(u-boot),0x20000@0x180000(u-boot-env),0x600000@0x200000(uImage),0x400000@0x800000(minirootfs),-(ubifs)
mvNetConfig=switch_config=none
mv_pon_addr=00:50:43:00:00:02
nandEcc=1bit
netbsd_en=no
netmask=255.255.255.0
netretry=no
partition=nand0,0
pcieTune=no
pexMode=rc
pxe_files_load=:default.arm-armada370-db:default.arm-armadaxp:default.arm
pxefile_addr_r=3100000
rcvrip=169.254.100.100
rootpath=/srv/oneiric
sata_delay_reset=0
sata_dma_mode=yes
serverip=192.168.1.3
standalone=fsload 0x2000000 $image_name;setenv bootargs $console $mtdparts root=/dev/mtdblock0 rw ip=$ipaddr:$serverip$bootargs_end; bootm 0x2000000;
stderr=serial
stdin=serial
stdout=serial
usb0Mode=host
usb1Mode=host
usb2Mode=device
usbActive=0
vxworks_en=no
yuk_ethaddr=00:00:00:EE:51:81

Environment size: 2929/131068 bytes



Edited 1 time(s). Last edit at 09/17/2020 10:06AM by K20.
K20
Re: RN104 bricked
September 17, 2020 02:44PM
Good news :)

I have manage to write the uboot to the Nand and now am currently able to boot from nand every time I power on

Marvell>> setenv serverip 192.168.1.3
Marvell>> setenv ipaddr 192.168.1.2 
Marvell>> setenv gatewayip 192.168.1.1
Marvell>> tftpboot 0x000000000000 uboot.bin
egiga1 wait for link ....... no link (wait 6000 ms)
egiga0 wait for link .Done - link up.
Using egiga0 device
TFTP from server 192.168.1.3; our IP address is 192.168.1.2
Filename 'uboot.bin'.
Load address: 0x0
Loading: #############################################################
done
Bytes transferred = 894280 (da548 hex)
Marvell>> nand write 0x000000000000 0 0x000000180000          

NAND write: device 0 offset 0x0, size 0x180000
 1572864 bytes written: OK
Marvell>> 
K20
Re: RN104 bricked
September 17, 2020 03:21PM
I have no idea what to do next to restore it to OS6.

Could someone please help



Edited 1 time(s). Last edit at 09/17/2020 03:22PM by K20.
Re: RN104 bricked
September 17, 2020 04:14PM
K20,

> I have manage to write the uboot to the Nand and
> now am currently able to boot from nand every time
> I power on

Congrats! it is unbricked.

Ok so now there are few things to do.

1. At serial console prompt get the listing of the envs (NAND is empty, so the envs are from internal envs)

printenv
And please post the output here.

2. Search Netgear website to see if there is a recovery procedure using a USB thumb drive. If one exists, you can prepare that USB. Plug it in the front USB port, power up. Monitor serial console to see if the recovery starts automatically.

3. If there is no USB recovery available. Then you need the FW upgrade image from Netgear (or someone to provide their mtd backup files) and then you can flash them in serial console.

0: u-boot              0x000000180000		0x000000000000		0

You already flashed u-boot. So the other 4 mtds are to be rewritten.

1: u-boot-env          0x000000020000		0x000000180000		0
 2: uImage              0x000000600000		0x000000200000		0
 3: minirootfs          0x000000400000		0x000000800000		0
 4: ubifs               0x000007400000		0x000000c00000		0

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
K20
Re: RN104 bricked
September 17, 2020 05:36PM
Thanks a lot for your help bodhi , I really appreciate it :)
Outputs are as follows:

printenv

Marvell>> printenv
AC_Power_fail_detect=open
CASset=min
HW_version=MVT
MALLOC_len=5
Manufacturer=NETGEAR
NANDboot=nand read.e 0x2000000 0x200000 0x400000;nand read.e 0x1000000  0x7e00000 0x20000;nand read.e  0x3000000 0x800000 0x400000;bootz 0x2000000 0x3000000 0x1000000
Product=ReadyNAS 104
SKUNum=RN104
Startup=Normal
USBboot=fatload usb 0:1 0x2000000 /zImage-recovery;fatload usb 0:1 0x1000000 /RN104-recovery.dtb;fatload usb 0:1 0x3000000 /initrd-recovery.gz;bootz 0x2000000 0x3000000 0x1000000
Version=V1.0
autoload=no
baudrate=115200
bootargs=console=ttyS0,115200
bootargs_end=:10.4.50.254:255.255.255.0:KW40:eth0:none
bootargs_root=root=/dev/nfs rw
bootcmd=nand read 0x2000000 0x200000 0x400000; nand read 0x3000000 0x800000 0x400000; bootm 0x2000000 0x3000000 0x1000000
bootcmd_fdt=tftpboot 0x2000000 $image_name;tftpboot $fdtaddr $fdtfile;setenv bootargs $console $mtdparts $bootargs_root nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip$bootargs_end $mvNetConfig video=dovefb:lcd0:$lcd0_params clcd.lcd0_enable=$lcd0_enable clcd.lcd_panel=$lcd_panel; bootz 0x2000000 - $fdtaddr;
bootcmd_ubi=ubi part ubifs; ubifsmount rootfs; ubifsload 0x2000000 kernel; ubifsload 0x3000000 initrd.gz; bootm 0x2000000 0x3000000 0x1000000
bootdelay=0
cacheShare=no
check_usb=usb start; fatload usb 0:1 0x2000000 /NTGR_USBBOOT_INFO.txt
console=console=ttyS0,115200
disL2Cache=yes
disaMvPnp=no
eeeEnable=no
enaAutoRecovery=yes
enaClockGating=yes
enaFPU=no
enaWrAllo=no
envver=3
eth1addr=00:50:43:02:00:00
eth1mtu=1500
ethact=egiga1
ethaddr=00:50:43:02:02:00
ethmtu=1500
ethprime=egiga1
fdt_skip_update=no
fdtaddr=0x1000000
fdtfile=armada-370-db.dtb
image_name=uImage
initrd_high=0xFFFFFFFF
initrd_name=uInitrd
ipaddr=192.168.82.234
loadaddr=0x02000000
loads_echo=0
mtdids=nand0=armada-nand
mtdparts=mtdparts=armada-nand:0x180000@0(u-boot),0x20000@0x180000(u-boot-env),0x600000@0x200000(uImage),0x400000@0x800000(minirootfs),-(ubifs)
mvNetConfig=switch_config=none
mv_pon_addr=00:50:43:00:00:02
nandEcc=1bit
netbsd_en=no
netmask=255.255.255.0
netretry=no
pcieTune=no
pexMode=rc
pxe_files_load=:default.arm-armada370-db:default.arm-armadaxp:default.arm
pxefile_addr_r=3100000
rcvrip=169.254.100.100
rootpath=/srv/oneiric
sata_delay_reset=0
sata_dma_mode=yes
serverip=192.168.82.150
standalone=fsload 0x2000000 $image_name;setenv bootargs $console $mtdparts root=/dev/mtdblock0 rw ip=$ipaddr:$serverip$bootargs_end; bootm 0x2000000;
stderr=serial
stdin=serial
stdout=serial
usb0Mode=host
usb1Mode=host
usb2Mode=device
usbActive=0
vxworks_en=no
yuk_ethaddr=00:00:00:EE:51:81

Environment size: 2690/131068 bytes

I have manage to create a recovery USB however I am getting an error during boot ERROR: Could not find internal flash device!! I can access the NAS via telnet but with very limited access. I have tried old firmware ReadyNASOS_6.2.1-arm and new one ReadyNASOS-6.10.3-arm but getting the same output.

Power On!

FDT loaded successfully
Hit any key to stop autoboot:  0
(Re)start USB...
USB:   Active port:     0
Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
reading /uImage-recovery

3159060 bytes read
reading /initrd-recovery.gz

2729717 bytes read

NAND read: device 0 offset 0xd4000, size 0x6000
 24576 bytes read: OK
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-3.0.101.RN_ARM.4
   Created:      2015-04-01  23:06:44 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3158996 Bytes = 3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 03000000 ...
   Image Name:   initrd-recovery
   Created:      2017-12-22  19:19:16 UTC
   Image Type:   ARM Linux RAMDisk Image (lzma compressed)
   Data Size:    2729653 Bytes = 2.6 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
Skipping FDT on legacy kernel
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
  o 2 Giga ports supported
  o SKB recycle supported (Enabled)
  o NETA acceleration mode 1
  o RX Queue support: 8 Queues * 512 Descriptors
  o TX Queue support: 8 Queues * 512 Descriptors
  o GSO supported
  o GRO supported
  o Receive checksum offload supported
  o Transmit checksum offload supported
  o Driver ERROR statistics enabled

  o Loading network interface(s)

  o Port 0 is connected to Linux netdevice
        giga p=0: mtu=1500, mac=d002be44
    o eth0, ifindex = 2, GbE port = 0

  o Port 1 is connected to Linux netdevice
        giga p=1: mtu=1500, mac=d002be44
    o eth1, ifindex = 3, GbE port = 1

Starting USB Recovery...
ARCH: arm
Got systype=rn104
Searching for external boot flash device...sdb
Searching for external boot flash device...sdb
UBI device number 0, total 919 LEBs (116690944 bytes, 111.3 MiB), available 906                                                                                                                      LEBs (115040256 bytes, 109.7 MiB), LEB size 126976 bytes (124.0 KiB)
Internal flash attached
Searching for internal boot flash device...Did not find boot flash!
ERROR: Could not find internal flash device!!
Booting into debug mode...
udhcpc (v1.21.1) started
grep: /etc/resolv.conf: No such file or directory
Sending discover...
Sending select for 192.168.1.40...
Lease of 192.168.1.40 obtained, lease time 86400
deleting routers
route: SIOCDELRT: No such process
adding dns 192.168.1.1
Hostid: 43020200
/bin/ash: can't access tty; job control turned off
/ #
/ #
/ #



Edited 2 time(s). Last edit at 09/17/2020 06:09PM by K20.
K20
Re: RN104 bricked
September 17, 2020 05:44PM
Also I can get following files from ReadyNASOS-6.10.3-arm FW which is for my NAS model.

csums.md5
initrd.gz
kernel.arm
u-boot-rn104-2.0.img
initrd-recovery.gz
uImage-recovery

I think root.tlz is the FW itself which is 58.2MB
K20
Re: RN104 bricked
September 17, 2020 05:57PM
Also I was wondering the way I wrote the uboot to the nand is correct?

tftpboot 0x000000000000 uboot.bin
nand write 0x000000000000 0 0x000000180000


The reason why I have asked you is that when I try to write below to other partitions in nand it just write to 0x0 which stopped the uboot boot on the next reboot and then I have to kwboot => nand erase.chip => tftpboot and then nand write 0x000000000000 0 0x000000180000

I am trying to write below to nand partitions (is this is a correct way?)
tftp 0x000000180000 kernel.arm
nand write  0x000000180000 0 0x000000020000

tftp 0x000000200000 uImage-recovery
nand write 0x000000200000 0 0x000000600000

Also, please confirm which files needs to be written to these partition from the FW

1: u-boot-env          0x000000020000		0x000000180000		0
 2: uImage              0x000000600000		0x000000200000		0
 3: minirootfs          0x000000400000		0x000000800000		0
 4: ubifs               0x000007400000		0x000000c00000		0

csums.md5
initrd.gz
kernel.arm
u-boot-rn104-2.0.img
initrd-recovery.gz
uImage-recovery



Edited 7 time(s). Last edit at 09/17/2020 06:14PM by K20.
Re: RN104 bricked
September 17, 2020 06:37PM
K20,

Looks like the recovery is working. So now you just need to upgrade FW.

Usually the recovery FW enable you to log in and interact with the box so you can upgrade FW using their official procedure. I don't think you need to do it manually. Find the stock FW upgrade procedure at Netgear website and follow that.

I wanted to see the envs listing to determine if the USB recovery process is implemented in the boot envs. And it looks like it is implemented internally inside this u-boot (not through envs).

I'm not famiiar with stock FW so really can't advise you about the details how to do restore stock FW manually.

If you are interested in running latest kernel and Debian then see:

Working thread:
https://forum.doozan.com/read.php?2,106589

Installation Instruction for RN102 (should be same as RN104):
https://forum.doozan.com/read.php?2,92514

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
K20
Re: RN104 bricked
September 18, 2020 05:04AM
Thanks bodhi for your replay,

The only recovery procedure they have got is to copy all the files to USB put the USB to front port and hold backup button while power on, the device this should automatically complete the recovery (firmware update) which I am doing from many hours with no success.

I have found on netgear forum that this is a very common problem which happened to many users after the firmware update and there NAS goes to the telnet mode (tech support mode) and they paid netgear support to fix the issue.

I think my recovery is failing because it could not find internal flash device this could be due to the fact that I have erased the nand previously and I need set up partitions manually for it to write the firmware

I really want to learn the manual recovery with your help. I was wounding if you can teach me how to write the files to each mtds and which files to write to the mtds partition.

I have got following files in the FW, I just need to write them manually without overwriting the u-boot

csums.md5
initrd.gz
kernel.arm
u-boot-rn104-2.0.img
initrd-recovery.gz
uImage-recovery

0: u-boot              0x000000180000		0x000000000000		0
 1: u-boot-env          0x000000020000		0x000000180000		0
 2: uImage              0x000000600000		0x000000200000		0
 3: minirootfs          0x000000400000		0x000000800000		0
 4: ubifs               0x000007400000		0x000000c00000		0



Edited 1 time(s). Last edit at 09/18/2020 05:13AM by K20.
tme
Re: RN104 bricked
September 18, 2020 01:11PM
Hi K20,

In Tech Support mode you have a root file system in RAM. It includes 'dropbear', so you may use 'ssh' (in stead of 'telnet') for login and 'scp' to copy the binaries to the /tmp directory on the box. The pass word for 'root' in Tech Support mode is 'infr8ntdebug' (without the quotes).

In Tech Support mode, most commands are provided by 'busybox'. I do not remember if 'nandwrite' is supported by this 'busybox'. Just issue the command with no arguments and you know.

If 'nandwrite' is mising, you may try
apt install -y mtd-utils
or
apt-get install -y mtd-utils
to install 'nandwrite'.

If neigther 'nandwrite' nor 'apt' is supported by 'busybox', the way to proceed is with the command
nrutil chroot
This command swaps the root file system in RAM with a root file system on the first RAID partition on a HDD or SSD in slot 1, so for this to work you must have a disk with the (unpacked) stock firmware on it.

'nrutil' is is Netgear's "Swiss Army Knife" tool:
rnutil --help
Usage: rnutil COMMAND [OPTIONS]
  event_push          push a system event to the UI
  get_disk_info       print a list of all attached disks and disk information
  check_ups_drv       check and possibly start network ups drivers
  rn_shutdown         shutdown readynasd and system gracefully
  rn_lcd              LCD display
  remote_access       start a remote access session for tech support
  volume_util         perform volume operations
  mkhomedir_helper    home subvolume creator for PAM
  disk_event_handler  handler for disk events
  hotplug_event       notifier for hotplug events
  md_event            notifier for MD RAID events
  start_raids         start all MD RAID arrays
  volume_schedule     start volume schedule job
  spindown_schedule   start spindown schedule job
  backup_md           backup MD RAID superblocks
  bit_rot_event       bit rot events
  firmware_update     check for firmware update
  apt_wait            Wait for an APT lock to release
  create_system_log   Create system log archive
  diagnostics         Run system diagnostics
  blink               Locate the NAS with LEDs
  bluetooth_event     Bluetooth events
  dump_sysflags       List systype flags or check if flag is set for system
  clamav_event        ClamAV events
  antivirus_scan_rootfscan antivirus in rootfs
  list                list all personalities
  help                print this help text
I don't know what 'nrutil firmware_update' does, but if you have a broken system I guess it cannot make things much worse.

A word of warning: Please remove any disks with valuable data from the box before entering Tech Support mode, or you may accidentally wipe the disk.

Regards,
Trond Melen
Re: RN104 bricked
September 18, 2020 04:47PM
K20,

Try what tme suggested above about "Tech Support" mode.

If you still cannot recover then the next step is to reflash your box using a good set of mtds back up. Because your NAND mtds were erased. You need to reflash all 5 mtds.


device nand0 <armada-nand>, # parts = 5
 #: name		size		offset		mask_flags
 0: u-boot              0x000000180000		0x000000000000		0
 1: u-boot-env          0x000000020000		0x000000180000		0
 2: uImage              0x000000600000		0x000000200000		0
 3: minirootfs          0x000000400000		0x000000800000		0
 4: ubifs               0x000007400000		0x000000c00000		0

active partition: nand0,0 - (u-boot) 0x000000180000 @ 0x000000000000

defaults:
mtdids  : none
mtdparts: none

Let me know in a day or two whether you are successful.

And if you still need to restore from mtds backup, post back and I'll give you some instructions to do that. And if you have access to another good RN104 box, then you can back up your own mtds and use those files to rescue this box.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
K20
Re: RN104 bricked
September 19, 2020 10:38AM
Thanks for the replay all,

I have checked the Tech Support mode is completely useless "apt" and "nandwrite" doesn't work, "rnutil chroot" doesn't write anything, "rnutil firmware_update" doest update anything

I have bought another NAS (same model) and connected to the console and to see hows everything runs and try to replicate.
I dont know how I can extract the files from the good one however I have compared the output of "printenv" and "mtdparts" which appears to be the same.

Doing more research and found I was doing few mistakes while I was writing files to the nand qnd I was writing like this

tftpboot 0x000000000000 uboot.bin
nand write 0x000000000000 0 0x000000180000

tftp 0x000000180000 kernel.arm
nand write  0x000000180000 0 0x000000020000

tftp 0x000000200000 uImage-recovery
nand write 0x000000200000 0 0x000000600000

I also, I didn't knew which files to use and after few trial and error I figured out the files as well.
K20
Re: RN104 bricked
September 19, 2020 11:06AM
So I did this way:


nand erase.chip 

Marvell>> setenv serverip 192.168.1.3
Marvell>> setenv ipaddr 192.168.1.2 
Marvell>> setenv gatewayip 192.168.1.1

Marvell>> tftpboot 0x000000000000 uboot.bin
Using egiga0 device
TFTP from server 192.168.1.3; our IP address is 192.168.1.2
Filename 'uboot.bin'.
Load address: 0x0
Loading: #############################################################
done
Bytes transferred = 894280 (da548 hex)
Marvell>> nand write 0x000000000000 0x000000020000 0x000000180000

NAND write: device 0 offset 0x20000, size 0x180000
 1572864 bytes written: OK
Marvell>> tftpboot 0x2000000 kernel.arm 
Using egiga0 device
TFTP from server 192.168.1.3; our IP address is 192.168.1.2
Filename 'kernel.arm'.
Load address: 0x2000000
Loading: #################################################################
	 #################################################################
	 #################################################################
	 ##########################################
done
Bytes transferred = 3474632 (3504c8 hex)
Marvell>> nand write 0x2000000 0x200000 0x400000 

NAND write: device 0 offset 0x200000, size 0x400000
 4194304 bytes written: OK
Marvell>> tftpboot 0x3000000 initrd.gz 
Using egiga0 device
TFTP from server 192.168.1.3; our IP address is 192.168.1.2
Filename 'initrd.gz'.
Load address: 0x3000000
Loading: #################################################################
	 #################################################################
	 #################################################################
	 #######################################
done
Bytes transferred = 3425169 (344391 hex)
Marvell>> nand write 0x3000000 0x800000 0x400000

NAND write: device 0 offset 0x800000, size 0x400000
 4194304 bytes written: OK
Marvell>> boot

## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-4.4.190.armada.1
   Created:      2019-10-28   2:07:50 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3474568 Bytes = 3.3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 03000000 ...
   Image Name:   initramfs
   Created:      2020-02-12   1:13:27 UTC
   Image Type:   ARM Linux RAMDisk Image (lzma compressed)
   Data Size:    3425105 Bytes = 3.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Kernel Image ... OK
   Loading Ramdisk to 1f6aa000, end 1f9ee351 ... OK
   Using Device Tree in place at 01000000, end 010068e5
Updating device tree successful

Starting kernel ...


Starting the boot process...
Detected system type: RN104
Loading kernel modules...done
Boot mode: Normal
UBI device number 0, total 919 LEBs (116690944 bytes, 111.3 MiB), available 915 LEBs (116183040 bytes, 110.8 MiB), LEB size 126976 bytes (124.0 KiB)
Searching for disks (5)...
Bringing up network...done
ERROR: Could not resolve host: update.readynas.com
command failed: /usr/bin/rnutil firmware_update
mdadm: array /dev/md0 started.
mke2fs 1.42.13 (17-May-2015)
Discarding device blocks: done                            
Creating filesystem with 1047552 4k blocks and 1048576 inodes
Filesystem UUID: 1ea9e77c-a133-4bd0-bb95-b6b9db536643
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done 

Extracting root image...ERROR: Could not mount boot flash [/dev/ubi0_0] (Invalid argument)

Welcome to ReadyNASOS
nas-02-02-00 login: command failed: mdev -s
command failed: /usr/sbin/telnetd

Welcome to ReadyNASOS
nas-02-02-00 login:

The files I have used are " uboot.bin" , "kernel.arm" , "initrd.gz" is from 6.10.3 FW
https://kb.netgear.com/000061727/ReadyNAS-OS-6-Software-Version-6-10-3



Edited 1 time(s). Last edit at 09/19/2020 11:11AM by K20.
K20
Re: RN104 bricked
September 19, 2020 11:21AM
Now I cant login to the OS yet with default credentials as I need to load boot flash image.

So, I have used my working readynas, I have inserted a blank disk and went to the GUI and restored the readynas to its default setting. This way boot flash image was loaded into the blank HDD.

I have now inserted this HDD to non working NAS and while booting it picked up the image from the HDD. (like debian environment does)

|  \/  | __ _ _ ____   _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| |  | | (_| | |   \ V /  __/ | |
|_|  |_|\__,_|_|    \_/ \___|_|_|
         _   _     ____              _
        | | | |   | __ )  ___   ___ | |_ 
        | | | |___|  _ \ / _ \ / _ \| __| 
        | |_| |___| |_) | (_) | (_) | |_ 
         \___/    |____/ \___/ \___/ \__| 
 ** LOADER **


U-Boot 2011.12-gec25d27-dirty (Oct 26 2015 - 16:56:14) Marvell version: v2011.12 2014_T2.0p1 
06/23/2015 ReadyNAS-104 V2.0

Board: DB-88F6710-BP
SoC:   MV6710 A1
CPU:   Marvell PJ4B v7 UP (Rev 1) LE
       CPU    @ 1200 [MHz]
       L2     @ 600 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 600 [MHz]
       DDR 16Bit Width, FastPath Memory Access
DRAM:  512 MiB

Map:   Code:		0x1feef000:0x1ff9f514
       BSS:		0x1ffef8a0
       Stack:		0x1f9eeef8
       Heap:		0x1f9ef000:0x1feef000

NAND:  (ID 0xf1ad)	128 MiB
MMC:   MRVL_MMC: 0
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
nand_read_bbt: Bad block at 0x000002120000
nand_read_bbt: Bad block at 0x000004580000
nand_read_bbt: Bad block at 0x000007640000

Initialize and scan all PCI interfaces
PEX unit.port(active IF[-first bus]):
------------------------------------------
PEX 0: Root Complex Interface, Detected Link X1, GEN 2.0
PEX 1: Root Complex Interface, Detected Link X1, GEN 2.0
FPU not initialized
USB 0: Host Mode
USB 1: Host Mode
Shutting down unused interfaces:
       SDIO
       AUDIO
       TDM
Modules/Interfaces Detected:
       RGMII0 Phy
       RGMII1 Phy
       PEX0 (Lane 0)
       PEX1 (Lane 1)
       SATA0 (Lane 2)
       SATA1 (Lane 3)
Net:   egiga0, egiga1 [PRIME]
Power On!

FDT loaded successfully
Hit any key to stop autoboot:  0 

NAND read: device 0 offset 0x200000, size 0x400000
 4194304 bytes read: OK

NAND read: device 0 offset 0x800000, size 0x400000
 4194304 bytes read: OK
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-4.4.190.armada.1
   Created:      2019-10-28   2:07:50 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3474568 Bytes = 3.3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 03000000 ...
   Image Name:   initramfs
   Created:      2020-02-12   1:13:27 UTC
   Image Type:   ARM Linux RAMDisk Image (lzma compressed)
   Data Size:    3425105 Bytes = 3.3 MiB
   
   
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Kernel Image ... OK
   Using Ramdisk in place at 03000040, end 03344391
   Using Device Tree in place at 01000000, end 010068e5
Updating device tree successful

Starting kernel ...

[    4.082785] rtc-isl12057 0-0068: _isl12057_rtc_read_time: oscillator failure bit set, continuing anyway
[    4.094643] rtc-isl12057 0-0068: _isl12057_rtc_read_time: oscillator failure bit set, continuing anyway
[    4.106071] rtc-isl12057 0-0068: _isl12057_rtc_read_time: oscillator failure bit set, continuing anyway
[    4.264428] rtc-isl12057 0-0068: _isl12057_rtc_read_time: oscillator failure bit set, continuing anyway

Starting the boot process...
Detected system type: RN104
Loading kernel modules...done
Boot mode: Normal
UBI device number 0, total 917 LEBs (116436992 bytes, 111.0 MiB), available 9 LEBs (1142784 bytes, 1.1 MiB), LEB size 126976 bytes (124.0 KiB)
Searching for disks (5)...
Bringing up network...eth0.done
name:    ReadyNASOS
version: 6.10.3
verno:   6010003
time:    1581469513
arch:    arm
size:    77369344
md5sum:  fe0afd1f70df930a070482a2ddbcee19
descr:   ReadyNASOS

Not downgrading firmware.
mdadm: array /dev/md0 started.
mke2fs 1.42.13 (17-May-2015)
Discarding device blocks: done                            
Creating filesystem with 1047552 4k blocks and 1048576 inodes
Filesystem UUID: 701b6498-5bfc-4685-8c07-cb682cd998be
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done 

Extracting root image...done
Bringing up RAID arrays...done
e2fsck 1.42.13 (17-May-2015)
/dev/md0 is mounted.
e2fsck: Cannot continue, aborting.


Swap array is not optimal -- trying to recreate...can't.  Found no usable partitions.
lib/systemd/system/apps.mount
lib/systemd/system/home.mount
var/lib/connman/settings
etc/exports
etc/group
etc/snmp/snmpd.conf
etc/aliases
etc/nsswitch.conf
etc/passwd
etc/environment
etc/shadow
etc/timezone
etc/hostname
etc/fstab
etc/forked-daapd.conf
etc/proftpd/proftpd.conf
etc/pam.d/common-auth
etc/pam.d/common-account
etc/samba/smb.conf
etc/frontview/apache/Shares.conf
etc/frontview/apache/http-share-redirect.conf
etc/frontview/apache/http-redirect.conf
etc/frontview/apache/apps-https.conf
etc/frontview/rn_audit.conf
etc/frontview/proftpd/Shares.conf
etc/frontview/proftpd/proftpd.conf.overrides
etc/frontview/samba/Shares.conf
etc/frontview/samba/dfs.conf
etc/frontview/samba/Shares.conf.admin
etc/frontview/samba/usermap.conf
etc/frontview/account.conf
etc/frontview/rsync/Shares.conf
etc/ssh/sshd_config
etc/netatalk/extmap.conf
etc/netatalk/afp.conf
etc/readytivo.conf
etc/default/locale
etc/default/noflushd
etc/default/nfs-kernel-server
etc/default/services
etc/nut/upsd.conf
etc/nut/nut.conf
etc/nut/upsd.users
etc/nut/ups.conf
etc/nut/upsmon.conf
etc/clamav/clamd.conf
etc/hosts
etc/readydrop/readydropd.conf
etc/sysconfig/snapper
etc/systemd/system/multi-user.target.wants/apps.mount
etc/systemd/system/multi-user.target.wants/home.mount
etc/alternatives/editor
etc/alternatives/vi
etc/alternatives/rview
etc/alternatives/ex
etc/localtime
etc/gshadow
bin/ping6
bin/ping
opt/p2p/conf/lnconfiguration.xml
opt/remote/conf/lnallshares.xml
opt/remote/conf/lnvpnshares.xml
opt/remote/conf/lnfoldershares.xml
opt/remote/conf/lnremoteconfig.xml
usr/share/glib-2.0/schemas/gschemas.compiled
Switching root to RAID device.


Welcome to ReadyNASOS 6.10.3!

[  OK  ] Reached target Encrypted Volumes.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Created slice User and Session Slice.
[  OK  ] Listening on Journal Socket.
[  OK  ] Reached target Remote File Systems (Pre).
[  OK  ] Reached target Remote File Systems.
[  OK  ] Created slice System Slice.
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  OK  ] Started ReadyNAS LCD splasher.
         Starting ReadyNASOS system prep...
         Starting Load Kernel Modules...
         Starting Remount Root and Kernel File Systems...
         Starting Journal Service...
[  OK  ] Reached target Slices.
         Mounting POSIX Message Queue File System...
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Reached target Paths.
         Starting Create Static Device Nodes in /dev...
[  OK  ] Created slice system-getty.slice.
[  OK  ] Listening on udev Control Socket.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Started Load Kernel Modules.
[  OK  ] Started Remount Root and Kernel File Systems.
[  OK  ] Started Create Static Device Nodes in /dev.
         Starting udev Kernel Device Manager...
         Starting Rebuild Hardware Database...
         Starting Load/Save Random Seed...
         Mounting FUSE Control File System...
         Starting Apply Kernel Variables...
         Mounting Configuration File System...
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Mounted Configuration File System.
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Apply Kernel Variables.
         Starting MD arrays...
[  OK  ] Started MD arrays.
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Swap.
[  OK  ] Reached target Local File Systems.
[  OK  ] Started Journal Service.
         Starting Flush Journal to Persistent Storage...
[  OK  ] Started Flush Journal to Persistent Storage.
         Starting Create Volatile Files and Directories...
[  OK  ] Started Create Volatile Files and Directories.
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started Rebuild Hardware Database.
         Starting udev Coldplug all Devices...
[  OK  ] Started udev Coldplug all Devices.
         Starting udev Wait for Complete Device Initialization...
[  OK  ] Found device /dev/ttyS0.
[  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
[  OK  ] Started udev Wait for Complete Device Initialization.
[  OK  ] Started ReadyNASOS system prep.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Started Log Truncate Timer.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
[  OK  ] Started MD repair service.
[  OK  ] Started MD monitoring service.
[  OK  ] Started Reset I2C.
         Starting Login Service...
[  OK  ] Started Regular background program processing daemon.
[  OK  ] Started RAIDar discovery service.
[  OK  ] Started Timer for ReadyNAS Update Service.
[  OK  ] Reached target Timers.
         Starting Avahi mDNS/DNS-SD Stack...
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Started Avahi mDNS/DNS-SD Stack.
         Starting Connection service...
[  OK  ] Started Connection service.
[  OK  ] Started Login Service.
         Starting Wait until network is up...
[  OK  ] Reached target Network.
         Starting Permit User Sessions...
         Starting Hostname Service...
[  OK  ] Started Permit User Sessions.
[  OK  ] Started Hostname Service.
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Started Getty on tty1.
[  OK  ] Reached target Login Prompts.

ReadyNASOS 6.10.3 nas-36-66-02 ttyS0

nas-36-66-02 login:


Now I need to find out how to write the img to the NAS nand flash



Edited 2 time(s). Last edit at 09/19/2020 04:25PM by K20.
K20
Re: RN104 bricked
September 19, 2020 11:31AM
OK, I have tried to restore the NAS to its default settings and update the firmare but its still not copying the FW to the nand.

Potentially I need to create UBIFS partition, which I am working on now.

I ran a command on working NAS "ubi info" but there is no partition table.

I don't now which partition to write the img to and how too...

0: u-boot              0x000000180000		0x000000000000		0
 1: u-boot-env          0x000000020000		0x000000180000		0
 2: uImage              0x000000600000		0x000000200000		0
 3: minirootfs          0x000000400000		0x000000800000		0
 4: ubifs               0x000007400000		0x000000c00000		0



Any idea where to start on this?
tme
Re: RN104 bricked
September 19, 2020 02:42PM
Hi K20,

Quote

I have checked, the Tech Support mode is completely useless "apt" and "nandwrite" doesn't work, "rnutil chroot" doesn't write anything, "rnutil firmware_update" doest update anything

As I wrote, for 'rnutil chroot' to work you must have a disk with the (unpacked) stock firmware on it. Now that you have 2 boxes, you can create the necessary drive. On the working box you do "OS reinstall" as described here in the last 3 paragraphs. Then you move the drive to the defective box, boot it into Tech Support mode and do 'rnutil chroot'. Then you have root access to a full fledged Linux system and nothing can stop you from success!

Regards,
Trond Melen
Re: RN104 bricked
September 19, 2020 04:29PM
K20,

Congrats! Now you have unbricked the box, and can log in stock OS.

 0: u-boot              0x000000180000		0x000000000000		0
 1: u-boot-env          0x000000020000		0x000000180000		0
 2: uImage              0x000000600000		0x000000200000		0
 3: minirootfs          0x000000400000		0x000000800000		0
 4: ubifs               0x000007400000		0x000000c00000		0

And you did restore partition 0,1,2 above.

Marvell>> nand write 0x000000000000 0x000000020000 0x000000180000
Marvell>> nand write 0x2000000 0x200000 0x400000 
Marvell>> nand write 0x3000000 0x800000 0x400000


So the remaining partitions 3 and 4 need to be restored.

Log in to the good box as root (or become root after log in).

Create directory to keep the backup.
mkdir -p /media/mtd_backup
cd /media/mtd_backup


Dumping NAND partition 3 and 4 (if the nandwrite command does not have the options as below, then do "nandwrite --help" to see the correct options syntax).
nanddump --noecc --omitoob -f mtd3.minirootfs.rn104 /dev/mtd3
nanddump --noecc --omitoob -f mtd4.ubifs.rn104 /dev/mtd4

Mount a USB thumb drive and copy /mtd_backup to it.

And then bring it to the bricked box, mount it. Assuming it is mount at /media/sdb1.

Doublecheck the partition layout one more time before flashing
cat /proc/mtd
If it is good, go ahead and flash
cd /media/sdb1/mtd_backup
nandwrite  /dev/mtd3 mtd3.minirootfs.rn104
nandwrite  /dev/mtd4 mtd4.ubifs.rn104 /dev/ubifs

And shutdown. Remove the HDD and power up.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 09/19/2020 04:35PM by bodhi.
K20
Re: RN104 bricked
September 19, 2020 06:14PM
Thanks for your reply Trond.

I have followed your instructions and logged on to "Tech Support mode" and 'rnutil chroot' command does work which gives me the root access but I cant find nand, ubifs, minirootfs partions for the image to written.

Following portions are not visible and I think the sits on the top of uboot not the readynas kernel

0: u-boot              0x000000180000		0x000000000000		0
 1: u-boot-env          0x000000020000		0x000000180000		0
 2: uImage              0x000000600000		0x000000200000		0
 3: minirootfs          0x000000400000		0x000000800000		0
 4: ubifs               0x000007400000		0x000000c00000		0


Also I can login to readynas os via normal boot as the OS files sits on HDD

The issue is that the base OS image needs to be written to nand so in future if I change the drive or restore to default setting the original FW image get written to the drives from nand.

Can anyone please help me to written default FW image to nand via ubifs ?

Please take a look at this https://forum.doozan.com/read.php?3,95249 and see last 3 reply, I am on that stage.



Edited 2 time(s). Last edit at 09/19/2020 06:19PM by K20.
Re: RN104 bricked
September 19, 2020 06:34PM
K20,

Quote

Can anyone please help me to written default FW image to nand via ubifs ?

I just did above.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
tme
Re: RN104 bricked
September 19, 2020 06:39PM
Quote
K20
'rnutil chroot' command does work which gives me the root access but I cant find nand, ubifs, minirootfs partions for the image to written.

Now you may install any tool you like, for instance:
apt install -y mtd-utils u-boot-tools

Now can do 'cat /proc/mtd', and you have 'writenand'. And if the '/etc/fw_env.config' is set up correctly then 'fw_printenv' and 'fw_savenv' both work as well.

Regards,
Trond Melen

EDIT: Typo: 'u-boot-tools' was spelled with a 'y'. :TIDE



Edited 1 time(s). Last edit at 09/19/2020 10:12PM by tme.
K20
Re: RN104 bricked
September 19, 2020 07:23PM
Quote
I just did above.

-bodhi


Thanks bodhi for your replay,
I am really happy with what I have manage to archive so far with no linux knowledge/background and I had my first linux OS install 3 days ago to run kwboot, so much more to learn. This website is so awesome and everyone here has so much knowledge :)

Back to the issue:
NAS OS doesn't have "nanddump" "nandwrite " or "nand"
OS version is

root@20B:/# cat /etc/os-release
PRETTY_NAME="ReadyNASOS 6.10.3"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/";
SUPPORT_URL="http://www.debian.org/support";
BUG_REPORT_URL="https://bugs.debian.org/";


root@20B:/# help
GNU bash, version 4.3.30(1)-release (arm-unknown-linux-gnueabi)
These shell commands are defined internally.  Type `help' to see this list.
Type `help name' to find out more about the function `name'.
Use `info bash' to find out more about the shell in general.
Use `man -k' or `info' to find out more about commands not in this list.

A star (*) next to a name means that the command is disabled.

 job_spec [&]                                                                                                          history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]
 (( expression ))                                                                                                      if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi
 . filename [arguments]                                                                                                jobs [-lnprs] [jobspec ...] or jobs -x command [args]
 :                                                                                                                     kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
 [ arg... ]                                                                                                            let arg [arg ...]
 [[ expression ]]                                                                                                      local [option] name[=value] ...
 alias [-p] [name[=value] ... ]                                                                                        logout [n]
 bg [job_spec ...]                                                                                                     mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]
 bind [-lpsvPSVX] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readli>  popd [-n] [+N | -N]
 break [n]                                                                                                             printf [-v var] format [arguments]
 builtin [shell-builtin [arg ...]]                                                                                     pushd [-n] [+N | -N | dir]
 caller [expr]                                                                                                         pwd [-LP]
 case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac                                                            read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]
 cd [-L|[-P [-e]] [-@]] [dir]                                                                                          readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]
 command [-pVv] command [arg ...]                                                                                      readonly [-aAf] [name[=value] ...] or readonly -p
 compgen [-abcdefgjksuv] [-o option]  [-A action] [-G globpat] [-W wordlist]  [-F function] [-C command] [-X filterp>  return [n]
 complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-W wordlist]  [-F function] [-C command]>  select NAME [in WORDS ... ;] do COMMANDS; done
 compopt [-o|+o option] [-DE] [name ...]                                                                               set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
 continue [n]                                                                                                          shift [n]
 coproc [NAME] command [redirections]                                                                                  shopt [-pqsu] [-o] [optname ...]
 declare [-aAfFgilnrtux] [-p] [name[=value] ...]                                                                       source filename [arguments]
 dirs [-clpv] [+N] [-N]                                                                                                suspend [-f]
 disown [-h] [-ar] [jobspec ...]                                                                                       test [expr]
 echo [-neE] [arg ...]                                                                                                 time [-p] pipeline
 enable [-a] [-dnps] [-f filename] [name ...]                                                                          times
 eval [arg ...]                                                                                                        trap [-lp] [[arg] signal_spec ...]
 exec [-cl] [-a name] [command [arguments ...]] [redirection ...]                                                      true
 exit [n]                                                                                                              type [-afptP] name [name ...]
 export [-fn] [name[=value] ...] or export -p                                                                          typeset [-aAfFgilrtux] [-p] name[=value] ...
 false                                                                                                                 ulimit [-SHabcdefilmnpqrstuvxT] [limit]
 fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]                                                      umask [-p] [-S] [mode]
 fg [job_spec]                                                                                                         unalias [-a] name [name ...]
 for NAME [in WORDS ... ] ; do COMMANDS; done                                                                          unset [-f] [-v] [-n] [name ...]
 for (( exp1; exp2; exp3 )); do COMMANDS; done                                                                         until COMMANDS; do COMMANDS; done
 function name { COMMANDS ; } or name () { COMMANDS ; }                                                                variables - Names and meanings of some shell variables
 getopts optstring name [arg]                                                                                          wait [-n] [id ...]
 hash [-lr] [-p pathname] [-dt] [name ...]                                                                             while COMMANDS; do COMMANDS; done
 help [-dms] [pattern ...]                                                                                             { COMMANDS ; }



Edited 2 time(s). Last edit at 09/19/2020 07:49PM by K20.
K20
Re: RN104 bricked
September 19, 2020 07:35PM
Thanks Trond for your reply

Quote
Now you may install any tool you like, for instance:
apt install -y mtd-utils y-boot-tools


I am unable to get the package and NAS is connected to the internet

root@nas-36-66-02:~# apt install -y mtd-utils y-boot-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package y-boot-tools
Re: RN104 bricked
September 19, 2020 09:13PM
K20,

> NAS OS doesn't have "nanddump" "nandwrite " or
> "nand"

Download the bin pack that I uploaded:

https://forum.doozan.com/read.php?3,27280

Extract it to a folder somehwere in your good box. Let say it is in /media. And when you execute each command, it must be executed as the binary is in the current folder (replace this in the commnands I posted above with ./nanddump and ./nandwrite).

cd /media/tools

./nanddump
so on.

and then in the bricked box, do the same when you execute nandwrite

cd /media/tools

./nandwrite

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
tme
Re: RN104 bricked
September 19, 2020 10:20PM
Hi K20,

Quote

E: Unable to locate package y-boot-tools

Sorry! I didn't check my spelling carefully enough. There is no such thing as 'y-boot'. Edited in original post:
apt install -y mtd-tools u-boot-tools

Regards,
Trond Melen
K20
Re: RN104 bricked
September 20, 2020 01:55PM
Quote
then in the bricked box, do the same when you execute nandwrite

Thanks bodhi for your replay,
I have followed your instructions and manage to extract the partitions 3 and 4 from the good NAS and wrote to nand via following command:

./nandwrite /dev/mtd3 mtd3.minirootfs.rn104
./nandwrite /dev/mtd4 mtd4.ubifs.rn104


Broken NAS still cant find the OS from the flash/nand
Installed the OS HDD and booted back
Then I have copied all the partitions from good NAS to USB
./nanddump --noecc --omitoob -f mtd0.u-boot.rn104 /dev/mtd0
./nanddump --noecc --omitoob -f mtd1.u-boot-env.rn104 /dev/mtd1
./nanddump --noecc --omitoob -f mtd2.uImage.rn104 /dev/mtd2
./nanddump --noecc --omitoob -f mtd3.minirootfs.rn104 /dev/mtd3
./nanddump --noecc --omitoob -f mtd4.ubifs.rn104 /dev/mtd4


Ran following commands to write partition to the broken one.
./nandwrite /dev/mtd0 mtd0.u-boot.rn104
./nandwrite /dev/mtd1 mtd1.u-boot-env.rn104
./nandwrite /dev/mtd2 mtd2.uImage.rn104
./nandwrite /dev/mtd3 mtd3.minirootfs.rn104
./nandwrite /dev/mtd4 mtd4.ubifs.rn104


All partition wrote fine except mtd1
root@nas-36-66-02:/media/USB_FLASH_1/nand# ./nandwrite /dev/mtd1 mtd1.u-boot-env.rn104
nandwrite: error!: /dev/mtd1
           error 13 (Permission denied)

Powered on the NAS but it did not boot the uboot.
Now going to do kwboot



Edited 3 time(s). Last edit at 09/20/2020 02:17PM by K20.
K20
Re: RN104 bricked
September 20, 2020 03:41PM
Removed OS HDD
Booted kwboot
Write 0, 1, 2 partition old way.
Write 3, 4 as you have instructed.
Serial output as follows:

 __   __                      _ _
|  \/  | __ _ _ ____   _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| |  | | (_| | |   \ V /  __/ | |
|_|  |_|\__,_|_|    \_/ \___|_|_|
         _   _     ____              _
        | | | |   | __ )  ___   ___ | |_ 
        | | | |___|  _ \ / _ \ / _ \| __| 
        | |_| |___| |_) | (_) | (_) | |_ 
         \___/    |____/ \___/ \___/ \__| 
 ** LOADER **


U-Boot 2011.12-gec25d27-dirty (Oct 26 2015 - 16:56:14) Marvell version: v2011.12 2014_T2.0p1 
06/23/2015 ReadyNAS-104 V2.0

Board: DB-88F6710-BP
SoC:   MV6710 A1
CPU:   Marvell PJ4B v7 UP (Rev 1) LE
       CPU    @ 1200 [MHz]
       L2     @ 600 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 600 [MHz]
       DDR 16Bit Width, FastPath Memory Access
DRAM:  512 MiB

Map:   Code:		0x1feef000:0x1ff9f514
       BSS:		0x1ffef8a0
       Stack:		0x1f9eeef8
       Heap:		0x1f9ef000:0x1feef000

NAND:  (ID 0xf1ad)	128 MiB
MMC:   MRVL_MMC: 0
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
nand_read_bbt: Bad block at 0x000001660000

Initialize and scan all PCI interfaces
PEX unit.port(active IF[-first bus]):
------------------------------------------
PEX 0: Root Complex Interface, Detected Link X1, GEN 2.0
PEX 1: Root Complex Interface, Detected Link X1, GEN 2.0
FPU not initialized
USB 0: Host Mode
USB 1: Host Mode
Shutting down unused interfaces:
       SDIO
       AUDIO
       TDM
Modules/Interfaces Detected:
       RGMII0 Phy
       RGMII1 Phy
       PEX0 (Lane 0)
       PEX1 (Lane 1)
       SATA0 (Lane 2)
       SATA1 (Lane 3)
Net:   egiga0, egiga1 [PRIME]
Power On!

FDT loaded successfully
Hit any key to stop autoboot:  0 

NAND read: device 0 offset 0x200000, size 0x400000
 4194304 bytes read: OK

NAND read: device 0 offset 0x800000, size 0x400000
 4194304 bytes read: OK
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-4.4.190.armada.1
   Created:      2019-10-28   2:07:50 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3474568 Bytes = 3.3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 03000000 ...
   Image Name:   initramfs
   Created:      2020-02-12   1:13:27 UTC
   Image Type:   ARM Linux RAMDisk Image (lzma compressed)
   Data Size:    3425105 Bytes = 3.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x01000000
   Loading Kernel Image ... OK
   Loading Ramdisk to 1f6aa000, end 1f9ee351 ... OK
   Using Device Tree in place at 01000000, end 010068e5
Updating device tree successful

Starting kernel ...


Starting the boot process...
Detected system type: RN104
Loading kernel modules...done
Boot mode: Normal
[    4.382673] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes
[    4.394049] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 1:0, read 64 bytes
[    4.405215] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 2:0, read 64 bytes
[    4.416386] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 3:0, read 64 bytes
[    4.427539] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 4:0, read 64 bytes
[    4.438686] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 5:0, read 64 bytes
[    4.449897] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 6:0, read 64 bytes
[    4.461068] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 7:0, read 64 bytes
[    4.472203] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 8:0, read 64 bytes
[    4.483330] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 9:0, read 64 bytes
[    4.494460] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 10:0, read 64 bytes
[    4.505705] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 11:0, read 64 bytes
[    4.516929] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 12:0, read 64 bytes
[    4.528143] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 13:0, read 64 bytes
[    4.539354] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 14:0, read 64 bytes
[    4.550575] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 15:0, read 64 bytes
[    4.561833] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 16:0, read 64 bytes
[    4.573068] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 17:0, read 64 bytes
[    4.584286] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 18:0, read 64 bytes
[    4.595596] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 19:0, read 64 bytes
[    4.606896] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 20:0, read 64 bytes
[    4.619250] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 21:0, read 64 bytes
[    4.631794] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 22:0, read 64 bytes
[    4.643123] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 23:0, read 64 bytes
[    4.654373] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 24:0, read 64 bytes
[    4.665638] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 25:0, read 64 bytes
[    4.676873] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 26:0, read 64 bytes
[    4.688102] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 27:0, read 64 bytes
[    4.699314] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 28:0, read 64 bytes
[    4.710546] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 29:0, read 64 bytes
[    4.721756] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 30:0, read 64 bytes
[    4.732968] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 31:0, read 64 bytes
[    4.744184] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 32:0, read 64 bytes
[    4.755400] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 33:0, read 64 bytes
[    4.766610] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 34:0, read 64 bytes
[    4.777824] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 35:0, read 64 bytes
[    4.789036] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 36:0, read 64 bytes
[    4.800269] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 37:0, read 64 bytes
[    4.811486] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 38:0, read 64 bytes
[    4.822702] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 39:0, read 64 bytes
[    4.833913] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 40:0, read 64 bytes
[    4.845127] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 41:0, read 64 bytes
[    4.856347] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 42:0, read 64 bytes
[    4.867565] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 43:0, read 64 bytes
[    4.878791] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 44:0, read 64 bytes
[    4.890008] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 45:0, read 64 bytes
[    4.901236] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 46:0, read 64 bytes
[    4.912452] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 47:0, read 64 bytes
[    4.923666] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 48:0, read 64 bytes
[    4.934880] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 49:0, read 64 bytes
[    4.946090] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 50:0, read 64 bytes
[    4.957307] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 51:0, read 64 bytes
[    4.968523] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 52:0, read 64 bytes
[    4.979734] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 53:0, read 64 bytes
[    4.990960] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 54:0, read 64 bytes
[    5.002173] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 55:0, read 64 bytes
[    5.013396] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 56:0, read 64 bytes
[    5.024610] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 57:0, read 64 bytes
[    5.035826] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 58:0, read 64 bytes
[    5.047038] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 59:0, read 64 bytes
[    5.058263] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 60:0, read 64 bytes
[    5.069480] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 61:0, read 64 bytes
[    5.080703] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 62:0, read 64 bytes
[    5.091912] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 63:0, read 64 bytes
[    5.103131] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 64:0, read 64 bytes
[    5.114345] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 65:0, read 64 bytes
[    5.125563] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 66:0, read 64 bytes
[    5.136783] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 67:0, read 64 bytes
[    5.148000] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 68:0, read 64 bytes
[    5.159218] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 69:0, read 64 bytes
[    5.170439] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 70:0, read 64 bytes
[    5.181655] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 71:0, read 64 bytes
[    5.192868] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 72:0, read 64 bytes
[    5.204087] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 73:0, read 64 bytes
[    5.215302] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 74:0, read 64 bytes
[    5.226519] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 75:0, read 64 bytes
[    5.237734] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 76:0, read 64 bytes
[    5.248950] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 77:0, read 64 bytes
[    5.260172] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 78:0, read 64 bytes
[    5.271383] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 79:0, read 64 bytes
[    5.282601] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 80:0, read 64 bytes
[    5.293814] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 81:0, read 64 bytes
[    5.305026] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 82:0, read 64 bytes
[    5.316241] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 84:0, read 64 bytes
[    5.327453] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 85:0, read 64 bytes
[    5.338669] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 86:0, read 64 bytes
[    5.349906] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 87:0, read 64 bytes
[    5.361139] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 88:0, read 64 bytes
[    5.372366] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 89:0, read 64 bytes
[    5.383587] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 90:0, read 64 bytes
[    5.394803] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 91:0, read 64 bytes
[    5.406014] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 92:0, read 64 bytes
[    5.417225] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 93:0, read 64 bytes
[    5.428447] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 94:0, read 64 bytes
[    5.439667] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 95:0, read 64 bytes
[    5.450892] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 96:0, read 64 bytes
[    5.462109] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 97:0, read 64 bytes
[    5.473324] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 98:0, read 64 bytes
[    5.484538] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 99:0, read 64 bytes
[    5.495755] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 100:0, read 64 bytes
[    5.507054] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 101:0, read 64 bytes
[    5.518354] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 102:0, read 64 bytes
[    5.529658] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 103:0, read 64 bytes
[    5.540964] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 104:0, read 64 bytes
[    5.552271] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 105:0, read 64 bytes
[    5.563575] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 106:0, read 64 bytes
[    5.574880] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 107:0, read 64 bytes
[    5.586183] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 108:0, read 64 bytes
[    5.597486] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 109:0, read 64 bytes
[    5.608791] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 110:0, read 64 bytes
[    5.620108] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 111:0, read 64 bytes
[    5.631411] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 112:0, read 64 bytes
[    5.642715] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 113:0, read 64 bytes
[    5.654017] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 114:0, read 64 bytes
[    5.665318] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 115:0, read 64 bytes
[    5.676626] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 116:0, read 64 bytes
[    5.687929] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 117:0, read 64 bytes
[    5.699232] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 118:0, read 64 bytes
[    5.710548] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 119:0, read 64 bytes
[    5.721845] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 120:0, read 64 bytes
[    5.733142] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 121:0, read 64 bytes
[    5.744448] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 122:0, read 64 bytes
[   22.023591] ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 917:0, read 64 bytes
UBI device number 0, total 919 LEBs (116690944 bytes, 111.3 MiB), available 11 LEBs (1396736 bytes, 1.3 MiB), LEB size 126976 bytes (124.0 KiB
Searching for disks (5)...
Bringing up network...eth0.done
ERROR: Resolving timed out after 10008 milliseconds
command failed: /usr/bin/rnutil firmware_update
mdadm: array /dev/md0 started.
mke2fs 1.42.13 (17-May-2015)
Discarding device blocks: done                            
Creating filesystem with 1047552 4k blocks and 1048576 inodes
Filesystem UUID: f47add44-1aef-48ae-8b95-ba14d8873a22
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done 

Extracting root image...ERROR: Could not mount boot flash [/dev/ubi0_0] (Invalid argument)

Welcome to ReadyNASOS
nas-02-02-00 login: command failed: mdev -s
command failed: /usr/sbin/telnetd

Error on the NAS LCD: Error: could not mount the boot flash

OS loads fine once the OS HDD is installed and no ubi0 error: ubi_io_read: error has been seen.



Edited 2 time(s). Last edit at 09/20/2020 03:46PM by K20.
Re: RN104 bricked
September 20, 2020 06:02PM
K20,

It's been a while so I don't remember the nanddump and nandwrite version. The old NAND utility has slightly different syntax.

So in stock OS,

./nanddump --help
./nandwrite --help

And
======

Also, since you can log in stock OS with the HDD rootfs, why not let stock OS reinstall the FW for you? there must be a way to do that.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: