…or “Installing Debian and the Coherence UPnP media server on a Linksys NSLU2 NAS thing”.
My two Slugs Bun-bun and Kiki are getting a new companion, Aylee. Aylee is a shape-shifter by nature, which means she is running Debian.
Getting Debian on the Slug was surprisingly uncomplicated. I first booted the off-the-shelf Slug. Using ping -b 192.168.1.255 i figured out it was using the “standard Slug IP address” 192.168.1.77. Using its web interface (which still was running the old R24 firmware), i sent it the Debian installer and waited. A few minutes later, the installer was on the Slug, which then booted.
The next step was to ssh installer@192.168.1.77. The password is install. This will start the actual installing process, which will get all the freshest Debian files for the Slug from o’er the Internets. I chose all the easiest and blankest defaults with the only added spice that my Slug would also be a file server. This comes late in the process from Tasksel. The whole installation process takes a number of hours to complete, which was a reminder from the days of old when installations, well, took hours.
The installation process also asked which hard disk it should use and format. I had gone through the extra work of formatting it on the off-the-shelf NSLU2 interface, but this was unnecessary.
During the installation, i was recommended to install ntp or ntpdate. So when the Slug finally had done its installing magic and rebooted (which it does automagically after it “cannot stress enough” the importance about rebooting), i ran apt-get update and apt-get upgrade. Much to my surprise, my system was already up to date. Take that, Windows
.
The next step was to apt-get install ntpdate. This installed ntpdate but didn’t seem to configure it, so i had to do some manual labour.
cd /etc/cron.hourly
cat > ntpdate
#!/bin/sh
ntpdate fi.pool.ntp.org > /dev/null
^D
chmod +x ntpdate
run-parts --verbose .
Replace fi in fi.pool.ntp.org to whichever country you’re in, or just leave the country bit out (i.e. just write ntpdate pool.ntp.org) for the automagia to do its thing. At ^D, press Control-D. run-parts --verbose . will run the scripts in the current directory (you saw the ., right?) and report how things went. It was this way i realized that the script ntpdate needs to start with the magic line #!/bin/sh and that it must be made executable with chmod +x. You can leave out the > /dev/null bit to begin with and if you get an hourly email from root that ntpdate has adjusted the clock with zero point zero something seconds, everything works as it should and you can add the > /dev/null bit which will silently keep your Slug in time and not give you more email.
My aim with Aylee is to have it as a photo server. As a challenge, i’m going to use the Coherence UPnP server for this. If all goes pear-shaped, i should still be able to re-flash and shape-shift Aylee back into something easier to handle
Coherence runs on Python and Python is already on the base Debian installation. There are a number of ways to install Coherence. One is using aptitude, but that will install an old version of Coherence. Another option is to manually install all the dependencies. Not fun. And the Simple way is to use EasyInstaller which in itself first must be installed. For that you need to get setuptools for your version of Python (say python --version to your slug to find out) and run the downloaded file as a script, i.e. sh setuptools-version-py2.x-egg.
At this time, i thought i would be installing Coherence (easy_install Coherence) but ran into a dependency problem. And i thought easy_install would take care of just those. Pfft. I was missing the packages Twisted and Twisted.Web and was suggested to install them. Not knowing exactly how, i said easy_install Twisted. This looked promising for a moment until i was informed the easy_installer was missing gcc, the GNU C compiler..
Duh. This was going to take some time. Compiling stuff on the Slug? Not my idea of fun.
After successfully installing Coherence 0.5.8 with aptitude instead (aptitude install python-coherence) i became a bit disappointed that the offered version was about one year old. Also, i could not get my photos to show on XBMC using UPnP though they showed okay on my Samsung telly. So it was back to the documentation. According to it, the dependencies can be installed with apt-get as well:
apt-get install python-twisted-core
apt-get install python-twisted-web
apt-get install python-configobj
You could also install the dependencies with easy_install, which i only read after having installed the above packages with apt-get. Not that it should matter much.
After that, i could finally get the latest greatest Coherence installed using easy_install Coherence. About time, i say
There were a bunch of warnings during the installation, but a coherence --version at least confirmed that the software did install.
Finally, i installed rsync so i could copy the jpeg versions of my photos from my laptop to Aylee. Which it is doing currently. It’ll take a while. Unfortunately, the kids are now watching Moomins from the telly, so i can’t test my XBMC now. But i have hopes. And the hardware.
Tags: home, home network, media, mediaplayer, nslu2, slug, xbmc

Please leave a comment!
Comments feed for this article
Trackback link: http://www.navelfluff.org/2009/12/28/enter-aylee/trackback/