This article will guide you how to setup Debian and OpenmediaVault on Zyxel NSA310 (and other NSA320, NSA325).

We will use Debian 9 Stretch from Doozan forum,12096 
Debian 10 Buster was relesed few days ago but it don't have all packages yet.

NSA310 board type

My board at boot blink with all status leds as red, therfore I will use DTB file kirkwood-nsa310b-lmsensor-redusbled.dtb.
There are different board types and different dtb files for them but it is not a scope of this tutorial.

Other needed  hardware

As Linux computer I am using RassperyPi 3b+ with Debian 10, flash drive is Corsair Voyager GT 16 GB which is quite fast.

Setting up Flash drive

Flash was splited for three partitions rootfs, home, swap. Partitions must have those labels.

Main reason of spliting is to separate home directory and also add extra swap space as this box have only 256MB of RAM.

In case of smaller 8GB flash leave at least 3GB for rootfs.

Download rootfs and kernel

 Try to download this file Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2, in case of broken link go to,12096 and search for Updated 24 Jul 2017 there is a link to download it.

In page mentioned above search for Updated 18 Aug 2019 and download linux-5.2.9-kirkwood-tld-1-bodhi.tar.bz2 or newer if avaliable. Hoever this one was tested for this tutorial.

Save files to flash and unzip

This must be done as root not sudo, otherwise it might not boot.

1. Open terminal and type su it will ask you for root password. In case you don't know or set password type sudo su, then passwd and new passowrd.

2. Open mc in one panel open download location and on other one mounted rootfs

3. Copy Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 and linux-5.2.9-kirkwood-tld-1-bodhi.tar.bz2 to rootfs partition

4. in command line at rootfs execute (this can take long time be patient):

tar -xjf Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2

5. Type

nano /etc/fstab 

and edit file to have this:

LABEL=rootfs    /          ext4    noatime     0 1
LABEL=home    /home        ext4    noatime     0 1
LABEL=swap    swap        swap    default        0 0
tmpfs    /tmp            tmpfs   defaults        0 0

6. In NSA310 LAN interface hase different name so you need to change eth0 to enp1s0. Type

nano /etc/network/interfaces

edit file to:

auto lo enp1s0
allow-hotplug enp1s0
iface lo inet loopback
iface enp1s0 inet dhcp

7. Type sync to synchronize all changes to flash and eject flash drive then unplug.

First boot

1. Plug in Flash Drive to any USB in NSA310

2. On your router or using network scan tool try to find you NSA310 ip address.

3. Using PuTTY or any other tool conect to ssh on your box and login as root with password root

4. Change root passowrd by typing passwd

5. For security reasons we need to regenerate SSH keys

rm /etc/ssh/ssh_host*
ssh-keygen -A

6. Then run those commands

apt-get update
apt-get upgrade


Congratulations you have up to date and running Debian on your box.

Update kernel 

Before we copied over also latest kernel linux-5.2.9-kirkwood-tld-1-bodhi.tar.bz2 we need to install it now.

1. move file to /boot directory using this command

mv /linux-5.2.9-kirkwood-tld-1-bodhi.tar.bz2 /boot/

2. Extract it and new DTB files

cd /boot
tar -xjf linux-5.2.9-kirkwood-tld-1-bodhi.tar.bz2
tar -xf  linux-dtb-5.2.9-kirkwood-tld-1.tar

3. Install new kernel

dpkg -i linux-image-5.2.9-kirkwood-tld-1_1.0_armel.deb

4. Generate the uImage and uInitrd

mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.2.9-kirkwood-tld-1 -d vmlinuz-5.2.9-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-5.2.9-kirkwood-tld-1 -d initrd.img-5.2.9-kirkwood-tld-1 uInitrd

5. Sync and reboot

shutdown -r now

Fan cotrol 

1. Install fancontrol

apt-get update
apt-get install fancontrol

2. Run first time config and follow instructions to generate colleration 


3. Run fancontrol to test if it is working. It should lower speed of fan. Press ctrl+c to exit and reboot.

ctrl + c

When rebooted, fan should be automatically controlled.

Preparing for instalation of OpenMediaVault

1. Install file manager (mc), system monitor (htop), http transport needed for downloading OMV and systemd which is also used by OMV.

apt-get update
apt install mc
apt install htop
apt install apt-transport-https
apt install systemd

2. Set locales to avoid error message during instalation. Find locales fro your country. Those below are for Poland.

nano /etc/profile

and under export PATH add:

# Locales
export LC_ALL=pl_PL.UTF-8
export LANG=pl_PL.UTF-8
export LANGUAGE=pl_PL.UTF-8

Save end exit.

3. Execute this in command line to get it working imeddiatelly:

export LC_ALL=pl_PL.UTF-8
export LANG=pl_PL.UTF-8
export LANGUAGE=pl_PL.UTF-8

4. Install locale and generate locales

apt install locales
nano /etc/locale.gen

remove # for your locale and save, then generate.


5. Add host name to hosts

nano /etc/hosts

Change first line by adding debian localhost debian

6. Install collected fisrst to avoid error during instalation which can fail of misconfiguration

apt-get update
apt install collectd

If collectd will faill edit

nano /etc/collectd/collectd.conf

and set 

Hostname "debian"
FQDNLookup false

6. Install postfix. Those exports will supress questions about configuration.

export DEBIAN_FRONTEND=noninteractive
apt-get install postfix 

Install OMV

1. Add OMV repository

cat <<EOF >> /etc/apt/sources.list.d/openmediavault.list
deb arrakis main
## Uncomment the following line to add software from the proposed repository.
deb arrakis-proposed main
## This software is not part of OpenMediaVault, but is offered by third-party
## developers as a service to OpenMediaVault users.
deb arrakis partner

2. Install PGP keys

wget -O - | apt-key add -

3. Start instalation

apt-get update
apt install openmediavault

Due to low performace of kirkwood it will take very long time, be patient and don't wory if it stuck for long time on one item. It can take about 3 hours, depends on speed of USB flash drive.

4. Initialize omv


When it finish omv should be aavaliable on your box ip standard port 80. 

Default login: admin
Default password: openmediavault

Change password in OMV control panel General Settings, tab Web administrator password.


Thats all.


© Paweł Woźniak