Welcome! Log In Create A New Profile

Advanced

OpenWRT or Debian on Zyxel NSA325v2

Posted by AleXSR700 
OpenWRT or Debian on Zyxel NSA325v2
April 30, 2021 02:10AM
Hello everyone,
I would like to give OpenWRT or maybe Debian a try on my NAS from Zyxel (NSA325v2).
According to the instructions (https://openwrt.org/toh/zyxel/nsa325 1), the u-boot.kwb from 19.x.x release is bugged and won't allow access to any mass storage, so it is recommended to use the latest 18.x.x version.

Now, I hope someone can help me with one or two questions I have:

- Is this information still valid and do I only need to replace the u-boot.kbw or also other files?
- Is it recommended to use the entire 18.x.x release with that u-boot.kwb or can the 18.x.x and 19.x.x be safely used together?
- Are there any known issues with accessing external or internal drives? Given that it is a NAS, the worst that could happen would be losing access to my drives or being restricted in the kind of drives I can use.
- What is the difference between the u-boot found in the instructions (so here) and the one from here?
- Will booting Debian require an external USB stick or an internal HDD to boot? Or will it fit on the system's internal storage?

Any help would be greatly appreciated and if anybody has anything to add or correct as far as installation instructions go, please feel free to comment :slight_smile:

All the best
Alex

FYI: I initially started this thread in the OpenWRT forum but a reply there and Google searching kept bringing me here :)
(https://forum.openwrt.org/t/openwrt-on-zyxel-nsa325v2/95352)
Re: OpenWRT or Debian on Zyxel NSA325v2
April 30, 2021 02:24AM
AleXSR700,

The basic 2 step to install Debian and new u-boot.

If you are inside stock OS, you can install both new U-Boot and new Debian rootfs:

1. On another Linux box, create the Debian rootfs using Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 following the instruction.

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

Scroll down to the section

Quote

Updated 25 Aug 2019:

Basic Debian buster Kirkwood rootfs for most Kirwood plugs:

2. Dowload the u-boot tarball uboot.2017.07-tld-1.nsa325.bodhi.tar to this new USB rootfs:

U-Boot:
https://forum.doozan.com/read.php?3,12381

3. And then attach the new USB rootfs to the NSA25 box. Follow the u-boot installation instruction to flash u-boot.

After installing on USB, and have verified that it works, you can transfer the USB rootfs to the internal HDD and run the system from there, if desire.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: OpenWRT or Debian on Zyxel NSA325v2
April 30, 2021 02:26AM
Quote

- Will booting Debian require an external USB stick or an internal HDD to boot? Or will it fit on the system's internal storage?

This box NAND is too small for the Debian rootfs to fit in.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: OpenWRT or Debian on Zyxel NSA325v2
April 30, 2021 03:11AM
Thank you @bodhi!

If OpenWRT fits on the NAND, I might consider doing that. I am a bit afraid to lose all functionality if my USB stick dies and I do not want to keep my HDDs awake. One NAS is storage only and the other NAS has only one HDD that is regularly used.

What is the difference between uboot.2017.07-tld-1.nsa325.bodhi.tar and the uboot from OpenWRT? OpenWRT seems newer, but is it really better or just constant updating with no benefit (or even disadvantages?)?

Or should I use the OpenWRT uboot for OpenWRT and the uboot.2017.07-tld-1.nsa325.bodhi.tar only for Debian?
Re: OpenWRT or Debian on Zyxel NSA325v2
April 30, 2021 03:24AM
I recommend to use uboot from openwrt. Environment variable will be set correctly. For sure you should have serial cable before you start your adventure.
Re: OpenWRT or Debian on Zyxel NSA325v2
April 30, 2021 03:35AM
AleXSR700,

> If OpenWRT fits on the NAND, I might consider
> doing that. I am a bit afraid to lose all
> functionality if my USB stick dies

It is OK to run USB rootfs if you take precaution, and do back up regularly. I have multiple Kirkwood boxes that run with USB rootfs (Sandisk thumb drives, which are most reliable) for many years. All my media server NAS run with USB rootfs and the HDDs are idle until I stream something.


> What is the difference between
> uboot.2017.07-tld-1.nsa325.bodhi.tar and the uboot
> from OpenWRT? OpenWRT seems newer, but is it
> really better or just constant updating with no
> benefit (or even disadvantages?)?

Probably not much different. They actually used WarheadSE (Arch Linux ARM)'s and my patches as the starter to build their u-boot. If anything, they have probably removed some functionalities.

> Or should I use the OpenWRT uboot for OpenWRT and
> the uboot.2017.07-tld-1.nsa325.bodhi.tar only for
> Debian?

If you only install OpenWrt then use their u-boot version.

If you want to run both then use my u-boot version. See here for the installation steps:

https://forum.doozan.com/read.php?4,42279
or
http://forum.doozan.com/read.php?4,29966

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: OpenWRT or Debian on Zyxel NSA325v2
April 30, 2021 05:11AM
Quote

If you only install OpenWrt then use their u-boot version.

If you want to run both then use my u-boot version. See here for the installation steps:

I'll take that back.

You should use OpenWrt u-boot version to run both OpenWrt and Debian.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: OpenWRT or Debian on Zyxel NSA325v2
April 30, 2021 05:46AM
Why the change of heart?
Re: OpenWRT or Debian on Zyxel NSA325v2
April 30, 2021 07:02AM
AleXSR700,

If you run Debian only, then use my uboot.

If you run both systems in this box, you could use either. However, using OpenWRT uboot is a bit easier in this case, because I don’t have the envs setup to boot both , atm. Of course, it can be done easily if you prefer my uboot version.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: OpenWRT or Debian on Zyxel NSA325v2
May 11, 2021 01:50AM
Hello everyone,
my new FTDI adapter arrived and I tested it on a smart socket and it works nicely.

So next I wanted to tackle my NSA325v2 and maybe I am thinking to complex but are not all steps performed via the usb to serial connection?
Because the OpenWRT instructions basically start by booting into u-boot, but there is no description on how to do that.
I tried simply using my serial connection and the blue LED lights up, but Putty cannot connect. On my smart socket I had to bridge IOO and GND to get access. Is there something similar needed here?
Or do I need to twist TX and RX? So is the scheme on https://openwrt.org/toh/zyxel/nsa325 the way to plug in? So FTDI Adapter TX goes to the pin labelled TX, correct? It is not meant that that one is TX and so it needs to be plugged into RX on the adapter?

Per your recommendations I would like to start off with the OpenWRT u-boot and image and depending on how that goes and how much I like it, maybe move to Debian afterwards. But I am lacking the initial u-boot installation instructions it seems.

P.S.: I am assuming that I do not need to plug in the power supply, correct? Or does the FTDI's 3.3V not suffice to boot and I need the power supply?



Edited 1 time(s). Last edit at 05/11/2021 01:51AM by AleXSR700.
Re: OpenWRT or Debian on Zyxel NSA325v2
May 11, 2021 04:19AM
AleXSR700,


> I tried simply using my serial connection and the
> blue LED lights up, but Putty cannot connect.

Your wires connection is probably not correct.

> Or do I need to twist TX and RX?

Most of the time you do need to cross TX and RX. For certain older model of the CP2xxx module converter, the 2 wires already crossed. For the PL3xxx chip module, the wires TX and RX need to be crossed.

> P.S.: I am assuming that I do not need to plug in
> the power supply, correct? Or does the FTDI's 3.3V
> not suffice to boot and I need the power supply?

Correct. Never connect the 3.3.V (it will fry your NSA325 serial port). Only 3 wires are needed: TX, RX, and GND.

See the pinout for this box here (these Zyxel NAS boxes have the same pinouts):

https://forum.doozan.com/read.php?3,51739,51919#msg-51919

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: OpenWRT or Debian on Zyxel NSA325v2
May 11, 2021 05:48AM
Then let's hope I did not fry my serial port because I attached the 3.3V as per the scheme on the OpenWRT Wiki. That is not a smart picture or instruction then.
Especially given that it states you need 3.3V but then you don't use it.

I will try it this evening after work.
Most other devices (non NAS) need the 3.3V as power supply because they are flashed without mains connection
Re: OpenWRT or Debian on Zyxel NSA325v2
May 11, 2021 10:21AM
So, device is still working, however, I have had absolutely no luck getting the u-boot flashed. I have tried all my usb sticks and none seem to work. Not even the ones I used to use as swap on old Linux sat receivers.

TFTP servers also do not work (Tried 3 different ones). Just keeps to download but abort because it cannot connect/download.

Anybody have any ideas?
Re: OpenWRT or Debian on Zyxel NSA325v2
May 11, 2021 04:54PM
AleXSR700,

The easiest way is boot the new u-boot using kwboot. Once the new u-boot is running, installing OpenWrt is quite easy.

1. This is how to run kwboot. The instruction is for NSA320s, but is same for NSA325 (using u-boot image uboot.2017.07-tld-1.nsa325.mtd0.kwb)

https://forum.doozan.com/read.php?3,51739,51919#msg-51919

2. And when this new u-boot start running, use this instruction for the Pogo E02 to install OpenWrt:

https://forum.doozan.com/read.php?4,42279

The instruction is for Pogo E02, so the file you need is different

Quote

https://downloads.lede-project.org/releases/17.01.4/targets/kirkwood/generic/lede-17.01.4-kirkwood-pogo_e02-initramfs-uImage

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: OpenWRT or Debian on Zyxel NSA325v2
May 12, 2021 02:09AM
Thank you @bodhi!

I will try kwboot now, but I am either doing something wrong or something is no longer working.

I am running a RPi 4 with 8 GB, Raspian OS 64-bit.
[91387.374689] usb 1-1.3: Detected FT232RL
[91387.379766] usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB0
pi@pi:~/Downloads/kwboot-tool $ ls -la
total 5664
drwxr-xr-x 2 pi pi    4096 May 12 09:03 .
drwxr-xr-x 3 pi pi    4096 May 12 08:47 ..
-rw-r--r-- 1 pi pi 4063232 May 12 08:51 18.bin
-rwxrwxrwx 1 pi pi   15604 May 12 09:03 kwboot
-rw-r--r-- 1 pi pi  569104 May 12 08:51 uboot.bin
-rw-r--r-- 1 pi pi  569168 May 12 08:51 uboot.img
-rw-r--r-- 1 pi pi  569620 May 12 08:51 uboot.kwb
pi@pi:~/Downloads/kwboot-tool $ ./kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.kwb
bash: ./kwboot: No such file or directory
pi@pi:~/Downloads/kwboot-tool $

Using this kwboot https://bitly.com/2hfdNPS you linked.
The uboot.kwb is the OpenWRT one.

P.S.: /dev/ttyUSB0 seems to be working as Putty can connect without any issues.



Edited 1 time(s). Last edit at 05/12/2021 02:19AM by AleXSR700.
Re: OpenWRT or Debian on Zyxel NSA325v2
May 14, 2021 02:07AM
So, I wanted to give my feedback and hopefully this will help others in the future also.

Situation:
USB sticks were not recognized. TFTP did not work. kwboot did not work.

Then came a recommendation by Mijzelf to check if the 5V for the USB was actually being supplied properly. So I added an active USB Hub in between so the USB stick was already powered externally and not through the board.
And it worked!

So, if anybody has the same issue with USB sticks not being recognized or files not being readable, try an active USB hub.

In addition I found that I could not use the same USB stick to flash uboot and the actual OpenWRT. It just would not work. I need to reboot with a different USB stick (no rebooting with the same USB stick did not fix it).
And then it worked.
I tried on my second NSA325v2 using the second USB stick first. Same picture. I had to use two USB sticks in whatever order. The system just wanted two sticks even though both had the same files and same worked.

Anyhow, long story short: THANK YOU ALLLLLL!!!!!!!!!!!!!!!!!!

OpenWRT is now installed and next I need to figure out why I do not have a built in file browser in OpenWRT and then install one to check if the drives are read properly.

Summary:
Use an active USB hub and have two USB sticks prepared ;-)
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: