I recently got a cubieboard2 to replace my Raspberry PI as media server. Pros of the cubieboard2:

  • two core, 1GHz ARM CPU
  • 1GB RAM
  • SATA interface on board

Cons of the cubieboard2:

  • smaller community compared to the RasPI
  • none of the ‘big’ Linux distributions support the board yet
  • no fancy hardware addons, cases or stuff like with the RasPI

My media server runs cubian from a 16GB microSD card. It has a 750GB HDD attached to the SATA port and uses a 5V/2A charger from Samsung as power supply. I attached a small speaker to it for sound output (see below). IMG_20140504_114554[1]   Adding software sudo apt-get update apt-get install lighttpd samba ntp mpd apt-get install avahi-daemon build-essential dvb-apps gcc-4.7 apt-get install mysql-server mysql-client shellinabox apt-get install gzip git-core curl python libssl-dev apt-get install librrds-perl libhttp-daemon-perl libjson-perl libipc-sharelite-perl   Network setup I added a static IP address in my DHCP server on the router and configured cubian to use a static IP. sudo vi /etc/resolv.conf nameserver sudo vi /etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback auto eth0 allow-hotplug-eth0 # configuring manual IP iface eth0 inet static address netmask gateway   Storage setup I’m using the SATA HDD as mass storage for music and TV recordings. Therefore I set up automounting at startup in the fstab. File access is provided by samba with no user restrictions (you can simply connect as guest). Our printer is connected to the server and therefore samba is configured for printer sharing as well. Create a single partition on the SATA disk and format it with ext4. sudo fdisk /dev/sda sudo /sbin/mkfs.ext4 /dev/sda1 sudo mkdir /sata sudo vi /etc/fstab /dev/sda1 /sata ext4 defaults 0 0 sudo vi /etc/samba/smb.conf [music] comment = SATA Share path = /sata/music read only = No create mask = 0777 directory mask = 0777 guest only = Yes guest ok = Yes [tv] comment = TV Share path = /sata/tv read only = No writeable = yes create mask = 0777 directory mask = 0777 guest only = Yes guest ok = Yes [printers] comment = All Printers browseable = no path = /var/spool/samba printable = yes guest ok = yes read only = yes create mask = 0700   Adding some nice information RPi-Monitor is a nice little program to get load statistics out of your RasPI. I wanted that for my cubieboard as well. wget -O rpimonitor_2.4-1_all.deb sudo dpkg -i rpimonitor_2.4-1_all.deb sudo service rpimonitor update In /etc/rpimonitord.conf.d/default.conf you can set up which information is displayed. I added the disk usage for the SATA HDD and removed the (not working) temperature display for the CPU.   Making a TV server I have an old DVB-T USB stick lying around. I decided to make good use of it by connecting it to the media server and use it for TV recording with tvheadend. git clone cd tvheadend/ CC=gcc-4.7 ./configure make sudo make install sudo cp debian/tvheadend.init /etc/init.d/tvheadend   Playing music via webinterface I configured mpd for the internal sound card via ALSA and added MPDAmp as webinterface.   Moving MySQL to the HDD sudo cp -R /var/lib/mysql /sata sudo vi /etc/mysql/my.cnf [mysqld] datadir = /sata/mysql   Adding etherpad For local notes like shopping lists or other reminders I wanted the server to run a copy of etherpad. Because sometimes I got problems with a distribution supplied node.js I tent to install etherpad with its own copy of node.js instead. sudo adduser etherpad su – etherpad git clone git:// wget tar xvzf node-v0.10.20.tar.gz cd node-v0.10.20 ./configure –prefix=/home/etherpad/nodejs make -j 4 make install exit sudo vi /etc/init.d/etherpad #!/bin/sh ### BEGIN INIT INFO # Provides: etherpad-lite # Required-Start: $local_fs $remote_fs $network $syslog # Required-Stop: $local_fs $remote_fs $network $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: starts etherpad lite # Description: starts etherpad lite using start-stop-daemon ### END INIT INFO PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/home/etherpad/nodejs/bin" LOGFILE="/var/log/etherpad-lite/etherpad-lite.log" EPLITE_DIR="/home/etherpad/etherpad-lite" EPLITE_BIN="bin/" USER="etherpad" GROUP="etherpad" DESC="Etherpad Lite" NAME="etherpad-lite" set -e . /lib/lsb/init-functions start() { echo "Starting $DESC... " start-stop-daemon --start --chuid "$USER:$GROUP" --background --make-pidfile --pidfile /var/run/$ --exec $EPLITE_DIR/$EPLITE_BIN -- $LOGFILE || true echo "done" } #We need this function to ensure the whole process tree will be killed killtree() { local _pid=$1 local _sig=${2-TERM} for _child in $(ps -o pid --no-headers --ppid ${_pid}); do killtree ${_child} ${_sig} done kill -${_sig} ${_pid} } stop() { echo "Stopping $DESC... " if test -f /var/run/$; then while test -d /proc/$(cat /var/run/$; do killtree $(cat /var/run/$ 15 sleep 0.5 done rm /var/run/$ fi echo "done" } status() { status_of_proc -p /var/run/$ "" "etherpad-lite" && exit 0 || exit $? } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; status) status ;; *) echo "Usage: $NAME {start|stop|restart|status}" >&2 exit 1 ;; esac exit 0