Give a new use to the old CubieBoard2 with Armbian and OMV4

Not sure how many of you are aware that Armbian Stretch with kernel 4.14 is available for cubieboard2.
I had the board laying around without knowing what to do with it. After a lot of time doing google searches, I came across Armbian.

Armbian is a lightweight Debian or Ubuntu based distribution specialized for ARM developing boards. It supports mainly Allwinner (A10, A20, A31, H2+, H3, H5 and A64) SBCs.

Let’s start with the procedure:

Download the Armbian Stretch (Kernel 4.14.y)

https://www.armbian.com/cubieboard-2/

 

Extract and write the image to the SD card

I personally prefer win32diskimager but you can also use Etcher.
Use at least a 4GB SD card but keep in mind that it might not be enough to install OMV4.

05-06-2018 22-31-38

I have the version with 4GB NAND flash but this image is only made to be written to an SD card.

 

1st boot

In order to start using it you need to connect it to some HDMI capable screen and a usb keyboard. If you connect the Ethernet cable, the screen might be optional. Find the cubieboard IP and use putty to connect to it.
On the first boot it will ask for a login and a password and then ask you to create a new account.

Login: root
Password: 1234

Then you are prompted to change this password (be careful with special characters as the keyboard layout defined is US-Keyboard). When done, you are asked to create a normal user-account for your everyday tasks.

Connect the Ethernet cable (if not done already) and update the system.

sudo apt-get update
sudo apt-get dist-upgrade

Now you are ready do continue.

05-06-2018 23-06-46

 

Make the onboard LEDs blink

By default, the Armbian image doesn’t have any “useful” triggers enabled for the onboard LEDs.

To make use of them, I edited as root user the rc.local script

su -
nano /etc/rc.local

Then add the following lines inside before the “exit 0” line

echo "none" > /sys/class/leds/cubieboard2\:green\:usr/trigger
echo mmc0 > /sys/class/leds/cubieboard2\:green\:usr/trigger
echo "heartbeat" > /sys/class/leds/cubieboard2\:blue\:usr/trigger

 

Install XFCE desktop environment

If you would like to use it connected to a computer monitor it might be useful to install XFCE desktop environment with Gnome icon layout

xfce-4-orange-pi-armbian

Login as root:

su -

Then install the XFCE desktop and the necessary dependencies:

sudo apt-get -y install xorg lightdm xfce4 tango-icon-theme gnome-icon-them

You can now start the desktop with the command:

startxfce4 

or restart the system

reboot

 

Install OpenMediaVault 4 (OMV4)

What is openmediavault?
openmediavault is the next generation network attached storage (NAS) solution based on Debian Linux. (more)

In order to install OMV, you need to run the command

sudo armbian-config

The following screen will appear
05-06-2018 23-10-05

Navigate to Software > Softy > select OMV using space and hit enter. OMV installation will now start.

reboot your cubieboard

Open your browser and insert your cubieboard IP
30-06-2018 16-25-31

Connect your HDD and go to Storage/Disks
30-06-2018 16-34-34

Set the options below to avoid your drive to go into idle too much, specially for WD drives as they have a “Load Cycle Count” and when it reaches 30K, your drive will stop working.
30-06-2018 16-34-14.png

Go to S.M.A.R.T. and enable it
30-06-2018 17-02-59.png

30-06-2018 17-03-54

Then go to RAID Management to create your RAID array or to File Systems if you have only one disk connected and create your file system.

Plugins

Here you have may options available. I installed Docker, omvextrasorg and remotemount.

Installing Docker

30-06-2018 17-11-37.png

Now you need to create a docker user. Open OMV and go to User.
30-06-2018 17-19-03

Add the user to users group
30-06-2018 17-19-26.png

Now ssh as root into your cubieboard IP and do:

id [docker user]

Replace [docker user] with your docker username without the brackets. Note down the UID and GID.

Each container should have a configuration directory to be used later when running the container.

cd home
sudo mkdir [docker user]
cd [docker user]
sudo mkdir -p .config/{plex,plexpy,airsonic,deluge}

Plex, Airsonic and Deluge are the containers I indent to be running.

 

Installing Music streaming service Airsonic

“Airsonic is a free, web-based media streamer, providing ubiquitious access to your music. Use it to share your music with friends, or to listen to your own music while at work. You can stream to multiple players simultaneously, for instance to one player in your kitchen and another in your living room.”

Instructions:

openmediavault_control_panel_-_Helios4_-_2018-06-12_14.11.22

  • Select the pulled image and press “Run Image”

30-06-2018 16-11-27

  • Configure it like the images below
    30-06-2018 16-09-45.png

AirSonic is accessible through port 4040. If you want to change it, set the Network mode as Bridge.

  • Configure the Environment variables according to your desire but remember to insert the PGID and PUID that you noted before
    30-06-2018 17-39-06.png
  • Now set your Volumes and Bind mounts
    30-06-2018 17-44-13.png
    Map the /config to the previously created airsonic docker .config folder. Map the /music to where you have your albums. I don’t use podcasts so left it by default with read only.

 

  • Login to Airsonic page <cubieboard ip>:4040 user and password: admin
  • Scan your media library in settings or the start page and have fun!
    30-06-2018 17-48-17

 

Deluge and Plex to be continued. If you need help in any of them, let me know.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s