Welcome! Log In Create A New Profile

Advanced

Zyxel NSA320 : basic support for Debian installation

Posted by davygravy 
Re: Zyxel NSA320 : basic support for Debian installation
August 27, 2013 12:33AM
Currently, we don't have the NSA325 patch. What are the differences, spec wise, between NSA325 and 320?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA320 : basic support for Debian installation
August 28, 2013 07:26AM
Bodhi,

Thanks for the help.
Z
eas
Re: Zyxel NSA320 : basic support for Debian installation
August 30, 2013 02:17AM
I think the major differences are 1.6GHz vs 1.2GHz CPU and a USB3 port. I seem to recall some indication that there may be other less visible differences, like the system management chip.
Re: Zyxel NSA320 : basic support for Debian installation
September 04, 2013 11:47PM
Guys,

Here is the NSA325 thread at Arch site.
http://archlinuxarm.org/forum/viewtopic.php?f=27&t=4730

Looks like they use the NSA320 supported kernel and it works with some problem not resolved yet. Anybody wants to try Debian then try this rootfs here.
http://forum.doozan.com/read.php?2,12096
But pls put it on a new USB stick and don't change any uBoot envs yet until you're satisfied that you can use it :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA320 : basic support for Debian installation
October 14, 2013 08:46AM
I'd like to take a moment and thank chessplayer for donating the NSA325 so that Arch Linux ARM could generate patches to mainline to support it.

We have complete & working kernel patches at this time, with no issues.
Re: Zyxel NSA320 : basic support for Debian installation
October 14, 2013 12:06PM
Thanks for letting us know WarheadsSE, great works!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA320 : basic support for Debian installation
November 06, 2013 04:41PM
Hi, a few days ago that u-boot install in my nas320 and everything works perfect, but today tried to install a second hard drive and now not boot.

Hard drives are Seagate 2TB, with either boots, but if I put the two no.

This is what appears when you start:

U-Boot 2011.12 (May 03 2012 - 17:04:23)
ZyXEL NSA320 2-Bay Power Media Server

SoC:   Kirkwood 88F6281_A1
DRAM:  512 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
MV88E1318 PHY initialized on egiga0
Using egiga0 device
ping failed; host 192.168.11.149 is not alive
Hit any key to stop autoboot:  0 

Reset IDE: Bus 0: ............................................................** Timeout **
** Bad partition 1 **
** Bad partition 1 **
Wrong Image Format for bootm command
Error occured, error code = 108
ERROR: can't get kernel image!

Reset IDE: Bus 0: ............................................................** Timeout **
** Bad partition 1 **
** Bad partition 1 **
Wrong Image Format for bootm command
Error occured, error code = 108
ERROR: can't get kernel image!
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 0 Storage Device(s) found
** Block device usb 0 not supported
** Block device usb 0 not supported
Wrong Image Format for bootm command
Error occured, error code = 108
ERROR: can't get kernel image!
stopping USB..
## Error: "bootcmd_rescue" not defined
resetting ...



NSA320> printenv
arcNumber=3956
baudrate=115200
boot_sata1=mw 0x800000 0 1; setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts; ide reset; ext2load ide 0:1 0x800000 /boot/uImage; ext2load ide 0:1 0x01100000 /boot/uInitrd; bootm 0x00800000 0x01100000
boot_sata2=mw 0x800000 0 1; setenv bootargs console=ttyS0,115200 root=/dev/sdb1 rootdelay=10 $mtdparts; ide reset; ext2load ide 1:1 0x800000 /boot/uImage; ext2load ide 1:1 0x01100000 /boot/uInitrd; bootm 0x00800000 0x01100000
bootcmd=run boot_sata1; run boot_sata2; run bootcmd_usb; usb stop; run bootcmd_rescue; reset
bootcmd_usb=run usb_init; run usb_load_uimage; run set_bootargs_usb; run usb_boot;
bootdelay=3
console=ttyS0,115200
ethact=egiga0
ethaddr=b0:b2:dc:f0:fb:bd
if_netconsole=ping $serverip
ipaddr=192.168.11.150
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),512K(uboot_env),512K(key_store),512K(info),10M(etc),10M(kernel_1),48896K(rootfs1),10M(kernel_2),-(rootfs2)
netmask=255.255.255.0
partition=nand0,2
preboot=run if_netconsole start_netconsole
serverip=192.168.11.149
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
usb_boot=if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000;else bootm 0x800000;fi;
usb_device=0:1
usb_init=usb start
usb_load_uimage=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage
usb_root=LABEL=USBROOT
usb_rootdelay=10
usb_rootfstype=ext2

I tested with a 500Gb hard drive and one of the Seagate and works with two disks attached.

Any idea?
Re: Zyxel NSA320 : basic support for Debian installation
December 05, 2013 08:24AM
Does the stock OS still work if I install the uboot from here?

Thanks
Re: Zyxel NSA320 : basic support for Debian installation
February 24, 2014 06:22PM
Memesa Wrote:
-------------------------------------------------------
> Recently I've also updated uboot and installed
> debian through the package. I've put the debian
> installation on a 2 GB usb drive, with 1,5 GB ext2
> rootfs and 512 MB swap. After that I formatted my
> 2 TB HDD as ext4.
> However, I think the transfer speeds are less than
> what they were in the original firmware. Currently
> reaching ~20-25 MB/s write speeds and ~40 MB/s
> read utilising approx. 70% of the CPU while doing
> so. Is there any way to improve the performance?

Hi all,
I have same problems like Memesa. I flashed new uboot from davygravy tar package. I've installed kernel and debian rootfs from bodhi 07 Feb 2014 (link) on a 4GB usb stick (ext3 partition). I changed to usb_rootfstype=ext3. I use 2x 2GB Western Digital HDDs with a raid 1. Everything works like a charm except of the network transfer speed.

read speed test - looks good
hdparm -tT --direct /dev/md0

/dev/md0:
 Timing O_DIRECT cached reads:   330 MB in  2.01 seconds = 164.27 MB/sec
 Timing O_DIRECT disk reads: 360 MB in  3.00 seconds = 119.99 MB/sec

Please has anyone an idea how I can push the network transfer speed of my NSA320? I don't want to switch back to stock fw.



Edited 2 time(s). Last edit at 02/24/2014 06:28PM by axel-dd.
Attachments:
open | download - transfer-speed.png (25.3 KB)
Re: Zyxel NSA320 : basic support for Debian installation
February 24, 2014 11:14PM
Do you still have the dmesg output of stock FW? what is your current dmesg output look like?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA320 : basic support for Debian installation
February 25, 2014 11:30AM
I attached the full boot log from stock (before flashing uboot) and dmesg log from current debian.
Attachments:
open | download - logs.7z (12.2 KB)
Re: Zyxel NSA320 : basic support for Debian installation
February 25, 2014 07:30PM
Write of ~20-25MB/s
Read of ~40MB/s

Those sound about right.
Re: Zyxel NSA320 : basic support for Debian installation
February 27, 2014 12:22PM
It seems that I am not alone with this issue.
http://archlinuxarm.org/forum/viewtopic.php?f=23&t=6532

my transfer speeds are..
Read of ~20-25MB/s
Write of ~20-25MB/s

The only difference to Fma965 device is that I dont have the crc errors with serial connection.

At the moment I try to get the stock fw working with no success. How can I flash the original uboot with debian? Which packge do I need to get the command nandwrite working?
Re: Zyxel NSA320 : basic support for Debian installation
February 27, 2014 03:25PM
axel-dd,

I don't have 7zip installed on my boxes so have not looked at your log. But I'd refer to WarheadsSE re things related to the NSA3xx (whether it is possible write speed could be improved).

The nanwrite is part of mtd-utils package:
apt-get install mtd-utils

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA320 : basic support for Debian installation
February 27, 2014 05:31PM
thx bodhi for your help.

At the moment I am playing with arch linux booting from usb. The network transfer speeds are a little bit faster..
Read/Write of ~30-40 MB/s

I also uploaded the logs again as zip package.
Attachments:
open | download - logs.zip (14.5 KB)
Re: Zyxel NSA320 : basic support for Debian installation
February 27, 2014 11:42PM
axel-dd,

What if you use iperf to measure the network transit only (old and new kernel use different network drivers). Would it show the slow down at all? Also, this might be the difference in mv_sata version , but it's just my guess. It's good to use lsmod to get mv_sata module version in the stock FW and comparing it with the new kernel's module.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA320 : basic support for Debian installation
February 28, 2014 09:18AM
Sorry bodhi, at the moment I can't test anything. I tried to flash the stock uboot from arch linux post. It seems I killed uboot yesterday night. I don't get any signal from serial console. Is there any posibility to rewrite the uboot without access to serial console?
Re: Zyxel NSA320 : basic support for Debian installation
February 28, 2014 09:36AM
Just because you get no output, doesn't mean that the serial console is not "doing its job".

I am however unaware if kwbboot will work for the 320.
Re: Zyxel NSA320 : basic support for Debian installation
February 28, 2014 03:09PM
UART booting does work with the NSA320:
http://forum.doozan.com/read.php?3,7852

I recall that many have tried it successfully.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA320 : basic support for Debian installation
March 02, 2014 02:45PM
UART booting worked fine! My NSA320 is back in business...

Thank you very much...
Re: Zyxel NSA320 : basic support for Debian installation
March 02, 2014 03:13PM
axel-dd Wrote:
-------------------------------------------------------
> my transfer speeds are..
> Read of ~20-25MB/s
> Write of ~20-25MB/s

How do you get these speeds?
With Windows XP I tested with total commander and I get only 7000 - 10000 kbytes/sec! I have a debian wheezy with the latest kernel from bodhi. The filesystem is xfs and my hdparm speed tests are similar to the ones above.
Ok, if I stop some of the processes on the NAS (squeezeboxserver and mediatomb) I get speeds up to 15000 kbytes/sec writing to the NAS but still far from 20MB/s. Could there be anything wrong with my configuration?

HellG
Re: Zyxel NSA320 : basic support for Debian installation
March 03, 2014 07:33AM
Did you check your switch configuration? May be your port ist set to green mode and uses only 100Mbit? You can check it with..

ethtool eth0

Did you try an other cable?
Re: Zyxel NSA320 : basic support for Debian installation
March 03, 2014 03:54PM
On Arch Linux (Linux alarm 3.13.5-1-ARCH #1 PREEMPT Sun Feb 23 02:58:30 MST 2014 armv5tel GNU/Linux) I measured the network speed with iperf. The results are good.

Client connecting to 192.168.2.11, TCP port 5001
TCP window size: 22.9 KByte (default)
------------------------------------------------------------
[  3] local 192.168.2.186 port 51714 connected with 192.168.2.11 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  1.03 GBytes   885 Mbits/sec

I also tested the network speed with an nfs share.
Read 40-45 MB/s
Write 40-45 MB/s


Next time I take look at Debian and I will test transfer speed from a single hdd (no raid).



Edited 1 time(s). Last edit at 03/03/2014 03:56PM by axel-dd.
Re: Zyxel NSA320 : basic support for Debian installation
March 03, 2014 11:45PM
Axel-dd,

Can you get the numbers for USB drives (before and after), too? and also sata_mv version of stock FW (if there is sata_mv module running).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NSA320 : basic support for Debian installation
March 08, 2014 09:29AM
> Can you get the numbers for USB drives (before and
> after), too?
On stock FW I used none usb drive. Now with debian and arch I am using one 4GB usb flash drive on the back panel for booting the root fs.

and also sata_mv version of stock FW
> (if there is sata_mv module running).
sorry but I was not able to restore stock FW in my NSA-320. With the modified uboot the stock kernel on nand flash chip does no start any more. But I have also an NSA-325 with stock fw + ffp running. lsmod does not show any sata_mv module running. On NSA-325 I have read/write speed of more than 80MB/s.
Hi all,

I have been trying to get my NAS to boot from a partition I have created on my RAID array. I keep getting the following:

Loading file "/boot/uImage" from ide device 1:1 (hdb1)
Failed to mount ext2 filesystem...
** Bad ext2 partition or disk - ide 1:1 **
Loading file "/boot/uInitrd" from ide device 1:1 (hdb1)
Failed to mount ext2 filesystem...
** Bad ext2 partition or disk - ide 1:1 **
Wrong Image Format for bootm command
Error occured, error code = 108
ERROR: can't get kernel image!
(Re)start USB...
USB: Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 2 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) found
** Block device usb 0 not supported
** Block device usb 0 not supported
Wrong Image Format for bootm command
Error occured, error code = 108
ERROR: can't get kernel image!
stopping USB..
## Error: "bootcmd_rescue" not defined


The kirkwood image has been copied to it in the same fashion as the install document describes but no dice. Here is my environment:

printenv
arcNumber=3956
baudrate=115200
boot_sata1=mw 0x800000 0 1; setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts; ide reset; ext2load ide 0:1 0x800000 /boot/uImage; ext2load ide 0:1 0x01100000 /boot/uInitrd; bootm 0x00800000 0x01100000
boot_sata2=mw 0x800000 0 1; setenv bootargs console=ttyS0,115200 root=/dev/sdb1 rootdelay=10 $mtdparts; ide reset; ext2load ide 1:1 0x800000 /boot/uImage; ext2load ide 1:1 0x01100000 /boot/uInitrd; bootm 0x00800000 0x01100000
bootargs_root=rootdelay=90
bootcmd=run boot_sata1; run boot_sata2; run bootcmd_usb; usb stop; run bootcmd_rescue; reset
bootcmd_usb=run usb_init; run usb_load_uimage; run set_bootargs_usb; run usb_boot;
bootdelay=3
console=ttyS0,115200
ethact=egiga0
ethaddr=B0:B2:DC:88:8C:BD
if_netconsole=ping $serverip
ipaddr=10.10.75.200
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),512K(uboot_env),512K(key_store),512K(info),10M(etc),10M(kernel_1),48896K(rootfs1),10M(kernel_2),-(rootfs2)
netmask=255.255.0.0
partition=nand0,2
preboot=run if_netconsole start_netconsole
serverip=10.10.75.45
set_bootargs_usb=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
usb_boot=if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000;else bootm 0x800000;fi;
usb_device=0:1
usb_init=usb start
usb_load_uimage=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage
usb_root=LABEL=USBROOT
usb_rootdelay=10
usb_rootfstype=ext2

If anyone can help that would be awesome! Thanks in advance!
Re: Zyxel NSA320 : basic support for Debian installation
April 03, 2014 01:52AM
There are quite a few things that are wrong. Are you booting the original NSA320 U-Boot (much older U-Boot version)?

The info that raises attention right away is:
Loading file "/boot/uImage" from ide device 1:1 (hdb1)
meaning U-Boot looks for /boot/uImage from the second hard disk. And your boot_sata1
boot_sata1=mw 0x800000 0 1; setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 $mtdparts; ide reset; ext2load ide 0:1 0x800000 /boot/uImage; ext2load ide 0:1 0x01100000 /boot/uInitrd; bootm 0x00800000 0x01100000
looks for the kernel on /dev/sda1

And your boot_sata2
boot_sata2=mw 0x800000 0 1; setenv bootargs console=ttyS0,115200 root=/dev/sdb1 rootdelay=10 $mtdparts; ide reset; ext2load ide 1:1 0x800000 /boot/uImage; ext2load ide 1:1 0x01100000 /boot/uInitrd; bootm 0x00800000 0x01100000
looks for the kernel on /dev/sdb1.

They both should be enumerated by newer U-Boot as sda1 and sdb1.

Furthermore, I assume you want to boot with USB to run RAID array? then your bootcmd:
bootcmd=run boot_sata1; run boot_sata2; run bootcmd_usb; usb stop; run bootcmd_rescue; reset
should probably be
bootcmd= bootcmd_usb; usb stop; run boot_sata1; run boot_sata2; run run bootcmd_rescue; reset

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



Edited 3 time(s). Last edit at 04/03/2014 02:00AM by bodhi.
Bodhi,

Thanks for the reply. I am using the U-Boot that is in the tarball attached to the originating post on this thread. How are they enumerated?

Quote

They both should be enumerated by newer U-Boot as sda1 and sdb1.

Under which environment variable is this set? I assumed having boot_sata1 set to look at /dev/sda1 would be enough for it to boot, then the RAID partition would be built on boot up (sda1 + sda2). This is the case for my swap setup.

Quote

I assume you want to boot with USB to run RAID array?

I am not sure what you mean. I would like to utilise RAID, yes. Does this require booting with 'bootcmd_usb; usb stop;' first?

How should my boot commands look for booting from my RAID'd boot partition (/dev/md127, comprising /dev/sda1 and /dev/sda2)?
Re: Zyxel NSA320 : basic support for Debian installation
April 03, 2014 03:40PM
Flooreus,

First thing is U-Boot can't find any kernel (uImage) on your 2nd HDD. So it can't boot the kernel. I'm not familiar with davygravy's U-Boot build so I can't say why it enumerated your HDDs as hdxx. And this will come into play in the bootcmd.

> Under which environment variable is this set? I assumed having boot_sata1 set to look at /dev/sda1would be enough for it to boot

Usually it is, but currently it seems that your HDD 1 is /dev/hda1, and your HDD 2 is /dev/hdb1.

> I am not sure what you mean. I would like to utilise RAID, yes. Does this require booting with 'bootcmd_usb; usb stop;' first?

I'm not using RAID, so let's hope people who actually have this configuration will answer your question better! However, I would boot with USB rootfs if I were to set up a RAID for storage.

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

i have a NSA320S. I think the main diffrence is the RAM with only 256 MB compare to the 512 MB from the NSA320. Can I handle my divece like a NSA320 and flash the uboot of this thread?

This was my christmas projekt, but now i don't know if it will work.

Best regards.
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: