Welcome! Log In Create A New Profile

Advanced

Zyxel NSA320 : basic support for Debian installation

Posted by davygravy 
Zyxel NSA320 : basic support for Debian installation
May 01, 2012 05:04PM
Here is a tarball ( link 1 link 2 ) with all components for basic support for the Zyxel NSA320 (512MB sdram, dual SATA NAS , kirkwood SoC - all in a nice box). The tarball contains:
  • a complete rootfs w/ Debian 6.0 Squeeze & a 3.3.2 Linux Kernel, ready to boot
  • a NAND U-Boot for the NSA320, with default-enabled netconsole and booting presets
  • a 3.3.2 kernel config (for reference)
  • a very basic Installation Hints/Barebones Install Instructions, of course with the short but obligatory disclaimer about voiding one's warranty, etc.

After picking up one of these units last week from Buy.com for $80 and installing the two 2TB SATA drives I already had, it looks like a very solid, robust upgrade from my make-shift Pogoplug E02-based NAS. I've tested my kernel and U-Boot for about a week now, with a lot of reboot, adjustments to the rootfs, adding packages, and upgrading the kernel - everything seems to work very well

A couple of notes about each part:

Think before you flash, erase or do anything to your own box. It works great for me, but I don't know what your level of expertise is. You are responsible for your own actions - I assume no responsibility for what you do to your own equipment.

The rootfs is packaged as an ext3 image (kirkwood-debian_image.img) so you'll have to mount with the loop option, and cp -a the contents onto a preformatted sda1 partition. It is about 290MB in size, and has most of the packages you'd need initially. I cleared out the /var/cache/apt , which made the tarball quite a bit smaller. The qemu binary was not removed from /bin/ though, since is very useful for chrooting purposes and fixing stuff (like a kernel install gone wrong).

The U-Boot is based on Peter Schildmann's very nice work ( https://github.com/psch2/uboot-nsa320 ), and I added some features, like some presets/scripts for booting. An additional tweak for better function is a recent patch (from U-Boot mailing lists) to allow booting from both SATA ports. I've tested this and it works on my NSA320, but you may have to add in the root=LABEL option in your bootargs as well as the label for the partition in question.

The kernel is the 3.3.2 kernel that I posted in late April, (version 1.1) which supports all mainline-supported Kirkwood boxes, plus the GoFlex Net/Home, Pogoplug-Kirkwoods, and of course the NSA320 (Zyxel support from Peter, again) The config used is essentially identical to the normal Debian profile for kirkwood. Everything I've tested on it works as expected, including the hwmon setup for monitoring fan speed and chassis temperature (see contents of /sys/class/hwmon/hwmon0, and use "sensors" in lm-sensors package).

A very, very big thanks to Peter Schildmann (for the basic kernel patch, initial U-Boot support) and Vlad (his QEMU-based desbootstrap writeup saved me time - I'd done chrooted debootstraps many times before, but the QEMU-based 2nd stage debootstrap made successive modifications a cinch - a very nice elegant touch to the process). Thanks to Luka Perkov and Simon Baatz for the DEV() SATA bus patch.

=====================================================



Edited 6 time(s). Last edit at 05/14/2012 04:05PM by davygravy.
Re: Zyxel NSA320 : basic support for Debian installation
May 02, 2012 08:04AM
Very interesting. I'm thinking about a possible upgrade to my current Dockstar, which is used as a seedbox, for sabnzbd, and as a NAS.

How much RAM does the Zyxel box have?
The hwmon_nsa3x0 module provides the sensor data through the sysfs interface as described in Documentation/hwmon/sysfs-interface. Just use sensors/xsensors.
Re: Zyxel NSA320 : basic support for Debian installation
May 02, 2012 04:29PM
Hi Peter, thank you for pointing that out. I'm guessing that it changed from /proc/mcu to /sys/class/hwmon when lm-sensors changed? Or maybe this was some other (kernel-based?) change?

Anyway, you are correct, I see, and it does work just fine. Thanks for the help.

root@timecapsule:/# sensors
nsa3xx-isa-0000
Adapter: ISA adapter
Chassis Fan:       3100 RPM
System Temperature: +50.9 C

and it all sits in /sys/class/hwmon
root@timecapsule:/# ls /sys/class/hwmon/hwmon0/
device	power  subsystem  uevent

=====================================================
Re: Zyxel NSA320 : basic support for Debian installation
May 02, 2012 04:42PM
hanker Wrote:
-------------------------------------------------------
> Very interesting. I'm thinking about a possible
> upgrade to my current Dockstar, which is used as a
> seedbox, for sabnzbd, and as a NAS.
>
> How much RAM does the Zyxel box have?

512MB SDRAM, 128MB NAND , 3 USB2.0 ports (1 fore, 2 aft)

=====================================================
Re: Zyxel NSA320 : basic support for Debian installation
May 06, 2012 05:08PM
Can we overclock this device to ~=1.6 G (1,589) using uboot?



Edited 1 time(s). Last edit at 05/06/2012 05:15PM by tikblang.
Re: Zyxel NSA320 : basic support for Debian installation
May 06, 2012 05:29PM
I doubt it. You'd need a larger heatsink, and it might not be stable anyway.

http://wiki.openwrt.org/toh/seagate/dockstar#overclocking.and.underclocking tells specifics of why this is probably a bad idea.

=====================================================



Edited 1 time(s). Last edit at 05/06/2012 07:22PM by davygravy.
Re: Zyxel NSA320 : basic support for Debian installation
May 07, 2012 09:23AM
Is it still available for $80? Link
Re: Zyxel NSA320 : basic support for Debian installation
May 07, 2012 04:43PM
Naw, now $113 ... http://www.buy.com/prod/zyxel-nsa320-2-bay-network-attached-storage-and-media-server/220639546.html

If you watch bensbargains.net or dealnew.com you may see a good deal come by occasionally.

=====================================================
Re: Zyxel NSA320 : basic support for Debian installation
May 10, 2012 09:37AM
Re: Zyxel NSA320 : basic support for Debian installation
May 10, 2012 11:54PM
That's still a good deal... wow, sold out fast...

BTW, I've rolled a update of Jeff's Recovery/Rescue image... will test it on my Zyxel and post with directions to flash it.

=====================================================
Re: Zyxel NSA320 : basic support for Debian installation
May 11, 2012 11:59AM
Glad I was able to get one. Once it arrives I will give this a try. May have questions :-)

Thanks for all of your work and sharing it with everyone else.
Re: Zyxel NSA320 : basic support for Debian installation
May 13, 2012 04:54PM
There seems to be some issue with apt-get. Certain folders related to dpkg are missing from the rootfs.

Quote

E: List directory /var/lib/apt/lists/partial is missing. - Acquire (2: No such file or directory)
E: Could not open lock file /var/lib/dpkg/lock - open (2: No such file or directory)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
Re: Zyxel NSA320 : basic support for Debian installation
May 13, 2012 05:34PM
what does
apt-get update
yield?

=====================================================



Edited 1 time(s). Last edit at 05/13/2012 05:34PM by davygravy.
Re: Zyxel NSA320 : basic support for Debian installation
May 13, 2012 05:40PM
^ Similar errors.

Had to follow the steps given here to fix it.
Re: Zyxel NSA320 : basic support for Debian installation
May 13, 2012 05:58PM
thanks for the headsup... and the pointer to a workaround...

hmmph... I'll try to replicate that here (sounds like perhaps I was too agressive in cleaning some stuff out...)

when fixed, I'll repost...

I don't understand why I don't see it here, though...

=====================================================
Re: Zyxel NSA320 : basic support for Debian installation
May 13, 2012 10:08PM
Good catch... it is certainly borked... will repost the "larger" tarball.

Fixed, tested and uploading. (yes, apt-get works fine, /var/lib/dpkg and all the goodies are there)

=====================================================



Edited 3 time(s). Last edit at 05/13/2012 11:03PM by davygravy.
Re: Zyxel NSA320 : basic support for Debian installation
May 18, 2012 09:51PM
@davygravy : The new rootfs didn't work for me. Not sure why, maybe its the pendrive. Don't have a serial cable attached so not sure what's happening. I did check the logs folder, but nothing is there.

Edit : It booted at the 3rd try, not sure what was wrong! Weird.



Edited 1 time(s). Last edit at 05/18/2012 10:07PM by varkey.
Re: Zyxel NSA320 : basic support for Debian installation
May 19, 2012 04:21AM
Kk. If you spot a problem plz post back

=====================================================
Re: Zyxel NSA320 : basic support for Debian installation
June 22, 2012 04:38PM
Where can I find a serial cable for the console or do I have to make one?

Richard
Re: Zyxel NSA320 : basic support for Debian installation
June 22, 2012 06:30PM
FYI for the usb cable I bought 2 of These and once I found the right driver and did a little soldering they worked great.

I also bought a bunch of These and installed one right in the box, and put a standard mini stereo headphone jack (from radio shack) on the end of the wire and can serial in whenever I need to.
Re: Zyxel NSA320 : basic support for Debian installation
June 27, 2012 08:36AM
Would you point to or post details/photos where to connect to board
Re: Zyxel NSA320 : basic support for Debian installation
July 30, 2012 05:29PM
The USB cable listed above is a Prolific PL2303

Driver Here:
http://www.prolific.com.tw/US/supportDownload.aspx?FileType=56&FileID=133&pcid=85&Page=0

Logon to the page: guest/guest
Re: Zyxel NSA320 : basic support for Debian installation
July 30, 2012 08:53PM
The Pin Layout of the cable listed above

J2 | 1 2 3 4 5 |

1 ... 3.3V (Red)
2.. TxD (White)
3.. RxD (Green)
4.... Blank
5.... GND (Black)
Re: Zyxel NSA320 : basic support for Debian installation
August 02, 2012 07:08AM
Hi davygravy,

thanks a lot for this debian install, as it saved my day yesterday. Anyway, now my situation is the following:

a) I have Jeff's standard uBoot installed
b) I have your rescue V2.8 installed
c) I just created a USB drive as per the REAME.quickstart... in your tarball above.

This (normally) boots just fine, BUT: it will always ask me to modify the password! Any idea why this is so? It is a bit annoying, actually, since it is hard to keep track of which password is the current one.

So, help would be appreciated on this little issue, but the help so far already IS very much appreciated.

Cheers,

chessplayer
Re: Zyxel NSA320 : basic support for Debian installation
August 30, 2012 04:51PM
Hey Davy,

I was wondering if there is a way to boot the original zyxel firmware after installing debian or is there a way to go back to stock after installing debian?

Unfotunately I didn't back up the original flash area but I was hoping maybe you did :-)

Thanks,

Michael
Re: Zyxel NSA320 : basic support for Debian installation
August 30, 2012 08:53PM
No idea, I've never seen the password issue you mention.

=====================================================
Re: Zyxel NSA320 : basic support for Debian installation
August 30, 2012 08:56PM
mcrump001 Wrote:
-------------------------------------------------------
> Hey Davy,
>
> I was wondering if there is a way to boot the
> original zyxel firmware after installing debian or
> is there a way to go back to stock after
> installing debian?
>
> Unfotunately I didn't back up the original flash
> area but I was hoping maybe you did :-)
>
> Thanks,
>
> Michael

Hi mcrump001/michael,

Well, I'm one of those people who sees stock firmware and says ... meh ... um, thanks I use my own.

No, I didn't keep a backup of it. Sorry, I can't help you there. There might be some way to extract it from a Zyxel installer (if there is one), but I know nothing about it...

=====================================================
Re: Zyxel NSA320 : basic support for Debian installation
August 30, 2012 09:59PM
Thanks Davy. One more question. Is there a way I can recompile my own kernel and get complete led support for my nsa320?
Re: Zyxel NSA320 : basic support for Debian installation
September 05, 2012 12:10PM
Here are the patches that Arch Linux ARM added recently for 3.1.10 to bring 310/320 support w/ LEDs & arcNumber's

I have an untouched NAND aside from the u-boot on my device.
Author:

Subject:


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