NSLU2-Linux
view · edit · print · history

Can some experts update the documentation for about installing slimserver on a NSLU2. Although i tried a few times installing via the procedure mentioned below, i didn't succeed in it. With the old installation procedure (for slimserver r6.3 and older) i didn''t succeed either. I am a rookie for about linux. Feel free to click on edit and modify this discription. Thanks in advance

The guide needs update, now that slimserver 6.5.4 is in optware.

Ive installed slimserver 6.5.4 using the optware package (ipkg install slimserver). The result was hopefull, yet not completely succesful:

  • package installs, asks for a slimserver home directory
  • Issued successfully command /opt/bin/mysqladmin -u root password 'new-password'
  • Failed to sucessfully issue /opt/bin/mysqladmin -u root -h the_name_of_my_slug password 'new-password'. Error message:
    /opt/bin/mysqladmin: connect to server at the_name_of_my_slug failed
    error: 'lost connection to MySQL server during query'
  • I didn't create a new user manually (user 'slim') for slimserver to act upon; apparently the install took care of that since my /etc/passwd now provides for a user 'slimserver': slimserver:x:1000:1:Linux User,,,:/home/slimserver:/dev/null

Result:

  • slimserver runs successfully: Soft Squeezebox can connect, home page (my-slug-url:9000) is accessible.
  • I've got multiple MySQL instances running. As suggested in SlimServerOld I removed S70mysqld & K70msqld from init.d which both linked to ../../share/mysql/mysql.se -- This didn't seem to change anything from a functional perspective, although now a triplet of /opt/share/slimserver/Bin/mysql instances are running, and no other ones. I assume this actually relates to one instance.
  • server is unable to scan the music directory (chmod -R 777 didn't do the trick, neither a chown slimserver), although it can play individual directories if you browse it and select one via the (soft) Squeezebox.

Slimserver's log provides me, a.o., with the following message that is being generated during start of slimserver deamon:

Can't locate auto/Compress/Zlib/autosplit.ix in @INC (@INC contains:
 /opt/share/slimserver/CPAN/arch/5.8/armv5b-softfloat-linux
 /opt/share/slimserver/CPAN/arch/5.8/armv5b-softfloat-linux/auto
 /opt/share/slimserver/CPAN/arch/5.8.8/armv5b-softfloat-linux
 /opt/share/slimserver/CPAN/arch/5.8.8/armv5b-softfloat-linux/auto
 /opt/share/slimserver/CPAN/arch/5.8/armv5b-softfloat-linux /opt/share/slimserver/CPAN/arch/5.8/armv5b-softfloat-linux/auto
 /opt/share/slimserver/CPAN/arch/armv5b-softfloat-linux /opt/share/slimserver/lib /opt/share/slimserver/CPAN
 /opt/share/slimserver /opt/share/slimserver /opt/lib/perl5/5.8.8/armv5b-linux /opt/lib/perl5/5.8.8
 /opt/lib/perl5/site_perl/5.8.8/armv5b-linux /opt/lib/perl5/site_perl/5.8.8 /opt/lib/perl5/site_perl .) at
 /opt/lib/perl5/5.8.8/AutoLoader.pm line 160.
 at /opt/share/slimserver/CPAN/Compress/Zlib.pm line 15
080426  9:18:52 [Warning] this binary does not contain INNODB storage engine

and indeed, inspection confirms that /opt/share/slimserver/CPAN/arch/5.8.8/armv5b-softfloat-linux/auto/Compress/Zlib/ does not contain autosplit.ix

The following log message is being generated when trying to scan the music directory:

Transactions not supported by database at /opt/share/slimserver/scanner.pl line 137.
ERROR: Scanner: Failed to update isScanning: [Transactions not supported by database at /opt/share/slimserver/CPAN/DBI.pm line 1657.]

Any suggestions? -- PaulBrandt?, April 27th 2008

Edit by PaulBrandt?, September 19th, 2008:

  • Slimserver now IS able to scan the music directory. Whenever I add music to the directory, I issue a "chown -R guest.slimserver ./*" followed by a "chmod -R ugo+r ./*" . This resolves the issue.
  • Following S.E.'s suggestion to comment out various instances related to "AutoCommit?", the error messages related to "transactions not supported / failed to update isScanning" have disappeared. Note that this is also reduces functionality, although I'm not sure what functionality in particular.
  • In conclusion: I have slimserver (6.5.4) up and running from my slug, serving a SqueezeBox? in the living room about up to 10,000 songs. Performance wise, there is a penalty due to the 32MB available memory and the high memory footprint of slimserver. Still streaming is not a big deal, though controlling the device is bit cumbersome. Have patience and you'll be fine. The "lazysearch" plugin is reasonably "fast" and hence very useful. The homepage (http://yourslug:9000(approve sites)) is slow, but the good thing is you don't need to access it too often, only for configuration. Browsing your music library can be done far more easy with Moose -- especially since it's quicker. The Weather screensaver is a nice add-on, providing me with quite accurate forecasts whenever the music is off. In short, it's operating correctly, I like the minimalistic approach, and still am training my patience.

Edit by PaulBrandt?, October 26th 2008:

  • Issue found: the SqueezeBox? spontaneously reboots itself very frequently. This issue has nothing to do with the NSLU and is resolved by downgrading the firmware of the SqueezeBox? to version 64; versions above 64 seem to introduce this issue. Refer to the slimserver fora, especially the one describing the issue: http://forums.slimdevices.com/showthread.php?t=35054 . Firmware version 64 seems to work fine with slimserver release 6.5.4

/opt/share/slimserver/scanner.pl line 137 -> add # to lines 137 (and following) ones (everything related to function "AutoCommit?")

/opt/share/slimserver/CPAN/DBI.pm line 1657 -> add # to lines 1657 and following ones (everything related to function "AutoCommit?")

Now "slimserver stop" and "slimserver start".

Possibly an additional error in playlist.pm will show up, then do the same as above.

This worked for me.

-- S.E, May 26th 2008


BenMcDui? 20080508: When trying to get Slimserver 6.5.1-1 installed following the instruction further down this page, I get the same two warnings:

Transactions not supported by database at /opt/share/slimserver/scanner.pl line 137.
ERROR: Scanner: Failed to update isScanning: [Transactions not supported by database at /opt/share/slimserver/CPAN/DBI.pm line 1657.]

I noticed that, since I successfully installed Slimserver on my other slug a few months ago, mysql has upgraded from 4.1.20 to 4.1.22. It's the only difference I have been able to find so far. You get mysql 4.1.22 automatically when you do # ipkg install mysql. Unfortunately, it is not possible to find mysql 4.1.20 anymore on the web....

Can someone with more understanding of mysql please expore this issue?


With thanks to Ben's information above and a few other snippets from around the web I got SqueezeCenter? 7.0.1 running on my SLUG. It's non-trivial and a maintenance nightmare, resulting in a very slow performing SqueezeCenter?. Due to the increased memory requirements the SLUG spends a lot of time paging!

I'm going to write some more detailed information over the next few days on my blog (http://gibbalog.blogspot.com/) of my experience getting this lot up and running. However, in brief I cross-compiled a new version of MySQL using the SLUG toolchain from Optware to make a previously known-working ipkg; Squeeze Center also has some new requirements above slimserver 6.5.4 for various Perl module that I've installed to my SLUG too.

Graham White on 27th May 2008.


Installing and running Slimserver on Asus WL500G Premium

This guide was posted also on the corresponding forum http://forums.slimdevices.com/showthread.php?t=43593

Given: Squeezebox 3, asus wl500g premium, 200Gb Toshiba harddisk + Vipower usb box

Todo: install and run Slimserver on asus

Pre.

1. Slimserver is very heavy for asus wl500gp since it is php+mysql, but it works and is able to broadcast music continuously; only the reaction on commands is very slow. Now I'm trying to find minimalistic configuration.

2. Asus setup steps are good described at http://wl500g.info/showthread.php?p=60933

3. Don't forget to do "flashfs save && flashfs commit && flashfs enable"; or all new programs will be lost after you restart router

4.The address of my router is 192.168.24.1

Howto steps:

1. Firmware.

Install Oleg's custom firmware from wl500g.dyndns.org (forum wl500g.info)

2. Formatting.

Format usb hdd drive using PQMagic (I've used PQMagic v.8). Make primary partition of type ext3 and linux swap partition (I've made 2Gb swap)

3. HDD plugging.

Connect usb hdd to asus using both usb plugs and make sure that is "started"; and isn't flicking

4. Installing and configuring slimserver

Connect to asus via telnet and enter your username/password (admin/admin)

telnet 192.168.24.1

make sure that asus sees all ext3 and swap partitions:

fdisk -l

output:

Disk /dev/scsi/host0/bus0/target0/lun0/disc: 200.0 GB, 200049647616 bytes 255 heads, 63 sectors/track, 24321 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System

/dev/scsi/host0/bus0/target0/lun0/part1 1 11918 95731303+ 83 Linux

/dev/scsi/host0/bus0/target0/lun0/part2 11919 24321 99627097+ f W95 Ext'd (LBA)

/dev/scsi/host0/bus0/target0/lun0/part5 11919 12180 2104483+ 82 Linux swap / Solaris

/dev/scsi/host0/bus0/target0/lun0/part6 12181 24321 97522551 b W95 FAT32

update package installer and install slimserver (it will install additional packages such as mysql automatically):

mkdir /tmp/harddisk/opt
mount -obind /tmp/harddisk/opt /opt
mkdir -p /opt/tmp/ipkg
ipkg.sh update
ipkg.sh install ipkg-opt
ipkg update
ipkg install slimserver

I've used the /opt/share/slimserver dir as the slimserver user dir

make swap

swapon /dev/scsi/host0/bus0/target0/lun0/part5

create and configure startup file /usr/local/sbin/post-mount (that is automatically started during router booting after

it detects usb drives) to bind hdd root to /opt and to make swap after each reboot:

echo "#!/bin/sh" >> /usr/local/sbin/post-mount
echo "/bin/mount -o bind,sync,noatime,rw /tmp/harddisk/opt /opt" >> /usr/local/sbin/post-mount
echo "swapon /dev/scsi/host0/bus0/target0/lun0/part5" >> /usr/local/sbin/post-mount
chmod +x /usr/local/sbin/post-mount

Save group and password of a new slimserver user

echo "/etc/passwd" >> /usr/local/.files 
echo "/etc/group" >> /usr/local/.files 

save all installed programs

flashfs save && flashfs commit && flashfs enable

Make the dir "music"; on usb hdd and make it accessible:

In asus interface:

USB Application | Samba: "Enable Samba Demo mode" and "Enable hidden read-write share". 
 IP Config | WAN & LAN: Host Name in LAN IP Setting "wl500"; 
Finish (Save&Reboot)

Primary partition will be available for reading using \\wl500g\share and for writing \\wl500g\share$

Make dir music in \\wl500g\share$ and copy some mp3 files there (I recommend copy only one album at first since it will take a lot of time to scan a big collection)

5. Starting slimserver:

Run slimserver /opt/etc/init.d/S99slimserver start

After a while (about 2 minutes) you will see "Slimserver started" message Check that slimserver is listening at port 9000

netstat -l

Slimserver is available at http://192.168.24.1:9000 (and http://wl500g:9000 also). Start it in your browser In "Settings" field choose "Server settings" and specify there "Music folder": /tmp/harddisk/music

6. Connect Squeezebox to slimserver :

Choose "Connect to Slimserver" on your Squeezebox and enter it's IP address (my is 192.168.24.1) Then you will see "Connecting to slimserver" message on Squeezebox. It takes about 1.5 minutes to connect first time. Then choose to play some music.

P.S.Praise to oleo who cross-compiled slimserver and made a package (my task was to configure and test it)

A.Ulanov


Installing Slimserver on the NSLU2

This guide is mostly copied from http://www.openfsg.com/forum/viewtopic.php?p=14920#14920 . All credits go to bpa of openfsg.com. You can find the outdated NSLU2 SlimServer doc at SlimServerOld.

Downloading

You can find the current build of Slimserver 6.5.1 here. The slimserver code is final but the supporting scripts are not quite finished.

http://homepage.eircom.net/~altondsl/slim/ss65_6.5.1-1_armeb.ipk

This is 6.5.4 version with a few corrections but this is for an fsg3 so NSLU2 users need to take care.

http://homepage.eircom.net/~altondsl/slim/ss65_6.5.4-1_armeb.ipk

You can use a browser or wget or curl to downloads the file onto the NSLU2.

Installing

This install puts files in the following directories - so if you already use them move your files elsewhere.

 /home/slimserver
 /opt/share/ss65

1) Login as root, and make sure your PATH is correct:

 nslu2# export PATH=$PATH:/opt/libexec:/opt/bin

2) Add the "slimserver" group and user by editing /etc/passwd and /etc/group. Create the /home/slimserver folder.

3) Install the perl, expat and mysql packages. The slimserver ipkg will request them but it is better to do manually in case there are problems, you'll know where to look.

 nslu2# ipkg update; ipkg install perl expat mysql perl-compress-zlib

4) Change current directory to where the ss65_6.5.1-1_armeb.ipk has been saved.

5) install the Slimserserver package with the command

 nslu2# ipkg install ss65_6.5.1-1_armeb.ipk 

6) Change the first line in /opt/share/ss65/slimserver.pl and ../scanner.pl from "#!/usr/bin/perl -w" to "#!/opt/bin/perl -w", and fix some permissions:

 nslu2# chmod a=rw /opt/share/ss65/Slim/Utils

7) Edit /opt/share/ss65/MySQL/my.tt, comment out the innodb_fast_shutdown line:

 #innodb_fast_shutdown  = 1

8) If it install goes OK, try the command

 nslu2# slimserver

Note: /opt/bin/should be in your $PATH (from step 1), and will also be if you are using ssh to access your slug.

The response should be

 Usage: /opt/bin/slimserver {start|stop|status|enable|disable|firewall|wanenable|wandisable|info} 

9) If it works. then try

 nslu2# slimserver info 

10) To start slimserver used the command below - it will take a couple of minutes before your see a "Slimserver Started message"

 nslu2# slimserver start 

11) Watch the log to see if everything is OK. The following is a normal start - the last line about port 9000 indicate web interface is ready.

 nslu2# tail /home/slimserver/slimserver.log

        http://nslu2:9000/
 2007-01-22 20:39:37.8519 Attempt to free unreferenced scalar: SV 0x1bc6b4c.
 2007-01-22 20:40:51.0064 Use of uninitialized value in join or string at /opt/lib/perl5/5.8.8/File/Spec/Unix.pm line 81.
 2007-01-22 20:42:07.4538 Your data source needs to be configured. Please open your web browser,
 2007-01-22 20:42:07.4763 go to the following URL, and click on the "Server Settings" link.

 2007-01-22 20:42:07.4785 The URL to access SlimServer is now:

        http://nslu2:9000/

12) By default slimserver will not start as part of boot - if you want this then add an executable script as /opt/etc/init.d/S85slimserver:

 #!/bin/sh
 /opt/bin/slimserver start

Issues

Makefile

Can someone publish the makefile to Optware svn so it can be updated for 6.5.4 and all future releases please?

You can find a tar.gz file here of the relevant files. If you want help from the author - start a thread on Slimserver forum. Some caveats:

1. It is not approved/reviewed by optware developers.

2. It is set up for FSG3 and so there are FSG3 specifics.

3. It has only been tested cross compiling and not native as FSG3 cannot compile some of the modules.

http://homepage.eircom.net/~altondsl/slim/ss65ipkgmaker.tar.gz

MySQL

You may end up with two mysql processes running. One from the mysql install and another from slimserver.

Two options to resolve this:

      http://wiki.slimdevices.com/index.cgi?ExistingMySQLInstance
      or
      remove the *70mysqld from /opt/etc/init.d (I had both K70mysqld and S70mysqld for some reason.

Speed

You shouldn't bother to install this on anything but a TurboSlug. Even turbo, scanning the whole music library took half an hour.

SlugOS/BE issues

- Concerning point 3) Prior to install those packages, on my SlugOS/BE I had to install optware and then use the commands

 /opt/bin/ipkg-opt update

- Concerning point 10) Prior to be able to start slimserver, I had to execute the following commands:

 root@nslu2:/opt/share/ss65/CPAN/arch/5.8.8# mkdir armeb-linux
 root@nslu2:/opt/share/ss65/CPAN/arch/5.8.8# cp -a armv5b-softfloat-linux/* armeb-linux/

This was neccessary since perl searched the modules in armeb-linux and not in armv5b-softfloat-linux since the package was compiled on FSG3 and not on NSLU2. Use command "perl -V:archname" to get the correct name as the name "armeb-linux" may not be correct for all builds of Perl or Unslung/SlugOS. See also http://forums.slimdevices.com/showthread.php?t=36894

innodb

slimserver.log may (will?) tell you among other things:

071023 20:47:30 [Warning] this binary does not contain INNODB storage engine

It turns out to be not a harmful issue, in most cases slimserver will run fine.

mysqld

You may see:

2007-10-23 20:41:14.9403 ERROR: MySQLHelper: startServer() Couldn't find a execu
table for 'mysqld'! This is a fatal error. Exiting.

in slimserver.log.

FOLLOWING THREE LINES CORRECTED by author on 20080402:

Slimserver expects a copy of the mysqld executable in /opt/share/ss65/Bin, and you can solve this by:

 # mkdir /opt/share/ss65/Bin
 # cp /opt/libexec/mysqld /opt/share/ss65/Bin/

Having done this, the command

 # export PATH=$PATH:/opt/libexec:/opt/bin

would no longer be needed.

mysqld & boot not starting slimserver

Note I didn't find that this resolved the problem for the on boot process. I needed to change the bootup script in step 12 to look like:

 #!/bin/sh
 export PATH=$PATH:/opt/libexec:/opt/bin
 /opt/bin/slimserver start

Response by BenMcDui? 20080402: apologies for the mistake; see my correction above, the modification of the bootup script would then not be needed.

Slimserver does not scan music

Ensure that the rights/ownership of your music library are correct. User slimserver must have rwx rights. Very often if music is placed onto you HDD "from the outside" this is not (yet) the case.

For FAT or NTFS formatted disks: these do not allow you to change ownership and severely limit the possibilities to change rights. Mostly, owner=guest on those disks. As far as my solution goes: start slimserver as guest. By implication, you must ensure that user guest can write to /home/slimserver/slimserver.pref and ....my.cnf. Also user guest must get rights on /opt/share/ss65; my solution (over the top?) is # chown -R guest /opt/share/ss65. Any ideas about a more elegant solution are most welcome!

Slimserver is slow

Try running MusicBrowser in addition to slimserver. It can playback via the slimserver, but you won't have to use the heavy slimserver GUI.