Linux mediaserver on Linksys NSLU2 (slug)
SlugOS/BE (formerly OpenSlug) Linux on the Linksys NSLU2
The Linksys NSLU2 (also known as "Slug" is a well known piece of hardware to be toyed with. Linksys (part of Cisco corp.) sells the NSLU2 with a small Linux operating system on it. Linux enthousiasts developed replacement firmware. This firmware creates a small but flexible embedded Linux environment. It is also possible to hang a USB-disk on the NSLU2 and get a full blown Debian system running on the Slug.
The Slug is a great system to use as an text mode shell server: it is 100% silent (when run from an USB-pen) and is very economic (low power consumption).
The Slug as UPnP Mediaserver for a Philips Streamium box
The Slug is a good host for a Linux UPnP Mediaserver. I use it to feed a Philips Streamium SLA5520 with music. Because I wanted a 100% silent system the doesn't require much electrical power, I choose for a Slug and a 4 Gb USB memorystick.
Open Source UPnP Mediaserver
I installed Mediatomb on the Slug. Mediatomb is a free UPnP Mediaserver, completely open source. Mediatomb runs on Linux, FreeBSD and on Mac OS X. It runs on all kind of platforms: x86, Alpha, ARM, MIPS, Sparc.
Mediatomb is stable and works perfect with the Philips Streamium SLA5520. Mediatomb is easy to install and easy to configure.
Running from a 4 Gb USB memorystick
The local shop for office equipment had 4 Gb Cruzer mediasticks for sale. I purchased one for my Slug. The Slug will be dedicated to the UPnP mediaserver task so I decided not to put Debian on it, but SlugOSBE. SlugOSBE (or SlugOS/BE - the SlugOS website uses both terms) is a Big Endian (hence the BE in the name) system. It comes with a very small footprint (busybox and a few other goodies). Software is easy to add with the OptWare package system. It uses ipkg which acts a bit like apt-get.
This is how I partitioned the memorystick:
- /dev/sda1: 128 Mb ext2 to hold the root filesystem
- /dev/sda2: 128 Mb swap partition
- /dev/sda3: almost 4 Gb ext for the music
/dev/sda1 will be mounted to / and /dev/sda3 will be mounted to /home
Perhaps 4 Gb is not the right size for you. I know people who have over 150 Gb of music. My collection is not that big, it is something close to 15 Gb. However, much of this music is not played on a regular basis. The most played music is on the 4 Gb memory stick. When I occasionally want to play the other music I run mediatomb from a Linux computer with real harddisks. But for 90% of the time, the less powerconsuming Slug with the silent mediastick will do fine.
I added the unstable repository in the ipkg configuration and installed mediatomb.
After this, it was a matter of configuring
mediatomb. To do this, simply run mediatomb once
(do this as mortal user - not as root).
After this, a ~/.mediatomb directory is created and populated by a mediatomb.db and a config.xml. The config.xml is the configuration file. Edit the configuration file. Then run
mediatomb -a /path/to/music
Your music will be parsed and the database will be filled. Let it run for a while (listen to some music in the mean time) and killall mediatomb. Then let mediatomb start from /etc/rc3.d (as the mortal user and its group). That is it!