As always, I’m not responsible if you brick your device
Having said that, I have tested this on 02.11.09-053 and 02.42.02-012 without issue
Please do note that your drive will no longer sleep due to Java so if this is an issue for you, please stop now!
Help protect yourself from bricking your drive if you mess up
For more information on serviio
Now on with the guide!
1st disable the WD or Twonky DLNA server in the dashboard
Of course your gonna need to have PuTTY or Terminal ready to go
SSH into your drive
Run this command to remove the claims the MBL puts on some system files
rm -f /var/lib/dpkg/info/wd-nas.*
Now we want to rename our sources.list and create a new one
mv /etc/apt/sources.list /etc/apt/sources.list.bak
nano /etc/apt/sources.list
Now copy and paste the following sources into the blank PuTTY/Terminal window (Right click mouse button)
deb http://ftp.us.debian.org/debian/ wheezy main
deb http://www.deb-multimedia.org wheezy main non-free
Hit control and o
Hit enter
Hit control and x
This will save the file
Now we need to change permissions on the file
chmod 755 /etc/apt/sources.list
Now lets update our sources and install ffmpeg (Type y to install without verification if asked and also type y if asked to continue)
apt-get update
apt-get install deb-multimedia-keyring
apt-get update
apt-get install ffmpeg
Now let’s install PHP5 and some other dependencies for the webui
Type y when asked to continue and again when asked to install without verification
When asked what to do with /etc/cron.d/php5 type N and hit enter (Keep your-currently installed version)
When asked what would you like to do about php.ini, select keep_current and hit enter
Again when asked what would you like to do about php.ini, select keep_current and hit enter
apt-get install php5 php5-gd php-xml-parser php5-intl zlib1g dcraw
Now let’s install Java (Type y when asked to continue and again when asked to install without verification)
apt-get install openjdk-6-jdk
Now we need to set our paths to Java
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk-powerpc/jre
export PATH=$PATH:/usr/lib/jvm/java-6-openjdk-powerpc/jre
Now we need to add user serviio and set any password
useradd serviio
passwd serviio
Now we need to add serviio to the root group
usermod -a -G root serviio
Now we are gonna make a dir for serviio and download and extract serviio
mkdir /usr/local/serviio/
cd /usr/local/serviio/
wget http://download.serviio.org/releases/serviio-1.2.1-linux.tar.gz
tar -xf serviio-1.2.1-linux.tar.gzrm -f serviio-1.2.1-linux.tar.gz
Now let’s see if serviio will start…The terminal window should show just a green solid cursor on the bottom left after running these commands… This is good and serviio in running
cd serviio-1.2.1/bin
./serviio.sh
Wait a minute to let the server create some files and hit control and c to stop the server
Now let’s create the daemon script
nano /etc/default/serviiod
Now copy and paste the following text into the blank PuTTY/Terminal window (Right click mouse button)
#########################################################
#- Daemon Script Configuration for Serviio Media Server
#- By Ian Laird
#- /etc/default/serviiod
#########################################################
NAME="Serviio Media Server"
DAEMON="/usr/local/serviio/serviio-1.2.1/bin/serviio.sh" ## Update this to point at serviio_root/bin/serviio.sh
SERVICE_ACCOUNT="serviio" ## DON'T RUN UNDER ROOT!
Hit control and o
Hit enter
Hit control and x
This will save the file
Now let’s create the startup script
nano /etc/init.d/serviio
Now copy and paste the following text into the blank PuTTY/Terminal window (Right click mouse button)
#!/bin/sh
#
#########################################################
#- Daemon script for Serviio media server
#- By Ian Laird; converted for Debian by Jacob Lundberg
#- /etc/init.d/serviio
#########################################################
#
### BEGIN INIT INFO
# Provides: serviio
# 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
# X-Interactive: true
# Short-Description: Start/stop serviio media server
# Description: The Serviio media server makes your media available to
# all kinds of networked devices.
### END INIT INFO
. /lib/lsb/init-functions
if [-f /etc/default/rcS]; then
. /etc/default/rcS
fi
DAEMON_STOP=" -stop"
NAME="$(basename $0)"
PIDFILE="/var/run/serviiod.pid"
TIMEOUT=10
if [-f /etc/default/serviiod]; then
. /etc/default/serviiod
fi
[-x "$DAEMON"] || exit 0
running() {
if ["x$1" == "x"]; then
echo 0
return 1
fi
PS=$(ps h -p $(echo $1 | sed -r 's/[\t \n]+/ -p /') | wc -l)
echo $PS
if [$PS -gt 0]; then
return 0
else
return 1
fi
}
start() {
# Set up correct LANG
if [-r /etc/default/locale]; then
. /etc/default/locale
export LANG LANGUAGE LC_MESSAGES LC_ALL LC_CTYPE
fi
log_daemon_msg "Starting Serviio media server daemon" "$NAME"
start-stop-daemon --start -q -b -p "$PIDFILE" -m -c "${SERVICE_ACCOUNT}" -x "${DAEMON}"
log_end_msg $?
}
stop() {
log_daemon_msg "Stopping Serviio media server daemon" "$NAME"
if [-r "$PIDFILE"]; then
PIDS=$(pstree -p $(<"$PIDFILE") | awk -F'[\(\)]' '/^[A-Za-z0-9]/ { print $2" "$4; }')
if running "$PIDS" > /dev/null; then
"${DAEMON}" "${DAEMON_STOP}"
for PID in $PIDS; do
if running $PID > /dev/null; then
kill -TERM $PID
fi
done
fi
COUNTDOWN=$TIMEOUT
while let COUNTDOWN--; do
if ! running "$PIDS" > /dev/null; then
break
fi
if [$COUNTDOWN -eq 0]; then
for PID in $PIDS; do
if running $PID > /dev/null; then
kill -KILL $PID
fi
done
else
echo -n .
sleep 1
fi
done
fi
if running "$PIDS" > /dev/null; then
log_end_msg 1
else
rm -f "$PIDFILE"
log_end_msg $?
fi
}
status() {
echo -n "$NAME should be"
if [-r "$PIDFILE"]; then
echo -n " up with primary PID $(<"$PIDFILE")"
PIDS=$(pstree -p $(<"$PIDFILE") | awk -F'[\(\)]' '/^[A-Za-z0-9]/ { print $2" "$4; }')
RUNNING=$(running "$PIDS")
if [[$RUNNING && $RUNNING -gt 0]]; then
echo -n " and $RUNNING processes are running."
else
echo -n " but it is not running."
fi
else
echo -n " stopped."
fi
echo
}
case "${1:-}" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
status
;;
*)
log_success_msg "Usage: /etc/init.d/$NAME {start|stop|restart|status}"
exit 1
;;
esac
exit 0
Ok now we need to set some permissions and update the startup and check the status of the server
chown serviio -R /usr/local/serviio
chmod 755 /etc/init.d/serviio
update-rc.d serviio defaults
/etc/init.d/serviio status
Ok now we need to modify the interface
nano /etc/network/interfaces
After the line that reads " iface eth0 inet dhcp" we need to hit enter and add this line
up route add -net 240.0.0.0 netmask 240.0.0.0 dev eth0
Hit control and o
Hit enter
Hit control and x
This will save the file
Ok now we need to install the web admin page for serviio
cd /root
wget http://goo.gl/VFNgf
cd /var/www
unzip /root/WebUI\ v1.4beta.zip
mv /var/www/serviioweb-1.4beta /var/www/serviioweb
chmod -R 0755 serviiowebrm -f /root/WebUI\ v1.4beta.zip
Restore your sources.list
rm -f /etc/apt/sources.listmv /etc/apt/sources.list.bak /etc/apt/sources.list
Ok let’s start the server!
/etc/init.d/apache2 restart/etc/init.d/serviio start
In your web browser go to
http://your mybooklive network name or IP/serviioweb
Now it’s just a matter of setting up serviio
If you plan on doing any transcoding, make sure you go to Delivery/Transcoding/Transcoded files location:
You need to get that off the root partition or you will run the OS partition on your drive out of space and possibly brick your drive
I would suggest changing it to /shares/Public
Don’t forget to hit the save button
Transcoding is on by default so be sure to turn it off under the delivery tab if you just want a straight up DLNA server
Transcoding is hit and miss, the Sony BDP/SMP profiles work good on a WDTV and are able to transcode a 720p MKV video quick enough for stutter free playback. The MyBookLive seems to be underpowered when using some of the other profiles to transcode. Serviio is probably best used as a general DLNA server
Any comments are welcome and please share any custom transcoding profiles you might make
Until the next guide, this is nfodiz…out