Welcome! Log In Create A New Profile

Advanced

Zyxel nsa320s won't boot

Posted by steve1987 
steve1987
Zyxel nsa320s won't boot
February 14, 2016 05:10PM
I have installed latest uboot (and configured netcat) as described in the sticky thread - as I understood it would allow me to boot from all the media usb/hdd/flash.

But after rebooting, zyxel won't load original firmware, LAN led blinks for a second, and power led goes from solid green to flashing amber.

I have tried to create bootable pendrive with debian as described in: http://forum.doozan.com/read.php?2,12096

- created single ext3 partition with rootfs label,
- extracted latest debian image (Debian-3.18.5-kirkwood-tld-1-rootfs-bodhi.tar.bz2) to it (as root),
- created embedded DTB (I had to take DTB from the newer kernel 4.4 because there was no such file in debian archive):

cd /media/sdb1/boot
cp -a zImage-3.18.5-kirkwood-tld-1  zImage.fdt
cat dts/kirkwood-nsa320s.dtb  >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.18.5-kirkwood-tld-1 -d zImage.fdt uImage
sync

When I try to boot from pendrive, zyxel tries to read from it and the led goes from solid green to flashing green/amber.

How can I force nc to work? I tried several tools (OS X) and I am sure I have my IPs set properly.

Apart from rs232 - how can I debug this behaviour?
steve1987
Re: Zyxel nsa320s won't boot
February 14, 2016 05:17PM
Correction:

after booting with pen drive pendrive inserted power LED:

1) lights solid green (5 seconds)
2) blinks green only (10 seconds)
3) blinks green/amber (forever)

Please advise.
Re: Zyxel nsa320s won't boot
February 14, 2016 06:38PM
steve1987,

1. The LED behavior might indicate that the kernel file was not the right one to boot with the current setings of u-boot envs. Which u-boot you have installed? version ?

2. The rootfs 3.18.5 did not yet support the NSA320S kernel.

Quote

Updated 16 April 2015:

Kernel 4.0.0-kirkwood-tld-1 package has been uploaded. The following features were added:

1. This FDT kernel now supports NSA320S, Asus M25, and Netgear Stora. They are still under test, so please post feeback if you try this kernel.

So the kernel 3.18.5 possibly has problem booting even with the NSA320S DTB. We need serial console (at least netconsole) to see what's going on here.

3. How did you set up netconsole? and how do you try to connect it now? pls post log of installation and current log of attempts.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
steve1987
Re: Zyxel nsa320s won't boot
February 15, 2016 12:08AM
1. uboot.2015.10-tld-1.nsa310s.bodhi.tar

2. I used the latest roots I found, is there any newer I can use?

3. I have no install history, but I did it step by step by the tutorial together with section B.
The only command I hadn't run was fw_setenv mtdparts 'xxxxxxxxx' since there was no such value in my env variables.

Original env:

bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
bootcmd=nand read.e 0x2000000 $(kernel_addr) 0xA00000; bootm 0x2000000
bootdelay=2
baudrate=115200
loads_echo=0
ipaddr=10.4.52.165
serverip=10.4.52.7
rootpath=/srv/ubuntu
netmask=255.255.255.0
nandEcc=1bit
kernel_addr=C80000
MODEL_ID=AF03
PRODUCT_NAME=STG-326
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=MitraStar Technology Corp.
run_diag=yes
ethaddr=4C:9E:FF:58:A4:10

I set up net console in the last setup step with:

fw_setenv serverip <nsa ip>
fw_setenv ipaddr <computer ip>
fw_setenv if_netconsole 'ping $serverip'
fw_setenv start_netconsole 'setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;'
fw_setenv preboot 'run if_netconsole start_netconsole'
fw_setenv preboot_nc 'setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi'
fw_setenv reboot 'run preboot_nc'  (overwritten previous value)

I am trying to connect from OS X, the command nc -l -u -p 6666 gave me nc: missing port with option -l and nc -l 6666 -u -p 6666 gave me nc: cannot use -p and -l tried the following:

nc -l -u 192.168.1.10 6666
nc -l -u localhost 6666
nc -ul 6666

and I tried with asuc (http://svolli.org/software/asuc/) as well.

I might get a cable today, so there is a chance I'll post a log in next 12 hours.
Re: Zyxel nsa320s won't boot
February 15, 2016 01:36AM
steve1987,

> 2. I used the latest roots I found, is there any
> newer I can use?

Unfortunately, no. The latest rootfs is 3.18.5.

> fw_setenv reboot 'run preboot_nc' (overwritten
> previous value)

There is a typo here.

fw_setenv preboot 'run preboot_nc'

For netconsole, because there are many versions of netcat in different OS, you'll have to try and see which one works. But I think the typo above might have been the reason for not being to connect. Some network environment is noisy, so the multiple pings are to make sure it detects the netconsole server successfully.

This command format always work for me:
nc -lup 6666 192.168.1.10 6666

> I might get a cable today, so there is a chance
> I'll post a log in next 12 hours.

With serial console it is much easier to troubleshoot booting problem. Let's see the serial console booting log, and go from there.

If you have another ARM Linux box, I would recomend chroot into the rootfs and install new kernel. But if you can boot with serial console into Debian, then you can install kernel 4.4.

Thanks for posting this problem! it's a reminder that I'll need to release a new rootfs so that installation for the newer Kirkwood boxes will be more robust.

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



Edited 1 time(s). Last edit at 02/15/2016 01:39AM by bodhi.
steve1987
Re: Zyxel nsa320s won't boot
February 15, 2016 01:41AM
This was only the typo in post, not in console (autocorrect). If the command was correct, is there a chance netconsole will work?

The serial cable delivery will be delayed, I will try to reach my box from the network in the meantime.

I only have virtualbox with latest Ubuntu and physical computer with osx.

Once I get a log, I'll post it here.
steve1987
Re: Zyxel nsa320s won't boot
February 15, 2016 05:00PM
Ok, I managed to get my 320s up and running.

For other people that might get a similar problem: if your device refuses to come up on eth0, see UART. In my case, the old kernel didn't have eth0 drivers.

I logged into the system on UART and installed new 4.4 kernel - after reboot eth0 came up, and I performed dist-upgrade.

bohdi, thank you!

now onto non-functional second drive bay... :)
steve1987
Re: Zyxel nsa320s won't boot
February 15, 2016 05:01PM
bodhi. my autocorrect is killing me on this thing.

Thanks again!
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: