Post the specs if you have it. Ususally the Zyxel NAS can be booted from USB with just some adjustment in u-boot envs. To know if possible to boot kirkwood rootfs, we need at least the specs (e.g which SoC).

To know if possible to have new u-boot, I have to see the boot log. So either you have bought it, or someone did and posted their serial bootlog.

I have been trying to do just that for the last couple of days. Here is the beginning of the bootlog, let me know if you need to see more: https://paste.debian.net/423594/

While the u-boot has usb support compiled in it does not find any devices. Scsi/sata support on the other hand is working. I can select, list and jump to zImage/uImages on a hard disk but after that I am stuck at:

I tried plugging a USB thumb drive in all of the 3 ports and it could not find any devices. So I assume booting off of USB is not working with the stock U-Boot. SCSI on the other hand is working. It's just ignoring my kernel images.

But it is typical of Zyxel NAS to not enable it (similar situation as other Zyxel NAS). What we did was do a memory write (aka poke) to turn on USB power. Let's see if I can find that in the forum. I always failed to record this in the log, it must be a subconcious thing that shows an extreme dislike for this :))

... OK found this poke for the NSA325. So try this in serial console:

mw.l f1010100 0020c000
usb start

> SCSI on the other hand is working.
> It's just ignoring my kernel images.

Got my NAS326 yesterday, managed to connect via usb-serial - and, yep, usb power is disabled in uboot.
After experimenting a bit, I've found a way to enable it. Yep, another "magic number" to apply (NAS326 is based on Armada 380, it has different GPIO addresses from Kirkwood chips).

Before we start, let's remember the default memory value:

Marvell>> md.l f1018140 1
f1018140: 003c8000

And here you are - enable usb power from uboot on NAS326 (front usb socket only - usb2.0):

I bought this thing to rewrite the boot order of my previous NSA325 some years ago.

The behaviour is more exactly:
The LEDs don't start blinking, if the tinybreakout is connected. When I unplug the serial converter it begins to boot. Then I can re-plug it and get the output. So I assume, "something" inside the NSA326 checks, if the certain pins are connected and refuses to boot or tries to boot via serial console.

> The behaviour is more exactly:
> The LEDs don't start blinking, if the tinybreakout
> is connected. When I unplug the serial converter
> it begins to boot. Then I can re-plug it and get
> the output. So I assume, "something" inside the
> NSA326 checks, if the certain pins are connected
> and refuses to boot or tries to boot via serial
> console.

That's abnormal. The bootROM should not behave that way. It seems u-boot did not even come in to play.

In previous post I wrote how to install 16.04 armhf to usb stick, but NAS326 stock kernel was lacking some features to boot Ubuntu. Here you are 2 missing pieces - recompile the kernel with "File systems -> Kernel automounter version 4 support" and "General setup -> Control Group support" - and everything just boots and works (IMO will also boot with Debian Initrd from Bodhi).

Exact kernel config options to append:

CONFIG_CGROUPS=y
CONFIG_CGROUP_DEBUG=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CPUSETS=y
CONFIG_PROC_PID_CPUSET=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_RESOURCE_COUNTERS=y
# CONFIG_MEMCG is not set
# CONFIG_CGROUP_SCHED is not set
CONFIG_BLK_CGROUP=y
# CONFIG_DEBUG_BLK_CGROUP is not set
# CONFIG_BLK_DEV_THROTTLING is not set
# CONFIG_CFQ_GROUP_IOSCHED is not set
# CONFIG_NETPRIO_CGROUP is not set
CONFIG_AUTOFS4_FS=m

After kernel recompile, put it to usb stick (/boot/zImage_dbt_custom) + copy modules to /lib/modules/3.10.39, and we're ready to boot into Ubuntu:

I'm using "root=/dev/sda1", because my usb stick detects as sda1 (with no HDDs inserted). But if you install 1/2 HDD drives, it can be sdb1 or sdc1.

Another thing to mention - fan speed. As you probably know, NSA320/NSA325/NSA325v2 had no software fan speed control. And NAS326 is no exception here. It has no fan speed controller, and fan itself is 3-pin 12V fan (Ground, +VCC, Sensor) - it has no PWM line, so we can only read fan RPM but cannot set it. What a shame, ZyXEL!!!

The good thing about it - at least we don't need to recompile/tweak the software here :) You could do that on NSA310 and on NAS540. But in our case, it's not software-solvable. So, to make my NAS326 a little less noisy, I lowered fan voltage from 12V to 6.5-7V. Now it runs at 680 RPM and is almost quiet. Pure hardware solution.

What's left to be absolutely happy - a bit of sysctl tweaking, samba, nfs - and all done. Oh, and I don't like my old usb stick performance. May be it makes sense to move the system to a faster usb 3.0 drive or class10 sd card...

rr4m Wrote:
-------------------------------------------------------
> I'm using "root=/dev/sda1", because my usb
> stick detects as sda1 (with no HDDs inserted). But
> if you install 1/2 HDD drives, it can be
> sdb1 or sdc1.

Give the partition on the USB flash drive a unique name (e.g. rootfs) and try this:
root=LABEL=rootfs

As a result - we don't need to access USB drive from U-Boot anymore - so it can be inserted into rear USB 3.0 socket. Yep, U-Boot only can work with front USB 2.0 socket. But after the kernel is booted, usb drive with rootfs can be attached anywhere - including rear usb 3.0.

I'm sharing the custom kernel + config + modules for installing/booting Debian/Ubuntu on NAS326. See README.txt - it includes all these steps.
You can take a Xenial Xerus armhf netinstall uInitrd (like I did), or some Debian armhf netinstall image (from Bodhi) - hope custom kernel will work there too.

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.