The released tarball linux-x.xx.x-mvebu-tld-x-bodhi.tar.bz2 includes everything you need to build your own kernel from mainline kernel source tree (patches and config file are all that needed). The kernel image is included in it for users who just want to install kernel.

The released tarball Debian-x.xx.x-mvebu-tld-xx-rootfs-bodhi.tar.bz2 is a basic armhf rootfs (a completed Debian system with kernel already installed) for Marvell EBU (MVEBU) boxes ready to be used. It is a basic system where you can build upon by installing packages. This rootfs was created by Debian debootstrap and then a few packages were installed for user’s convenience. This rootfs is dedicated for the purpose of upgrading and release distribution.

Credits:

- Thanks to rr4m, hean01, musv, Kirsch, and others who developed and tested in Zyxel NAS326 - Debian / Boot from USB thread. In this thread, a lot of good works have been done to build a basic kernel for Ubuntu server, Arch, and Gentoo.
- Thanks to saschadd and hmartin who have contributed in testing, and investigation in: Debian on WD MyCloud EX 4100. The installation instruction for this box will be available in the future.
- Thanks to MM and Peacemaker who have developed and tested the mcm-daemon in: WD MyCloud Mirror Gen2 (BWVZ, GrandTeton). I plan to investigate and make use of MM and Peacemaker works, hopefully for all of WD Mycloud boxes.
- Thanks to mcmg2 and hmartin who have contributed in testing and investigation in: WD My Cloud Mirror Gen2 u-boot. The installation instruction for this box will be available in the future.
- Thanks to hmartin who has contributed in developing, testing, and investigation in: Debian on WD MyCloud EX2100. The installation instruction for this box is available in the section dated 12 Feb 2018 below.
- Thanks to Manuel (lordzahl) who has collaborated with me in developing, and testing in bringing up the Thecus N2350 box in Debian Installation on Thecus N2350 (Marvell Armada 385). The installation instruction for this box will be available in the near future. In the mean time, see working thread for instruction.
- Thanks to Koen who has contributed in developing, research, and testing in bringing up the Dell Wyse T50/T10 box in Debian on Dell Wyse T10 / T50.
- Thanks to Koen and Gravelrash who has contributed in research and testing in bringing up the HP T5335z box in Debian on HP Thin Client T5335z.
- Thanks to Koen who has contributed in research and testing in bringing up the Chip PC LXD8941 box in Debian on Chip PC LXD8941.
- Thanks to Richard and Zifxify who have collaborated with me in developing, and testing in bringing up the Synology RS816 box in Debian on Synology RS816 (Armada 385). The installation instruction for this box will be available in the near future. In the mean time, see working thread for instruction.

Note only for the Synology RS816: The rootfs Debian-4.12.4-mvebu-tld-1-rootfs-bodhi.tar.bz2 has kernel 4.12.4-mvebu-tld-1 in it so it must be upgraded to kernel linux-5.1.2-mvebu-tld-1 before it can be used for this box. This kernel upgrade can be done offline using chroot. Also, I plan to release new Buster rootfs with the latest kernel in a few weeks, so users who wish to install Debian on this box can also wait until that time. Or wait for chroot instruction (if not sure how) that I'd planned to add to the Wiki thread.

Credits:

- Thanks to Richard and Zifxify who have collaborated with me in developing, and testing in bringing up the Synology RS816 box in Debian on Synology RS816 (Armada 385). The installation instruction for this box will be available in the near future. In the mean time, see working thread for instruction.

Latest Linux kernel 5.x general release information can be found at:
LinuxChanges log

- Add HP T5335z supports. Installation instruction for this box is here. Note: we are still working on Display and Sound. This box should be stable as headless server.
- Add Chip PC LXD8941supports. Installation instruction for this box will be available in the future. Note: we are still working on Display, Sound, MMC. This box should be stable as headless server.

- Add Dell Wyse T50/T10 supports. Installation instruction for this box will be available in the future. Note: we are still working on Display and Sound. This box should be stable as headless server.
- Upgraded the DTS to incorporated new DTS binding for Armada NAND chip.

Warning: there was an important change that has effected how the NAND MTDs being recognized by the kernel. If you are upgrading kernel only, you will loose the ability to see the MTDs, therefore access to u-boot envs (except for boxes that has u-boot in SPI flash). The mtdparts env must be modified to use the new label. Installation instruction for these support boxes should be revised: NAS326, WD EX2100/EX4100, Thecus N2350, and Dell Wyse T50/T10. Please see this post.

Credits:

- Thanks to Koen who has contributed in developing, research, and testing in bringing up the Dell Wyse T50/T10 box in
Debian on Dell Wyse T10 / T50. Also thanks Bob and rayknight for helping in testing this box.

Latest Linux kernel 4.x general release information can be found at:
LinuxChanges log

- Add Thecus N2350 supports. Installation instruction for this box will be available in the near future.
- Add NAS326 MAC address device-tree supports (no need to hardcode the MAC addess anymore, it will be automatically detected by the kernel using u-boot env ethaddr).

Note: you don't have to worry about this issue if you are booting with USB rootfs.

Here is what I found from reading the GPL source to trouble shoot the issue of booting the NAS326 with 2 HDDs, with the rootfs is on one HDD.

NAS326 stock u-boot uses an old AHCI driver. This old version set the link detection timeou to a very small value of 4 ms. This interval is apparently too small. In the latest version of this AHCI driver, it is set to 200 ms.

Since I have not started building new u-boot (because of UART booting issue with this box), we cannot update this u-boot, or replace it with a better one.

So at the moment, we can only work around it.

I will do some testing to see if we can pick a good work around to enable the SATA link up before we try to initialize the SATA port for booting the kernel on HDD.

Update:

- Here is a work around that seems to do the trick consistently for me and heiko: Whenever the box needs to be rebooted, just shutdown and power up again. Then both HDDs will be initialized OK.

Take this USB rootfs to your NAS and cold start. Depending on the flavor of MVEBU boxes you have, further u-boot envs setup is needed to boot this rootfs. Instruction will be provided here for each MVEBU box, or a group of boxes that use the same u-boot.

After booted into Debian, see Note1, 2, and 3 below. It is very important that you do Note1 steps to secure your box.. Note 2 and Note 3 are optional.

Note1:

After logging in this rootf the first time, remember to generate new SSH key to make it your own unique rootfs. And also update your rootfs to get the latest Debian package security updates:

If that's still not possible to run systemd, you might want to install it again:

apt-get install systemd

Note3:

To enable the network dynamic IP to stay consistent after reboot, and also for faster boot, edit the /etc/network/interfaces file to specify your real MAC address (replace xx:xx:xx:xx:xx:xx with the real MAC address). See this post for explanation.

- Incorporated kernel 4.10.9 mainline to fix security bugs.
- Added patches to help power down the NAS326 box without kernel spitting out an unecessary warning.
- Added patches for WOL capability (we are testing this feature).

Latest Linux kernel 4.x general release information can be found at:
LinuxChanges log

Installation for NAS326 box can be done with serial console connected (section A), or inside stock OS and without serial console (section B for USB rootfs, section C for SATA rootfs). Note: for section A and B, the USB rootfs must be inserted to the front USB port (USB 2.0).

A. Instruction for the booting the NAS326 with a USB rootfs (serial console setup)

A1. Requirements

1. Serial console connected during set up (which should be removed later during normal operation).

2. Download either the latest ARM32 version or the x86-64 version of kwboot. Use it depending on the architecture of serial console converter host. Please see this post for ARM32 kwboot. (I'll need to recompile the x86-64 version and reupload).

3. Prepare the rootfs Debian-4.9.0-mvebu-tld-12-rootfs-bodhi.tar.bz2 as described in the Debian rootfs release section (right below):

QuoteUpdated 04 Feb 2017:

This Debian-4.9.0-mvebu-tld-12-rootfs-bodhi.tar.bz2 has been uploaded.

A2. Installation

Warning: Step 4 in the instruction in this section uses a "env/code injection" to replace the Zyxel NAS326 stock u-boot bootcmd with a different command during boot. It's a simple trick that change u-boot env bootcmd (it does not touch u-boot binary in NAND). However, this hack should not be used on a different MVEBU box (any box other than the NAS326). Doing this without examining your box's stock u-boot source code could likely messing up your u-boot envs and prevent booting, or in the worse case bricking it. Please post questions regarding installation for other MVEBU boxes, it might be possible to do this.

1. Start kwboot on the serial console host

For ARM32 kwboot:

./kwboot -t -B 115200 /dev/ttyUSB0 -d

For x86-64 kwboot:

./kwboot -t -B 115200 /dev/ttyUSB0

2. Power up the NAS326, and wait at serial console, observe kwboot spinning / while waiting for handshake.

3. After a period of time, the NAS326 will time out and start booting its stock u-boot. Interrupt u-boot at countdown. Get a listing of your current u-boot envs, and save it to a notepad in case you want to restore it later.

printenv

4. Enter the following commands (copy/paste each line to the u-boot prompt).

6. Start kwboot again on the serial console host (use the same command as in step 1)

7. After a period of time, the NAS326 will time out and start booting its stock u-boot. Observe kernel loading and booting until seeing the Debian prompt. At this point we can either login directly with serial console, or by SHH. If login is through SSH, find the NAS:

ping debian.local

When the ping returns successful response, then login (root password is root);

ssh root@debian.local

If for whatever reason (e.g. firewall), the NAS326 cannot be found as debian.local, then find its IP in the router webpage. Or use a scanning app such as Linux nmap or IOS Fing to find the IP.

8. DONE.

A3. Normal Operation

The USB rootfs should be plugged in permanently, and the serial console module should be removed.

1. Whenever the NAS326 is rebooted or cold started, to boot without manual intervention, the serial console module must be unplugged from the NAS326. If the serial console module is plugged in, then step 1 in the installation instruction A2 must be executed (so that the NAS326 will continue booting when it detected the serial console present). Note that reboot in some instance will work with serial console plugged in.

2. If you want to boot back to stock OS in NAND, just shutdown the box, unplug the USB and power up the box. It will boot the kernel 1 in NAND and then if not successful, it will try kernel 2.

This also serves as a rescue system. Whenever the rootfs on USB has problem and cannot boot (the effect is just like the USB drive is not plugged in), the NAS326 will fall back to booting the kernel 1 or 2 in NAND. When this occurs, the u-boot envs in step 4 must be reentered at serial console again to allow booting back to USB rootfs.

A4. Reverse to stock OS permanently

To reverse the setup, and boot back to stock NAND kernel permanently, execute the following instructions at serial console:

B. Instruction for booting the NAS326 with a USB rootfs (setup without serial console)

B1. Requirements

1. Prepare the rootfs Debian-4.9.0-mvebu-tld-12-rootfs-bodhi.tar.bz2 as described in the Debian rootfs release section (right below):

QuoteUpdated 04 Feb 2017:

This Debian-4.9.0-mvebu-tld-12-rootfs-bodhi.tar.bz2 has been uploaded.

B2. Installation

Warning: Step 4 in the instruction in this section uses a "env/code injection" to replace the Zyxel NAS326 stock u-boot bootcmd with a different command during boot. It's a simple trick that change u-boot env bootcmd (it does not touch u-boot binary in NAND). However, this hack should not be used on a different MVEBU box (any box other than the NAS326). Doing this without examining your box's stock u-boot source code could likely messing up your u-boot envs and prevent booting, or in the worse case bricking it. Please post questions regarding installation for other MVEBU boxes, it might be possible to do this.

1. Gain SSH to the NAS326 box.

Use the Zyxel NAS326 instruction (came with the box) for logging as admin user through the web page of the box, set password, and Enable SSH.

2. Open a termimal and connect to the NAS326 with SSH, and login to the box as root user.

3. After logging in, get a listing of your current u-boot envs, and save it to a notepad in case you want to restore it later.

fw_printenv

4. Enter the following commands (copy/paste each line to the stock OS command line).

And then list the u-boot envs again, and save it to a notepad in case there is problem with booting and it needs to be referenced.

fw_printenv

5. Plug in the USB rootfs Debian-4.9.0-mvebu-tld-12-rootfs-bodhi.tar.bz2, and reboot

sync
sync
/sbin/reboot

7. After a period of time, the NAS326 will start rebooting. Wait for about 30 seconds and login through SSH.

To find the NAS:

ping debian.local

When the ping returns successful response, then login (root password is root);

ssh root@debian.local

If for whatever reason (e.g. firewall), the NAS326 cannot be found as debian.local, then find its IP in the router webpage. Or use a scanning app such as Linux nmap or IOS Fing to find the IP.

8. DONE.

B3. Normal Operation

The USB rootfs should be plugged in permanently, and if there is serial console module attached before then it should be removed during booting.

1. Whenever the NAS326 is rebooted or cold started, to boot without manual intervention, the serial console module must be unplugged from the NAS326. If the serial console module is plugged in, then step 1 in the Section A2 installation instruction must be executed (so that the NAS326 will continue booting when it detected the serial console present). Note that reboot in some instance will work with serial console plugged in.

2. If you want to boot back to stock OS in NAND, just shutdown the box, unplug the USB and power up the box. It will boot the kernel 1 in NAND and then if not successful, it will try kernel 2.

This also serves as a rescue system. Whenever the rootfs on USB has problem and cannot boot (the effect is just like the USB drive is not plugged in), the NAS326 will fall back to booting the kernel 1 or 2 in NAND. When this occurs, the u-boot envs in step 4 must be reentered at Debian command line again to allow booting back to USB rootfs.

B4. Reverse to stock OS permanently

To reverse the setup, and boot back to stock NAND kernel permanently, execute the following instructions at the Debian command line:

C. Instruction for booting the NAS326 with rootfs on internal HDD (setup without serial console)

C1. Requirements

1. Prepare the rootfs Debian-4.9.0-mvebu-tld-12-rootfs-bodhi.tar.bz2, using one of the internal HDD, as described in the Debian rootfs release section (right below):

QuoteUpdated 04 Feb 2017:

This Debian-4.9.0-mvebu-tld-12-rootfs-bodhi.tar.bz2 has been uploaded.

C2. Installation

Warning: Step 4 in the instruction in this section uses a "env/code injection" to replace the Zyxel NAS326 stock u-boot bootcmd with a different command during boot. It's a simple trick that change u-boot env bootcmd (it does not touch u-boot binary in NAND). However, this hack should not be used on a different MVEBU box (any box other than the NAS326). Doing this without examining your box's stock u-boot source code could likely messing up your u-boot envs and prevent booting, or in the worse case bricking it. Please post questions regarding installation for other MVEBU boxes, it might be possible to do this.

1. Gain SSH to the NAS326 box.

Use the Zyxel NAS326 instruction (came with the box) for logging as admin user through the web page of the box, set password, and Enable SSH.

2. Open a termimal and connect to the NAS326 with SSH, and login to the box as root user.

3. After logging in, get a listing of your current u-boot envs, and save it to a notepad in case you want to restore it later.

fw_printenv

4. Enter the following commands (copy/paste each line to the stock OS command line).

And then list the u-boot envs again, and save it to a notepad in case there is problem with booting and it needs to be referenced.

fw_printenv

5. Insert the HDD with rootfs Debian-4.9.0-mvebu-tld-12-rootfs-bodhi.tar.bz2, if not already inside the box, and reboot

sync
sync
/sbin/reboot

7. After a period of time, the NAS326 will start rebooting. Wait for about 30 seconds and login through SSH.

To find the NAS:

ping debian.local

When the ping returns successful response, then login (root password is root);

ssh root@debian.local

If for whatever reason (e.g. firewall), the NAS326 cannot be found as debian.local, then find its IP in the router webpage. Or use a scanning app such as Linux nmap or IOS Fing to find the IP.

8. DONE.

C3. Normal Operation

The HDD rootfs should be plugged in permanently, and if there is serial console module attached before then it should be removed during booting.

1. Whenever the NAS326 is rebooted or cold started, to boot without manual intervention, the serial console module must be unplugged from the NAS326. If the serial console module is plugged in, then step 1 in the Section A2 installation instruction must be executed (so that the NAS326 will continue booting when it detected the serial console present). Note that reboot in some instance will work with serial console plugged in.

2. If you want to boot back to stock OS in NAND, just shutdown the box, remove the HDD rootfs and power up the box. It will boot the kernel 1 in NAND and then if not successful, it will try kernel 2.

This also serves as a rescue system. Whenever the rootfs on HDD has problem and cannot boot (the effect is just like the HDD drive is not plugged in), the NAS326 will fall back to booting the kernel 1 or 2 in NAND. When this occurs, the u-boot envs in step 4 must be reentered at Debian command line again to allow booting back to HDD rootfs.

C4. Reverse to stock OS permanently

To reverse the setup, and boot back to stock NAND kernel permanently, execute the following instructions at the Debian command line:

Take this USB rootfs to your NAS and cold start. Depending on the flavor of MVEBU boxes you have, further u-boot envs setup is needed to boot this rootfs. Instruction will be provided here for each MVEBU box, or a group of boxes that use the same u-boot.

After booted into Debian, see Note1 and Note2 below. It is very important that you do Note1 steps to secure your box.

Note1:

After logging in this rootf the first time, remember to generate new SSH key to make it your own unique rootfs. And also update your rootfs to get the latest Debian package security updates:

Kernel linux-4.9.0-mvebu-tld-12 package has been uploaded. This kernel has been fully developed with all the capabilities similar to the Kirkwook kernel.

Notables:

- This kernel is configured as SMP PREEMPT (supports up to 4 cores and run with preemptive scheduler).
- Power Off works fine, but will print out a warning in console (which can be safely ignored).
- For fan speed and CPU temperature reading see this post.
- SPI is temporarily removed until we can find out more info.

Latest Linux kernel 4.x general release information can be found at:
LinuxChanges log

Take this USB rootfs to your NAS and cold start. Depending on the flavor of MVEBU boxes you have, further u-boot envs setup is needed to boot this rootfs. Instruction will be provided here for each box, or a group of boxes that use the same u-boot.

After booted into Debian, see Note1 and Note2 below. It is very important that you do Note1 steps to secure your box.

Note1:

After logging in this rootf the first time, remember to generate new SSH key to make it your own unique rootfs. And also update your rootfs to get the latest Debian package security updates:

- This kernel is configured as SMP PREEMPT (supports up to 4 cores and run with preemptive scheduler).
- All LEDS triggers should be working correctly in this version (see /sys/class/leds).
- Kernel ring buffer (dmesg) size increased enough to capture all boot activities.
- Power Off works fine, but will print out a warning in console (which can be safely ignored).
- For fan speed and CPU temperature reading see this post.
- SPI is temporarily removed until we can find out more info.

Latest Linux kernel 4.x general release information can be found at:
LinuxChanges log

but unfortunately there are instructions missing and i am not able to figure out how to use those files securely without problems.

I would like to have this device booting the rootfs from an usb pen drive without touching the original firmware if possible but i am not fit enough to figure out what information is needed and how to get them.
Maybe you could point me in the right direction or let me know what information you need to verify that this device would work with your kernel and rootfs.
Unfortunately the original firmware has only a limited busybox available via ssh but i can sftp to the box for further investigation if needed.

>
> There is already someone who attempted to create a
> debian port for this device on this thread https:/
> /community.wd.com/t/clean-os-debian-openmediavault
> -and-other-firmwares/93714/1290
>
> From this guy there are already files available th
> ere https://drive.google.com/drive/folders/0B_6OlQ
> _H0PxVVGdTRGl0RmRabVU
>
> but unfortunately there are instructions missing a
> nd i am not able to figure out how to use those fi
> les securely without problems.
>
> I would like to have this device booting the rootf
> s from an usb pen drive without touching the origi
> nal firmware if possible but i am not fit enough t
> o figure out what information is needed and how to
> get them.
> Maybe you could point me in the right direction or
> let me know what information you need to verify th
> at this device would work with your kernel and roo
> tfs.
> Unfortunately the original firmware has only a lim
> ited busybox available via ssh but i can sftp to t
> he box for further investigation if needed.

Yes, most definitely will boot with my released basic rootfs (I looked at this box specs before). You just need to choose the correct DTB in /boot/dts/. And then adjust the env for dtb in serial console. Test boot that adjustment without saving envs. Once you have booted into Debian and verified everything works, then save the env with fw_setenv.

If you cant find the exact DTB for EX4100 in /boot/dts, please list more info about this WD such as : USBs, HDDs, ethenet LAN chip model, I2C, SPI, RAM size, boot log, ... we can figure this out together.

Could you "read" from the DTS if this box can be bootet from usb?
At the moment i have no serial console access to this box and havent yet figured out if and where there is a serial connector.
To switch the boot mode serial console access is needed, right?
Or could i change env data without serial console access?
I know about there was a way for the nsa325v2 where you have to put some files on a pen drive and boot from that to switch env settings.

This is a new box so you need serial console, to be safe. We dont know what commands this stock uboot supports. So it is unwise to change any of the envs in Linux to boot usb. Serial console is a must have.

I try to install the debian to usb. And after the reboot my NAS not boot. USB sometimes blinking but i can't access to my NAS. When I remove the usb and reboot it starts with orginal OS. I don't have TTL interface to look at the bootlog. I created the ext3 partition labeled "rootfs" on the usb and extracted the image Debian-4.9.0-mvebu-tld-12-rootfs-bodhi.tar.bz2. So i have question. I connect USB to the front panel port it is good?

The Zyxel NAS326 went on sale this past week. The price cut was good enough that I'm guessing this forum will see more activity soon. I've landed here in my own search for better control of the device I just bought.

I read quite a bit of both threads and getting this working was quite the journey!

Also, OpenMediaVault has become popular. It has a web interface much like the one in stock Zyxel firmware. Since bodhi's MVEBU kernal comes with Debian, is it possible to install this and then just install the OpenMediaVault packages?

> The Zyxel NAS326 went on sale this past week. The
> price cut was good enough that I'm guessing this f
> orum will see more activity soon.

Good news! Where is this on sale?

I have not kept up for this box, because I did not see a lot of interests. It still costs way more than the older plugs.

> Also, OpenMediaVault has become popular. It has a
> web interface much like the one in stock Zyxel fir
> mware. Since bodhi's MVEBU kernal comes with Debia
> n, is it possible to install this and then just in
> stall the OpenMediaVault packages?

Yes. That's what a lot of people do. Once you run the latest kernel in Debian, it is easy to run OMV.

Just gave it a try. I'm not sure if it's my USB flash drive, or the hardware issues I'm having my Ubuntu laptop.. But I don't trust either one of them now, so I have a couple more USB drives on order from Amazon... One to create a Live USB on my Windows desktop, which I'll then use to prepare the 4.10.9 MVEBU package on the other.

Fortunately for your env trick, I can just take the stick out and boot back into Zyxel NAND. But the problem I'm having is that the firmware is reset every time it reboots. I have to create a new password and enable SSH every time. Also, all my users and settings disappear every time. Until I get the new USB drives, is there a way to stop it from resetting the firmware every time? It also now sometimes crashes on boot (all lights on the front panel go out).

> Fortunately for your env trick, I can just take th
> e stick out and boot back into Zyxel NAND. But the
> problem I'm having is that the firmware is reset e
> very time it reboots. I have to create a new passw
> ord and enable SSH every time. Also, all my users
> and settings disappear every time. Until I get the
> new USB drives, is there a way to stop it from res
> etting the firmware every time?

Let me take a look at the envs. It might be that there is one more env needed to be set to get back totally on stock behavior. The current setup is mainly so that it stock NAND can be used as rescue system, so it is just "working well enough" to do that.

Since we can't boot with kwboot yet, I'm extra careful about changing it. I have to test it thoroughly before modifying the instruction.