Welcome! Log In Create A New Profile

Advanced

How to unbrick the Netgear Ready NAS Duo v2

Posted by yury_minsk 
Re: How to unbrick the Netgear Ready NAS Duo v2
September 12, 2021 02:05AM
Restarted today the NAS to try your advises and stuck in another boot loop... After executing kwboot and sending image to device, it starts booting and then:
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: DB-88F6282A-BP LE

U-Boot 1.1.4 (Jun 29 2012 - 16:06:40) Marvell version: 3.4.27
Netgear version: Uboot-1_1_4-NetgearDUOV3-V1009

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006D0120

Soc: MV88F1155 Rev 1 (DDR3)
CPU running @ 1600Mhz L2 running @ 533Mhz
SysClock = 533Mhz , TClock = 200Mhz

DRAM unknown CAL  tRP = 8 tRAS = 20 tRCD=8
DRAM CS[0] base 0x00000000   size 256MB
DRAM Total size 256MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:128 MB
Flash:  0 kB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
Switch On !

software interrupt
pc : [<90000004>]          lr : [<0063bf70>]
sp : 005fff10  ip : fb000000     fp : ff6fffff
r10: 00000000  r9 : 00600498     r8 : 005fffcc
r7 : 876f6eff  r6 : 30303030     r5 : 32783040  r4 : 30303030
r3 : 75c00040  r2 : f1010100     r1 : 00659d59  r0 : 00000000
Flags: NzCv  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...

Can't interrupt the process to enter any command.
Re: How to unbrick the Netgear Ready NAS Duo v2
September 12, 2021 03:02AM
May be uboot.bin taken from uboot.bin is not the best option?
Are there any other images to use with kwboot?
Re: How to unbrick the Netgear Ready NAS Duo v2
September 12, 2021 03:37PM
egor.tio,

> May be uboot.bin taken from
> uboot.bin
> is not the best option?
> Are there any other images to use with kwboot?

Is that the same one being used in this thread before? If it is then it probably expected some envs to be set certain way, and then now the envs are not.

======

Before I build a different u-boot image for you to boot (our forum member ingmar_k has been rolling a new u-boot 2017.07 for this box).

How far did you get with the steps I've posted above? did you boot into Debian on USB?

https://forum.doozan.com/read.php?3,74954,125044#msg-125044

Quote

With the Debian rootfs on USB drive. kwboot, interrupt serial console and

setenv install_mode

And then set up the envs to boot Debian rootfs on USB (this instruction is inthe Wiki thread):

setenv usb_set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial'
setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv load_uinitrd 'ext2load usb 0:1 0x2100000 /boot/uInitrd'
setenv usb_boot 'mw 0x800000 0 1; run load_uimage; run load_uinitrd; bootm 0x800000 0x2100000'
setenv usb_bootcmd 'run usb_set_bootargs; run usb_boot'
setenv bootcmd 'usb reset; run usb_bootcmd; usb stop; reset'

and
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: How to unbrick the Netgear Ready NAS Duo v2
September 12, 2021 11:04PM
Hi Bodhi,

Sadly no progress, whatever way device boots (itself from nand or via kwboot) it stucks in same loop.
USB boot with pressed Backup button is ignored.
Re: How to unbrick the Netgear Ready NAS Duo v2
September 13, 2021 01:40AM
Quote

How far did you get with the steps I've posted above? did you boot into Debian on USB?

https://forum.doozan.com/read.php?3,74954,125044#msg-125044

Quote

With the Debian rootfs on USB drive. kwboot, interrupt serial console and

setenv install_mode

And then set up the envs to boot Debian rootfs on USB (this instruction is inthe Wiki thread):

setenv usb_set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial'
setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv load_uinitrd 'ext2load usb 0:1 0x2100000 /boot/uInitrd'
setenv usb_boot 'mw 0x800000 0 1; run load_uimage; run load_uinitrd; bootm 0x800000 0x2100000'
setenv usb_bootcmd 'run usb_set_bootargs; run usb_boot'
setenv bootcmd 'usb reset; run usb_bootcmd; usb stop; reset'

and
boot


Please post the entire serial bootlog of this (from kwboot command until it starts the boot loop).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: How to unbrick the Netgear Ready NAS Duo v2
September 13, 2021 11:48AM
Just to clarify - I'm starting kwboot from another linux server, being connected via USB2TTL cable
kwboot -t -B 115200 /dev/ttyUSB0 -b /home/downloads/u-boot.bin -p
Sending boot message. Please reboot the target...|
Sending boot image...
  0 % [......................................................................]
 --- cut here ---
 98 % [.....................................................................]
[Type Ctrl-\ + c to quit]

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: DB-88F6282A-BP LE

U-Boot 1.1.4 (Mar 30 2011 - 17:54:31) Marvell version: 3.4.27
USISH-SMB Ver: topkick1281p2-001-007-20101210

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFD40

Soc: MV88F1155 Rev 1 (DDR3)
CPU running @ 1600Mhz L2 running @ 533Mhz
SysClock = 533Mhz , TClock = 200Mhz

DRAM unknown CAL  tRP = 8 tRAS = 20 tRCD=8
DRAM CS[0] base 0x00000000   size 256MB
DRAM Total size 256MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:128 MB
Plug On and Power down, Please Switch On !

▒
         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: DB-88F6282A-BP LE

U-Boot 1.1.4 (Jun 29 2012 - 16:06:40) Marvell version: 3.4.27
Netgear version: Uboot-1_1_4-NetgearDUOV3-V1009

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006D0120

Soc: MV88F1155 Rev 1 (DDR3)
CPU running @ 1600Mhz L2 running @ 533Mhz
SysClock = 533Mhz , TClock = 200Mhz

DRAM unknown CAL  tRP = 8 tRAS = 20 tRCD=8
DRAM CS[0] base 0x00000000   size 256MB
DRAM Total size 256MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:128 MB
Flash:  0 kB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
Switch On !

software interrupt
pc : [<90000004>]          lr : [<0063bf70>]
sp : 005fff10  ip : fb000000     fp : ff4fffff
r10: 00000000  r9 : 00600498     r8 : 005fffcc
r7 : 976f6fff  r6 : 30303030     r5 : 32783040  r4 : 30303030
r3 : 75c00040  r2 : f1010100     r1 : 00659d59  r0 : 00000000
Flags: NzCv  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...
Re: How to unbrick the Netgear Ready NAS Duo v2
September 13, 2021 04:27PM
egor.tio,

I think you need to power down and unplug for a few minutes, and then kwboot again with that u-boot.bin.

==========

However, here is a test u-boot for 2017.07. Run kwboot the same way you did before.

kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-2-rc1.readynas_duo_v2.mtd0.kwb -p
Once it starts and you can get to the count down, interrupt it, and

printenv

Please post the entire log here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Attachments:
open | download - uboot.2017.07-tld-2-rc1.readynas_duo_v2.mtd0.kwb (512 KB)
Re: How to unbrick the Netgear Ready NAS Duo v2
September 13, 2021 11:08PM
I was leaving it unplugged for hours with same result...

Will try new uboot now, thank you!
Re: How to unbrick the Netgear Ready NAS Duo v2
September 13, 2021 11:21PM
Hey Bodhi, my NAS is back from loop!!! Many thanks!

U-Boot 2017.07-tld-2-rc1-gead3e3302f-dirty (Sep 13 2021 - 13:54:56 -0700)
NETGEAR READYNAS DUO V2

SoC:   Kirkwood 88F6282_A1
I2C:   ready
DRAM:  256 MiB
WARNING: Caches not enabled
G762 Fan controller: Successfully initialized.
Enabled USB 2.0 Power.
Enabled USB 3.0 Power.
Running HDD staggered spin-up...
Enabling HDD-0 Power in 1s.
Enabling HDD-1 Power in 3s.
NAND:  128 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0
READYNAS_DUO_V2> printenv
arcNumber=1680
baudrate=115200
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; reset
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=3
bootdev=usb
console=console=ttyS0,115200 earlyprintk
device=0:1
devices=usb ide
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-netgear_readynas_duo_v2.dtb
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(stock_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
partition=nand0,2
preboot=mii write 0x0 0x0 0x9140
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 3005/131068 bytes
Re: How to unbrick the Netgear Ready NAS Duo v2
September 13, 2021 11:23PM
If possible, I would like to keep booting NAS from NAND.
Re: How to unbrick the Netgear Ready NAS Duo v2
September 14, 2021 12:43AM
egor.tio,

> Hey Bodhi, my NAS is back from loop!!! Many thanks!


Excellent!

Now plug in the Debian USB rootfs and

boot

And see if you can boot into Debian.

Please post this boot log.

> If possible, I would like to keep booting NAS from NAND.

That will come after you can boot in to a working system. And then you can reflash flash mtd0 with a good copy.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: How to unbrick the Netgear Ready NAS Duo v2
September 14, 2021 01:23PM
Spent some time prepping USB with rootfs, was able to login to the Debian installer :-)
Don't want to reinstall it, so restarted again via kwboot and with magic command :
nand read.e 0x1200000 0x200000 0x600000;nand read.e 0x2000000 0x800000 0x1000000;bootm 0x1200000 0x2000000
was able to boot in my Debian on one of the installed drives.
Forgot to save boot log, sorry.
How can I write proper env values to NAND, please? Or I should reflash it fully?



Edited 1 time(s). Last edit at 09/14/2021 01:33PM by egor.tio.
Re: How to unbrick the Netgear Ready NAS Duo v2
September 14, 2021 01:40PM
here is the boot log from kwboot to stopping autoboot:
Sending boot message. Please reboot the target...\
Sending boot image...
  0 % [......................................................................]
 --- cut here ---
 99 % [....................................]
[Type Ctrl-\ + c to quit]


U-Boot 2017.07-tld-2-rc1-gead3e3302f-dirty (Sep 13 2021 - 13:54:56 -0700)
NETGEAR READYNAS DUO V2

SoC:   Kirkwood 88F6282_A1
I2C:   ready
DRAM:  256 MiB
WARNING: Caches not enabled
G762 Fan controller: Successfully initialized.
Enabled USB 2.0 Power.
Enabled USB 3.0 Power.
Running HDD staggered spin-up...
Enabling HDD-0 Power in 1s.
Enabling HDD-1 Power in 3s.
NAND:  128 MiB
*** Warning - bad CRC, using default environment  <----- bad sign?

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0
READYNAS_DUO_V2>



Edited 1 time(s). Last edit at 09/14/2021 01:43PM by egor.tio.
Re: How to unbrick the Netgear Ready NAS Duo v2
September 14, 2021 01:57PM
egor.tio,

> Spent some time prepping USB with rootfs, was able
> to login to the Debian installer :-)

I need to see the complete boot log.

> Don't want to reinstall it, so restarted again via
> kwboot and with magic command :
>
> nand read.e 0x1200000 0x200000 0x600000;nand
> read.e 0x2000000 0x800000 0x1000000;bootm
> 0x1200000 0x2000000
>
> was able to boot in my Debian on one of the
> installed drives.

Again, this is not clear enough! which Debian system? stock or Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 ?


> Forgot to save boot log, sorry.
> How can I write proper env values to NAND, please?
> Or I should reflash it fully?

In each case above, I will need to see the boot log, and perhaps will ask follow up questions before I can recommend the next step (incorrectly assumption will cause problems).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: How to unbrick the Netgear Ready NAS Duo v2
September 14, 2021 01:58PM
Quote

*** Warning - bad CRC, using default environment <----- bad sign?

Not bad, the error is expected with new u-boot and old envs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: How to unbrick the Netgear Ready NAS Duo v2
September 14, 2021 02:08PM
Please forgive me for making wrong steps, I'm trying to follow your advises how I can understand them :-)
If booting from an USB drive is important step, please advise how to prep it, as uInitrd I found is from debian installer and after booting with kwboot and new uboot.bin you gave, I get Debian Install wizard starting.
For now I'm able to login in my Debian installed on a hard disk in NAS previously after stopping autoboot and issuing that magic command. That Debian is stock one I suppose, can I check that somehow?
Re: How to unbrick the Netgear Ready NAS Duo v2
September 14, 2021 02:26PM
I see. You are thinking Debian mainline installer.

The Debian rootfs can be created using Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 from my release thread:

https://forum.doozan.com/read.php?2,12096

It is a complete basic Debian system with kernel 5.2.9-kirkwood-tld-1. It has this box supported.

Once you logged into this Debian rootfs, it should show the correct mtd partitions. And that'll make flashing stock or new u-boot easier.

And something you mentioned above:

Quote

Don't want to reinstall it, so restarted again via kwboot and with magic command :
nand read.e 0x1200000 0x200000 0x600000;nand read.e 0x2000000 0x800000 0x1000000;bootm 0x1200000 0x2000000
was able to boot in my Debian on one of the installed drives.

I did not quite understand the above. The log would be self explanatory.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: How to unbrick the Netgear Ready NAS Duo v2
September 14, 2021 04:07PM
Ok, made rootfs USB from your instrucations. Now trying to boot from it, here is the log from kwboot and printenv output:
root@blackbox:/# kwboot -t -B 115200 /dev/ttyUSB0 -b /home/downloads/uboot_new.bin -p
Sending boot message. Please reboot the target...|
Sending boot image...
  0 % [......................................................................]
  1 % [......................................................................]
  3 % [......................................................................]
  5 % [......................................................................]
  6 % [......................................................................]
  8 % [......................................................................]
 10 % [......................................................................]
 11 % [......................................................................]
 13 % [......................................................................]
 15 % [......................................................................]
 17 % [......................................................................]
 18 % [......................................................................]
 20 % [......................................................................]
 22 % [......................................................................]
 23 % [......................................................................]
 25 % [......................................................................]
 27 % [......................................................................]
 29 % [......................................................................]
 30 % [......................................................................]
 32 % [......................................................................]
 34 % [......................................................................]
 35 % [......................................................................]
 37 % [......................................................................]
 39 % [......................................................................]
 41 % [......................................................................]
 42 % [......................................................................]
 44 % [......................................................................]
 46 % [......................................................................]
 47 % [......................................................................]
 49 % [......................................................................]
 51 % [......................................................................]
 53 % [......................................................................]
 54 % [......................................................................]
 56 % [......................................................................]
 58 % [......................................................................]
 59 % [......................................................................]
 61 % [......................................................................]
 63 % [......................................................................]
 64 % [......................................................................]
 66 % [......................................................................]
 68 % [......................................................................]
 70 % [......................................................................]
 71 % [......................................................................]
 73 % [......................................................................]
 75 % [......................................................................]
 76 % [......................................................................]
 78 % [......................................................................]
 80 % [......................................................................]
 82 % [......................................................................]
 83 % [......................................................................]
 85 % [......................................................................]
 87 % [......................................................................]
 88 % [......................................................................]
 90 % [......................................................................]
 92 % [......................................................................]
 94 % [......................................................................]
 95 % [......................................................................]
 97 % [......................................................................]
 99 % [....................................]
[Type Ctrl-\ + c to quit]


U-Boot 2017.07-tld-2-rc1-gead3e3302f-dirty (Sep 13 2021 - 13:54:56 -0700)
NETGEAR READYNAS DUO V2

SoC:   Kirkwood 88F6282_A1
I2C:   ready
DRAM:  256 MiB
WARNING: Caches not enabled
G762 Fan controller: Successfully initialized.
Enabled USB 2.0 Power.
Enabled USB 3.0 Power.
Running HDD staggered spin-up...
Enabling HDD-0 Power in 1s.
Enabling HDD-1 Power in 3s.
NAND:  128 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0
READYNAS_DUO_V2> printenv
arcNumber=1680
baudrate=115200
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; reset
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=3
bootdev=usb
console=console=ttyS0,115200 earlyprintk
device=0:1
devices=usb ide
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-netgear_readynas_duo_v2.dtb
ethact=egiga0
ethaddr=52:3b:20:9c:11:51
if_netconsole=ping $serverip
ipaddr=192.168.0.231
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(stock_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
partition=nand0,2
preboot=mii write 0x0 0x0 0x9140
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 3005/131068 bytes
Re: How to unbrick the Netgear Ready NAS Duo v2
September 14, 2021 04:10PM
If boot from USB will succeed, won't I loose data existing on hard disks?
Re: How to unbrick the Netgear Ready NAS Duo v2
September 14, 2021 04:20PM
Removed hard drives just to be sure and successfully booted in to your custom Debian:
READYNAS_DUO_V2> usb start
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices...
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found
READYNAS_DUO_V2> usb storage
  Device 0: Vendor: JetFlash Rev: 1100 Prod: Transcend 4GB
            Type: Removable Hard Disk
            Capacity: 3864.0 MB = 3.7 GB (7913472 x 512)
READYNAS_DUO_V2> boot

Reset IDE: ide_preinit failed

Partition Map for USB device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            7911424         00625864-01     83

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** File not found /boot/uEnv.txt **

no IDE devices available
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 692 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
4963680 bytes read in 1084 ms (4.4 MiB/s)
loading uInitrd ...
9713936 bytes read in 1130 ms (8.2 MiB/s)
loading DTB /boot/dts/kirkwood-netgear_readynas_duo_v2.dtb ...
12678 bytes read in 1307 ms (8.8 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.2.9-kirkwood-tld-1
   Created:      2019-08-25   2:22:31 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4963616 Bytes = 4.7 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.2.9-kirkwood-tld-1
   Created:      2019-08-25   2:22:50 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9713872 Bytes = 9.3 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 0f1cc000, end 0fb0f8d0 ... OK
   Loading Device Tree to 0f1c5000, end 0f1cb185 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.2.9-kirkwood-tld-1 (root@tldDebian) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 PREEMPT Sat Aug 17 15:00:56 PDT 2019
[    0.000000][    T0] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000][    T0] CPU: VIVT data cache, VIVT instruction cache
[    0.000000][    T0] OF: fdt: Machine model: NETGEAR ReadyNAS Duo v2
[    0.000000][    T0] Memory policy: Data cache writeback
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 65024
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:0x100000(uboot),0x80000(stock_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
[    0.000000][    T0] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000][    T0] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000][    T0] Memory: 234776K/262144K available (9216K kernel code, 868K rwdata, 3400K rodata, 1024K init, 301K bss, 27368K reserved, 0K cma-reserved)
[    0.000000][    T0] random: get_random_u32 called from cache_alloc_refill+0x38c/0x928 with crng_init=0
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0]  Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000][    T0] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000][    T0] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000007][    T0] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000039][    T0] Switching to timer-based delay loop, resolution 5ns
[    0.000640][    T0] Console: colour dummy device 80x30
[    0.000683][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000704][    T0] pid_max: default: 32768 minimum: 301
[    0.000999][    T0] LSM: Security Framework initializing
[    0.001151][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001173][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001866][    T0] *** VALIDATE proc ***
[    0.002085][    T0] *** VALIDATE cgroup1 ***
[    0.002107][    T0] *** VALIDATE cgroup2 ***
[    0.002189][    T0] CPU: Testing write buffer coherency: ok
[    0.003643][    T1] Setting up static identity map for 0x100000 - 0x100058
[    0.003890][    T1] mvebu-soc-id: MVEBU SoC ID=0x6282, Rev=0x1
[    0.004129][    T1] rcu: Hierarchical SRCU implementation.
[    0.006733][    T1] devtmpfs: initialized
[    0.011631][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.011659][    T1] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.011880][    T1] xor: measuring software checksum speed
[    0.110100][    T1]    arm4regs  :  1453.200 MB/sec
[    0.210062][    T1]    8regs     :   872.400 MB/sec
[    0.310059][    T1]    32regs    :  1266.800 MB/sec
[    0.310075][    T1] xor: using function: arm4regs (1453.200 MB/sec)
[    0.310092][    T1] prandom: seed boundary self test passed
[    0.313225][    T1] prandom: 100 self tests passed
[    0.313234][    T1] pinctrl core: initialized pinctrl subsystem
[    0.314427][    T1] NET: Registered protocol family 16
[    0.314856][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.315506][    T1] audit: initializing netlink subsys (disabled)
[    0.316540][   T14] audit: type=2000 audit(0.310:1): state=initialized audit_enabled=0 res=1
[    0.316643][    T1] cpuidle: using governor ladder
[    0.316707][    T1] cpuidle: using governor menu
[    0.317152][    T1] Feroceon L2: Enabling L2
[    0.317192][    T1] Feroceon L2: Cache support initialised.
[    0.322044][    T1] No ATAGs?
[    2.560046][    C0] random: fast init done
[    4.743729][   T71] alg: No test for lzo-rle (lzo-rle-generic)
[    4.744010][   T73] alg: No test for lzo-rle (lzo-rle-scomp)
[    4.920685][    T1] raid6: int32x8  gen()   171 MB/s
[    5.090131][    T1] raid6: int32x8  xor()   115 MB/s
[    5.260130][    T1] raid6: int32x4  gen()   173 MB/s
[    5.430161][    T1] raid6: int32x4  xor()   112 MB/s
[    5.600286][    T1] raid6: int32x2  gen()   177 MB/s
[    5.770049][    T1] raid6: int32x2  xor()   125 MB/s
[    5.940335][    T1] raid6: int32x1  gen()   134 MB/s
[    6.110342][    T1] raid6: int32x1  xor()    92 MB/s
[    6.110350][    T1] raid6: using algorithm int32x2 gen() 177 MB/s
[    6.110357][    T1] raid6: .... xor() 125 MB/s, rmw enabled
[    6.110364][    T1] raid6: using intx1 recovery algorithm
[    6.110582][    T1] vgaarb: loaded
[    6.110990][    T1] SCSI subsystem initialized
[    6.111387][    T1] usbcore: registered new interface driver usbfs
[    6.111437][    T1] usbcore: registered new interface driver hub
[    6.111509][    T1] usbcore: registered new device driver usb
[    6.111645][    T1] pps_core: LinuxPPS API ver. 1 registered
[    6.111654][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    6.111675][    T1] PTP clock support registered
[    6.112711][    T1] clocksource: Switched to clocksource orion_clocksource
[    6.886506][    T1] VFS: Disk quotas dquot_6.6.0
[    6.886590][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    6.894109][    T1] NET: Registered protocol family 2
[    6.894768][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    6.894799][    T1] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    6.894830][    T1] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    6.894860][    T1] TCP: Hash tables configured (established 2048 bind 2048)
[    6.894934][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    6.894958][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    6.895142][    T1] NET: Registered protocol family 1
[    6.895660][    T1] RPC: Registered named UNIX socket transport module.
[    6.895672][    T1] RPC: Registered udp transport module.
[    6.895678][    T1] RPC: Registered tcp transport module.
[    6.895685][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    6.895697][    T1] PCI: CLS 0 bytes, default 32
[    6.895889][    T1] Trying to unpack rootfs image as initramfs...
[    7.539294][    T1] Freeing initrd memory: 9488K
[    7.539448][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    7.540461][    T1] Initialise system trusted keyrings
[    7.540505][    T1] Key type blacklist registered
[    7.540694][    T1] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    7.540782][    T1] zbud: loaded
[    7.541661][    T1] NFS: Registering the id_resolver key type
[    7.541687][    T1] Key type id_resolver registered
[    7.541695][    T1] Key type id_legacy registered
[    7.541711][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    7.541724][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    7.541952][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    7.542133][    T1] fuse: init (API version 7.31)
[    7.542444][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    7.542601][    T1] orangefs_init: module version upstream loaded
[    7.542611][    T1] SGI XFS with ACLs, security attributes, realtime, scrub, no debug enabled
[    7.556245][    T1] async_tx: api initialized (async)
[    7.556265][    T1] Key type asymmetric registered
[    7.556273][    T1] Asymmetric key parser 'x509' registered
[    7.556335][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    7.557504][    T1] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    7.559038][    T1] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[    7.559057][    T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[    7.559070][    T1] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    7.559080][    T1] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    7.559174][    T1] pci 0000:00:01.0: [11ab:6282] type 01 class 0x060400
[    7.559207][    T1] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    7.560284][    T1] PCI: bus0: Fast back to back transfers disabled
[    7.560305][    T1] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    7.560460][    T1] pci 0000:01:00.0: [1033:0194] type 00 class 0x0c0330
[    7.560507][    T1] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00001fff 64bit]
[    7.560648][    T1] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    7.560716][    T1] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s x1 link at 0000:00:01.0 (capable of 4.000 Gb/s with 5 GT/s x1 link)
[    7.583692][    T1] PCI: bus1: Fast back to back transfers disabled
[    7.583713][    T1] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    7.583871][    T1] pci 0000:00:01.0: BAR 14: assigned [mem 0xe0000000-0xe00fffff]
[    7.583886][    T1] pci 0000:00:01.0: BAR 6: assigned [mem 0xe0100000-0xe01007ff pref]
[    7.583901][    T1] pci 0000:01:00.0: BAR 0: assigned [mem 0xe0000000-0xe0001fff 64bit]
[    7.583923][    T1] pci 0000:00:01.0: PCI bridge to [bus 01]
[    7.583937][    T1] pci 0000:00:01.0:   bridge window [mem 0xe0000000-0xe00fffff]
[    7.584031][    T1] pcieport 0000:00:01.0: enabling device (0140 -> 0142)
[    7.584098][    T1] pci 0000:01:00.0: enabling device (0140 -> 0142)
[    7.584554][    T1] mv_xor f1060800.xor: Marvell shared XOR driver
[    7.643365][    T1] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    7.644895][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[    7.703339][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    7.705109][    T1] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    7.706163][    T1] printk: console [ttyS0] disabled
[    7.706225][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    8.629551][    T1] printk: console [ttyS0] enabled
[    8.640359][    T1] loop: module loaded
[    8.644760][    T1] sata_mv f1080000.sata: slots 32 ports 2
[    8.652474][    T1] scsi host0: sata_mv
[    8.656848][    T1] scsi host1: sata_mv
[    8.660928][    T1] ata1: SATA max UDMA/133 irq 33
[    8.665787][    T1] ata2: SATA max UDMA/133 irq 33
[    8.671508][    T1] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[    8.678688][    T1] nand: Hynix H27U1G8F2BTR-BC
[    8.683260][    T1] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    8.691571][    T1] Scanning device for bad blocks
[    8.773580][    T1] 9 cmdlinepart partitions found on MTD device orion_nand
[    8.780572][    T1] Creating 9 MTD partitions on "orion_nand":
[    8.786453][    T1] 0x000000000000-0x000000100000 : "uboot"
[    8.793119][    T1] 0x000000100000-0x000000180000 : "stock_uboot_env"
[    8.800539][    T1] 0x000000180000-0x000000200000 : "key_store"
[    8.807478][    T1] 0x000000200000-0x000000280000 : "info"
[    8.813965][    T1] 0x000000280000-0x000000c80000 : "etc"
[    8.820338][    T1] 0x000000c80000-0x000001680000 : "kernel_1"
[    8.827216][    T1] 0x000001680000-0x000004640000 : "rootfs1"
[    8.834095][    T1] 0x000004640000-0x000005040000 : "kernel_2"
[    8.840938][    T1] 0x000005040000-0x000008000000 : "rootfs2"
[    8.848776][    T1] libphy: Fixed MDIO Bus: probed
[    8.854260][    T1] libphy: orion_mdio_bus: probed
[    8.870424][    T1] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    8.878423][    T1] mv643xx_eth_port mv643xx_eth_port.0: DMA mask not set
[    8.886220][    T1] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 52:3b:20:9c:11:51
[    8.895882][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    8.903219][    T1] ehci-pci: EHCI PCI platform driver
[    8.908449][    T1] ehci-orion: EHCI orion driver
[    8.913374][    T1] orion-ehci f1050000.ehci: EHCI Host Controller
[    8.919637][    T1] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    8.928200][    T1] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    8.962730][    T1] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    8.969693][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.02
[    8.978730][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    8.986711][    T1] usb usb1: Product: EHCI Host Controller
[    8.992324][    T1] usb usb1: Manufacturer: Linux 5.2.9-kirkwood-tld-1 ehci_hcd
[    8.999693][    T1] usb usb1: SerialNumber: f1050000.ehci
[    9.005150][  T112] ata1: SATA link down (SStatus 0 SControl F300)
[    9.011882][    T1] hub 1-0:1.0: USB hub found
[    9.016432][    T1] hub 1-0:1.0: 1 port detected
[    9.021823][    T1] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    9.027855][    T1] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    9.036286][    T1] xhci_hcd 0000:01:00.0: hcc params 0x014042cb hci version 0x96 quirks 0x0000000000000004
[    9.046510][    T1] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.02
[    9.055531][    T1] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    9.063501][    T1] usb usb2: Product: xHCI Host Controller
[    9.069101][    T1] usb usb2: Manufacturer: Linux 5.2.9-kirkwood-tld-1 xhci-hcd
[    9.076458][    T1] usb usb2: SerialNumber: 0000:01:00.0
[    9.082262][    T1] hub 2-0:1.0: USB hub found
[    9.086803][    T1] hub 2-0:1.0: 2 ports detected
[    9.091960][    T1] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    9.097968][    T1] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 3
[    9.106140][    T1] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[    9.113253][    T1] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    9.122192][    T1] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.02
[    9.131478][    T1] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    9.139495][    T1] usb usb3: Product: xHCI Host Controller
[    9.145116][    T1] usb usb3: Manufacturer: Linux 5.2.9-kirkwood-tld-1 xhci-hcd
[    9.152455][    T1] usb usb3: SerialNumber: 0000:01:00.0
[    9.158267][    T1] hub 3-0:1.0: USB hub found
[    9.162812][    T1] hub 3-0:1.0: 2 ports detected
[    9.168139][    T1] usbcore: registered new interface driver usb-storage
[    9.175211][    T1] mousedev: PS/2 mouse device common for all mice
[    9.354192][  T114] ata2: SATA link down (SStatus 0 SControl F300)
[    9.382739][  T119] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    9.452737][    T5] usb 2-1: new low-speed USB device number 2 using xhci_hcd
[    9.585204][  T119] usb 1-1: New USB device found, idVendor=8564, idProduct=1000, bcdDevice=11.00
[    9.594139][  T119] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    9.602024][  T119] usb 1-1: Product: Mass Storage Device
[    9.607463][  T119] usb 1-1: Manufacturer: JetFlash
[    9.612366][  T119] usb 1-1: SerialNumber: 77LQT8K00CL4JQWM
[    9.618595][  T119] usb-storage 1-1:1.0: USB Mass Storage device detected
[    9.625856][  T119] scsi host2: usb-storage 1-1:1.0
[    9.847258][    T5] usb 2-1: New USB device found, idVendor=051d, idProduct=0002, bcdDevice= 0.06
[    9.856191][    T5] usb 2-1: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[    9.864072][    T5] usb 2-1: Product: Back-UPS RS 500 FW:30.j5.I USB FW:j5
[    9.870975][    T5] usb 2-1: Manufacturer: American Power Conversion
[    9.877374][    T5] usb 2-1: SerialNumber: BB0540029391
[   10.242750][    T1] rtc-mv f1010300.rtc: internal RTC not ticking
[   10.249007][    T1] i2c /dev entries driver
[   10.254542][    T1] device-mapper: uevent: version 1.0.3
[   10.260101][    T1] device-mapper: ioctl: 4.40.0-ioctl (2019-01-18) initialised: dm-devel@redhat.com
[   10.269637][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[   10.276947][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[   10.284327][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[   10.291725][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[   10.298562][    T1] device-mapper: raid: Loading target version 1.14.0
[   10.306277][    T1] hidraw: raw HID events driver (C) Jiri Kosina
[   10.312664][    T1] drop_monitor: Initializing network drop monitor service
[   10.319930][    T1] NET: Registered protocol family 17
[   10.325319][    T1] Key type dns_resolver registered
[   10.330956][    T1] registered taskstats version 1
[   10.335797][    T1] Loading compiled-in X.509 certificates
[   10.341368][    T1] zswap: loaded using pool lzo/zbud
[   10.418608][    T1] Key type big_key registered
[   10.456014][    T1] Key type encrypted registered
[   10.462333][    T1] hctosys: unable to open rtc device (rtc0)
[   10.471537][    T1] Freeing unused kernel memory: 1024K
[   10.493201][    T1] Checked W+X mappings: passed, no W+X pages found
[   10.499582][    T1] Run /init as init process
Loading, please wait...
Starting version 241
[   10.873934][   T23] scsi 2:0:0:0: Direct-Access     JetFlash Transcend 4GB    1100 PQ: 0 ANSI: 0 CCS
[   10.892501][    T7] sd 2:0:0:0: [sda] 7913472 512-byte logical blocks: (4.05 GB/3.77 GiB)
[   10.917386][    T7] sd 2:0:0:0: [sda] Write Protect is off
[   10.929512][    T7] sd 2:0:0:0: [sda] No Caching mode page found
[   10.948817][    T7] sd 2:0:0:0: [sda] Assuming drive cache: write through
[   10.974095][    T7]  sda: sda1
[   10.988138][    T7] sd 2:0:0:0: [sda] Attached SCSI removable disk
[   11.505534][  T175] rtc-rs5c372 0-0032: rs5c372a found, 24hr
[   11.553357][  T168] usbcore: registered new interface driver uas
[   11.566419][  T175] rtc-rs5c372 0-0032: registered as rtc0
[   12.182186][  T165] hid-generic 0003:051D:0002.0001: hiddev0,hidraw0: USB HID v1.10 Device [American Power Conversion Back-UPS RS 500 FW:30.j5.I USB FW:j5] on usb-0000:01:00.0-1/input0
[   12.200783][  T165] usbcore: registered new interface driver usbhid
[   12.207146][  T165] usbhid: USB HID core driver
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.33.1
[/sbin/fsck.ext3 (1) -- /dev/sda1] fsck.ext3 -a -C0 /dev/sda1
rootfs: clean, 15073/247504 files, 166600/988928 blocks
done.
[   23.155877][  T192] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   23.211182][  T192] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.93 booting
[info] Using makefile-style concurrent boot in runlevel S.
[ ok ] Starting hotplug events dispatcher: systemd-udevd.
[ ok ] Synthesizing the initial hotplug events (subsystems)...done.
[....] Synthesizing the initial hotplug events (devices)...[   25.989883][  T391] input: gpio-keys as /devices/platform/gpio-keys/input/input0
done.
[....] Waiting for /dev to be fully populated...[   26.345138][  T391] systemd-udevd[391]: Using default interface naming scheme 'v240'.
[   26.486618][  T391] systemd-udevd[391]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
[   26.649383][  T395] watchdog: f1020300.watchdog-timer: driver supplied timeout (4294967295) out of range
[   26.685613][    C0] random: crng init done
[   26.720908][  T393] sd 2:0:0:0: Attached scsi generic sg0 type 0
[   26.790540][  T395] watchdog: f1020300.watchdog-timer: falling back to default timeout (21)
[   26.859278][  T371] marvell-cesa f1030000.crypto: CESA device successfully registered
[   26.903823][  T395] orion_wdt: Initial timeout 21 sec
[   26.998660][  T372] systemd-udevd[372]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
done.
[ ok ] Setting hostname to 'debian'...done.
[ ok ] Activating swap:.
[   28.533010][  T596] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[info] Will now check all file systems.
fsck from util-linux 2.33.1
Checking all file systems.
LABEL=rootfs is mounted
[ ok ] Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location is writable..
[ ok ] Cleaning up temporary files...[....] Cleaning /tmp...done.
[ ok .
[ ok ] Will now mount local filesystems:.
[ ok ] Will now activate swapfile swap:done.
[ ok ] Checking minimum space in /tmp...done.
[ ok ] Cleaning up temporary files....
[ ok ] Starting Setting kernel variables: sysctl.
[ ok ] Initializing random number generator...done.
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/52:3b:20:9c:11:51
Sending on   LPF/eth0/52:3b:20:9c:11:51
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 20

DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
done.
[....] Starting RPC port mapper daemon: rpcbind[   92.428067][ T1203] NET: Registered protocol family 10
[   92.434713][ T1203] Segment Routing with IPv6
. ok
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Cleaning up temporary files....
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1327 (syslogd)
. ok
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1354 (klogd)
. ok
[ ok ] Starting system message bus: dbus.
[ ok ] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[ ok ] Starting NFS common utilities: statd idmapd.
[warn] Not starting NFS kernel daemon: no exports. ... (warning).
[ ok ] Starting NTP server: ntpd.
[ ok ] Starting OpenBSD Secure Shell server: sshd.
[ ok ] Running local boot scripts (/etc/rc.local).

Debian GNU/Linux 10 debian ttyS0

debian login: root
Password:
Last login: Wed Dec 31 16:02:34 PST 1969 from 192.168.0.100 on pts/0
Re: How to unbrick the Netgear Ready NAS Duo v2
September 14, 2021 04:22PM
here is the output from lsblk:
root@debian:~# lsblk
NAME      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda         8:0    1  3.8G  0 disk
`-sda1      8:1    1  3.8G  0 part /
mtdblock0  31:0    0    1M  0 disk
mtdblock1  31:1    0  512K  0 disk
mtdblock2  31:2    0  512K  0 disk
mtdblock3  31:3    0  512K  0 disk
mtdblock4  31:4    0   10M  0 disk
mtdblock5  31:5    0   10M  0 disk
mtdblock6  31:6    0 47.8M  0 disk
mtdblock7  31:7    0   10M  0 disk
mtdblock8  31:8    0 47.8M  0 disk
Re: How to unbrick the Netgear Ready NAS Duo v2
September 14, 2021 05:57PM
egor.tio,

> Removed hard drives just to be sure and
> successfully booted in to your custom Debian:

Cool! the HDD is untouched when you boot with USB rootfs. But removing the hard drive is a good precaution.

Everything looks good. Except the mtd partitions look incorrect. This is the Zyxel 3xx NAS settings. So we need to adjust them.

[    8.773580][    T1] 9 cmdlinepart partitions found on MTD device orion_nand
[    8.780572][    T1] Creating 9 MTD partitions on "orion_nand":
[    8.786453][    T1] 0x000000000000-0x000000100000 : "uboot"
[    8.793119][    T1] 0x000000100000-0x000000180000 : "stock_uboot_env"
[    8.800539][    T1] 0x000000180000-0x000000200000 : "key_store"
[    8.807478][    T1] 0x000000200000-0x000000280000 : "info"
[    8.813965][    T1] 0x000000280000-0x000000c80000 : "etc"
[    8.820338][    T1] 0x000000c80000-0x000001680000 : "kernel_1"
[    8.827216][    T1] 0x000001680000-0x000004640000 : "rootfs1"
[    8.834095][    T1] 0x000004640000-0x000005040000 : "kernel_2"
[    8.840938][    T1] 0x000005040000-0x000008000000 : "rootfs2"


Let's look back to previous boot logs to see what the original mtd partitions look like for this box and then we need to set it in serial console.

Let me read them again, and you can do the same.

====

By the way, this box can be run with Debian mainline, if you choose to do so. Some small tweaks need to be set up, though.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: How to unbrick the Netgear Ready NAS Duo v2
September 14, 2021 05:59PM
Found it in the 1st post:

root@storage:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00180000 00020000 "u-boot"
mtd1: 001a0000 00020000 "u-boot-env"
mtd2: 00800000 00020000 "uImage"
mtd3: 01800000 00020000 "minirootfs"
mtd4: 06800000 00020000 "jffs2"

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: How to unbrick the Netgear Ready NAS Duo v2
September 14, 2021 06:09PM
Before flashing stock u-boot image (compiled by yury_minsk), the mtdparts envs and /etc/fw_env.config must have correct values.

Here was how yury_minsk did the flashing with my instruction:

https://forum.doozan.com/read.php?3,74954,78274#msg-78274

=====

So there are a few items to do.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: How to unbrick the Netgear Ready NAS Duo v2
September 14, 2021 11:13PM
So I should boot from kwboot, stop autoboot, then
setenv mainlineLinux yes
setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv load_initrd 'ext2load usb 0:1 0x2100000 /boot/uInitrd'
setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10  mtdparts=orion_nand:0x180000@0(u-boot),0x20000@0x180000(u-boot-env),0x600000@0x200000(uImage),0x1000000@0x800000(minirootfs),0x6800000@0x1800000(jffs2) earlyprintk=serial'
setenv bootcmd_exec 'usb start; run set_bootargs; run load_uimage; run load_initrd; bootm 0x800000 0x2100000'
setenv bootcmd_stock 'nand read.e 0x1200000 0x200000 0x600000;nand read.e 0x2000000 0x800000 0x1000000;bootm 0x1200000 0x2000000'
setenv bootcmd 'run bootcmd_exec; run bootcmd_stock; reset'
boot

And then from Debian I should flash NAND as yuri_minsk did:
dd if=u-boot-db88f6282abp_533ddr3db_nand.pached.bin of=uboot-netgear-rnd2.mtd0.kwb bs=512k conv=sync
flash_erase /dev/mtd0 0 4
nandwrite  /dev/mtd0 uboot-netgear-rnd2.mtd0.kwb
Re: How to unbrick the Netgear Ready NAS Duo v2
September 15, 2021 05:11AM
egor.tio Wrote:
-------------------------------------------------------
> So I should boot from kwboot, stop autoboot, then
>
> setenv mainlineLinux yes
> setenv load_uimage 'ext2load usb 0:1 0x800000
> /boot/uImage'
> setenv load_initrd 'ext2load usb 0:1 0x2100000
> /boot/uInitrd'
> setenv set_bootargs 'setenv bootargs
> console=ttyS0,115200 root=LABEL=rootfs
> rootdelay=10 
> mtdparts=orion_nand:0x180000@0(u-boot),0x20000@0x180000(u-boot-env),0x600000@0x200000(uImage),0x1000000@0x800000(minirootfs),0x6800000@0x1800000(jffs2)
> earlyprintk=serial'
> setenv bootcmd_exec 'usb start; run set_bootargs;
> run load_uimage; run load_initrd; bootm 0x800000
> 0x2100000'
> setenv bootcmd_stock 'nand read.e 0x1200000
> 0x200000 0x600000;nand read.e 0x2000000 0x800000
> 0x1000000;bootm 0x1200000 0x2000000'
> setenv bootcmd 'run bootcmd_exec; run
> bootcmd_stock; reset'
> boot
>
>
> And then from Debian I should flash NAND as
> yuri_minsk did:
>
> dd
> if=u-boot-db88f6282abp_533ddr3db_nand.pached.bin
> of=uboot-netgear-rnd2.mtd0.kwb bs=512k conv=sync
> flash_erase /dev/mtd0 0 4
> nandwrite  /dev/mtd0 uboot-netgear-rnd2.mtd0.kwb
>


Not quite. Yury kwboot with stock uboot. The above envs would work only with stock uboot. You kwboot with new uboot so the envs are different.

I will be back tomorrow.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: How to unbrick the Netgear Ready NAS Duo v2
September 15, 2021 05:13AM
Ok, will wait. Thank you!
Re: How to unbrick the Netgear Ready NAS Duo v2
September 15, 2021 03:21PM
For stock u-boot.


1. Create flash-ready uboot

dd if=u-boot-db88f6282abp_533ddr3db_nand.pached.bin of=uboot-netgear-rnd2.mtd0.kwb bs=512k conv=sync


1. kwboot with uboot-netgear-rnd2.mtd0.kwb

2. Intrreupt u-boot and,

setenv mainlineLinux yes
setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv load_initrd 'ext2load usb 0:1 0x2100000 /boot/uInitrd'
setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10  mtdparts=orion_nand:0x180000@0(u-boot),0x20000@0x180000(u-boot-env),0x600000@0x200000(uImage),0x1000000@0x800000(minirootfs),0x6800000@0x1800000(jffs2) earlyprintk=serial'
setenv bootcmd_exec 'usb start; run set_bootargs; run load_uimage; run load_initrd; bootm 0x800000 0x2100000'
setenv bootcmd_stock 'nand read.e 0x1200000 0x200000 0x600000;nand read.e 0x2000000 0x800000 0x1000000;bootm 0x1200000 0x2000000'
setenv bootcmd 'run bootcmd_exec; run bootcmd_stock; reset'
boot


3. In Debian, check the mtds to make sure they look like this,

cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00180000 00020000 "u-boot"
mtd1: 001a0000 00020000 "u-boot-env"
mtd2: 00800000 00020000 "uImage"
mtd3: 01800000 00020000 "minirootfs"
mtd4: 06800000 00020000 "jffs2"



4. Fllash NAND as yuri_minsk did:

flash_erase /dev/mtd0 0 4
nandwrite  /dev/mtd0 uboot-netgear-rnd2.mtd0.kwb

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: How to unbrick the Netgear Ready NAS Duo v2
September 15, 2021 03:21PM
I'll be back for kwboot with new u-boot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: How to unbrick the Netgear Ready NAS Duo v2
September 16, 2021 03:28PM
For new u-boot.

Prepare the rootfs Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 on USB. Note that we are going to boot with the new u-boot, so skip Step 4 (should not be done).

1. kwboot with uboot.2017.07-tld-2-rc1.readynas_duo_v2.mtd0.kwb

The u-boot log should show that there is CRC error for the envs.

2. Interrupt u-boot and,

setenv mtdparts 'mtdparts=orion_nand:0x180000@0(u-boot),0x20000@0x180000(u-bootenv),0x600000@0x200000(uImage),0x1000000@0x800000(minirootfs),0x6800000@0x1800000(jffs2)'

and then

printenv
boot

3. In Debian, check the mtds to make sure they look like this,

cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00180000 00020000 "u-boot"
mtd1: 001a0000 00020000 "u-boot-env"
mtd2: 00800000 00020000 "uImage"
mtd3: 01800000 00020000 "minirootfs"
mtd4: 06800000 00020000 "jffs2"


4. At this point, the mtd0 should be flashed with either stock u-boot or new u-boot.

If the goal is to run stock OS on NAND then flash stock u-boot.

4.1. Flashing stock u-boot

Create flash-ready uboot

dd if=u-boot-db88f6282abp_533ddr3db_nand.pached.bin of=uboot-netgear-rnd2.mtd0.kwb bs=512k conv=sync

Flash

flash_erase /dev/mtd0 0 4
nandwrite  /dev/mtd0 uboot-netgear-rnd2.mtd0.kwb

4.2 Flashing new u-boot

More needed to be verified that the new u-boot can run stock OS on NAND. If the goal is to abandon stock OS then the new u-boot can be flashed without further investigation.

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

Your Email:


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: