Zyxel NSA 325 v2 - Bad Magic Number - No tftp, no usb

Hello, I have a Zyxel NSA 325 v2 and wanted to install OpenWrt on it. I have established a serial connection and can access it with PuTTY. I tried to follow the instructions to get the files on it, but the USB sticks (formatted in FAT32) were not recognized.

Marvell>> usb reset
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
0 Storage Device(s) found
Marvell>>

Then I tried to follow the instructions to use TFTP, but I couldn't establish a network connection between the NAS and the PC. I tried everything, and even ChatGPT couldn't really help.

I tried all of this without success and did the following:

  • Network card lights up
  • Different cable
  • Through a switch
  • Firewall disabled
  • Adjusted IP on PC and router (the PC always wanted a gateway, so I set it to 192.168.1.3, as the NAS is 192.168.1.1 and the PC is 192.168.1.100. Leaving the gateway empty is not possible on Windows 10)
  • Integrated into the normal network

Here are the printenv and the boot log (where the error now occurs).

boot:

 ** MARVELL BOARD: DB-88F6282A-BP LE

U-Boot 1.1.4 (Jul 18 2013 - 10:47:29) Marvell version: 3.5.9

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

Soc: 88F6282 A1CPU running @ 1600Mhz L2 running @ 800Mhz
SysClock = 533Mhz , TClock = 200Mhz

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

CPU : Marvell Feroceon (Rev 1)
Kernel address is 0x4640000.

Streaming disabled
Write allocate disabled


USB 0: host mode
        [BlueDBG] reseting SoC Pex[0]  0 ...
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
        [BlueDBG] reseting SoC Pex[1]  0 ...
        [BlueDBG] reseting SoC Pex[1]  1 ...
        [BlueDBG] reseting SoC Pex[1]  2 ...
        [BlueDBG] reseting SoC Pex[1]  3 ...
        [BlueDBG] reseting SoC Pex[1]  4 ...
        [BlueDBG] reseting SoC Pex[1]  5 ...
        [BlueDBG] reseting SoC Pex[1]  6 ...
        [BlueDBG] reseting SoC Pex[1]  7 ...
        [BlueDBG] reseting SoC Pex[1]  8 ...
        [BlueDBG] reseting SoC Pex[1]  9 ...
        [BlueDBG] reseting SoC Pex[1]  10 ...
PEX 1: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0
## Booting image at 00800000 ...
Bad Magic Number
Marvell>>

printenv:

bootdelay=2
baudrate=115200
loads_echo=0
rootpath=/srv/ubuntu
netmask=255.255.255.0
nandEcc=1bit
MODEL_ID=AE03
PRODUCT_NAME=NSA-325v2
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=MitraStar Technology Corp.
run_diag=yes
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
lcd0_enable=0
lcd0_params=640x480-16@60
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
ethact=egiga0
ethaddr=5C:F4:AB:51:69:25
ipaddr=192.168.1.1
serverip=192.168.1.100
gatewayip=192.168.1.100
bootargs=console=ttyS0,115200 root=/dev/mtdblock0 rw init=/init
bootcmd=bootm 0x800000
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
disaMvPnp=no
enaAutoRecovery=yes
kernel_addr=0x4640000
pcieTune=no
pcieTune1=no

Environment size: 1375/131068 bytes
Marvell>>

The error was probably caused when ChatGPT suggested these commands. Since then, the NAS no longer boots, but I can still access it via the serial connection.

Probably faulty commands:

Marvell>> setenv mtdparts 'mtdparts=orion_nand:0x00c0000(uboot),0x80000(uboot_env),0x7ec0000(ubi)'
Marvell>> setenv bootcmd 'run setenv bootargs; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000'
Marvell>> saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
Marvell>> reset

How can I at least get the device back to a "normal" state? Of course, I would prefer to have OpenWrt on the NAS, but having it running would be a good start :smiley:

thanks a lot for any help

you'll probably not be able to get it to boot as long as your incorrect ChatGP u-boot params are used, doesn't matter what you throw at it.

as for TFTP, use tcpdump to see if the device is actually trying to pull an image from whatever IP you've configured.

1 Like

Your current environment is not the result of the 'probably faulty commands'.

Did you put that USB stick in one of the ports on the back? The frontport cannot be used by u-boot.

yes. i used both on the back

make sure you use a really old USB flash drive too, the smaller (and hopefully older), the better.

1 Like

ok. but what are the right parameters?

TFTP tcpdump is for linux!?!? i use tftpd64 with (i think) the right config:

EDIT: i have changed the config to
pc 192.168.1.101
nas 192.168.1.2

all depends on the values you use in u-boot, they aren't fixed.
you shouldn't need to change anything in the TFTP tab except for the path perhaps.

it's described in https://openwrt.org/toh/zyxel/nsa325, but you've already read it, I assume.

ok. i have change the config again to the config from the link. but it does't work. i cant connect

Marvell>> tftpboot u-boot.kwb
*** Warning: no boot file name; using 'C0A80102.img'
Using egiga0 device
TFTP from server 192.168.1.101; our IP address is 192.168.1.2
Filename 'C0A80102.img'.
Load address: 0x0
Loading: T T T T T T T T T T
Retry count exceeded; starting again
Marvell>>

here the current printenv

bootdelay=2
baudrate=115200
loads_echo=0
rootpath=/srv/ubuntu
netmask=255.255.255.0
nandEcc=1bit
MODEL_ID=AE03
PRODUCT_NAME=NSA-325v2
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=MitraStar Technology Corp.
run_diag=yes
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
lcd0_enable=0
lcd0_params=640x480-16@60
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
ethact=egiga0
ethaddr=5C:F4:AB:51:69:25
default=-a
bootcmd=bootm 0x800000
bootargs=console=ttyS0,115200 root=/dev/mtdblock0 rw init=/init
ipaddr=192.168.1.2
serveraddr=192.168.1.101
gatewayip=192.168.1.1
serverip=192.168.1.101
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
disaMvPnp=no
enaAutoRecovery=yes
kernel_addr=0x4640000
pcieTune=no
pcieTune1=no

is this correct ? your screenshot says 100.

Yes, I changed it as described in the instructions

i can't ping the nas. i can connect with the lan cabel to another windows pc with the same config and everything works fine. but to the nas it didn't work

u-boot usually doesn't respond to pings, is a useless way of checking if a host in u-boot mode is up and running.

boot openwrt off a flash drive, configure the TFTP server IP as 192.168.1.1 on the 325, run tcpdump in openwrt, check if there's any traffic coming from IP 192.168.1.2.

Oh, thanks. But that's too complicated for me. I got Open WRT to work on the other laptop, but I don't have a WLAN connection to install the TFTPdump.

I think I'll just throw the NAS in the trash.

You can also install Wireshark on your Windows laptop, to do the same as you should have done with tcpdump.

1 Like

Head over to Doozan's, they might be able to provide additional support for unbricking.

I'd start by upgrading the u-boot though - https://forum.doozan.com/read.php?3,130039.

1 Like

OK, I will try this first. Than maybe I Check doozan. But I am a noob. :sweat_smile:

Everyone is born as noob. But nobody stops you to learn.

2 Likes