Logitech Media Server on Linkstation Duo LS-WXL
From SqueezeboxWiki
Here’s my journey to get Squeezebox Server 7.5.1 (a.k.a. slimserver, or SBS) on to a Buffalo Linkstation Duo (LS-WXL) using SSODS.
Contents |
Starting point
I wanted some way of playing my music collection to a network music player, and Squeezeboxes seemed the best option. I'd been looking at using the DLNA server on the LS (Twonky Media Server) but the players didn't look so good. Trouble was Squeezeboxes don't work with the Twonky, they need their own server. So it needed to have SBS installed.
There are quite a few steps, but it works.
As with all these things, I need to say you could brick your box doing this. I wouldn't've done any of this if I thought there was a big chance of that. I think it takes some careless messing to really brick the box unrecoverably. That said, it could take some time and skill to recover it if it needed to be brought back to life from a failed firmware upgrade.
BTW I had a RAID 1 volume configured before I started - with data on it - which was completely untouched by this process (YMMV).
Root access
I’d installed firmware v 1.37, and the php server way of getting root access http://buffalo.nas-central.org/wiki/Category:LS-WXL#Gain_Root_Access didn’t appear to work any longer (it had worked with older firmware versions).
So I went for the patched firmware way of getting root access, as shown here http://buffalo.nas-central.org/wiki/Open_Stock_Firmware_LS-WXL.
Linux box
You need a linux box to follow the instructions. If you have a working linux box skip the rest of this section and go straight to 'Patching the firmware'.
I don’t have a linux machine, so one I downloaded WMWare player from here http://www.vmware.com/products/player/, and debian image from here http://www.thoughtpolice.co.uk/vmware/#debian5.0.
I needed to set network interface to ‘bridged’ or data transfer to the virtual machine was really slow.
That debian image doesn’t have zip and unzip packages. The package installer 'apt-get' didn’t work – the package sources listed appeared incomplete. So I amended /etc/apt/sources.list file with sites from http://debgen.simplylinux.ch/.
Ran
apt-get update
Ran
apt-get upgrade
not sure if this second one was needed though.
Then finally I was able to
apt-get install unzip apt-get install zip
to get the packages installed.
Patching the firmware
So, back to following the 'get root access' instructions to get the patched firmware...
- Downloaded firmware 1.37 from Buffalo.
- Unzip it on PC.
- Created new share on Linkstation from the web interface, with normal PC file share access plus sftp.
- Copied compressed filesystem image file hddrootfs.img to that share.
- sftp’ed it to the virtual box (couldn’t get the local shared folders to work, to access PC drives from the virtual server, so this seemed to do the job of transferring the files).
- Unzipped it. As you only have console access you need to type the encryption password by hand, rather than copy and paste.
- Un-tarred it.
- Made the modifications to the files listed in the instructions. (I used vi, you’ll need some linux text file editing skills here.)
- Tarred them back up – very careful typing the password.
- Zipped them back up.
- Sftp-ed to the share.
- Copied back to the PC folder – rename the old img file first.
As a check, I then tried unzipping the file on the PC, using copy-paste to get the encryption password from the instruction site. This was to make sure I typed the password right when I had zipped it on the linux box. Most important, as if this is wrong the Linkstation won’t be able to unpack the modified firmware.
All sorted, you’ve now got a patched image.
So, create the ‘emergency.sh’ file (first part of the instructions – I did it now only when I knew the firmware was ready). The chmod command didn’t seem to work, but it didn’t seem to matter.
Download acp_commander.jar http://downloads.buffalo.nas-central.org/TOOLS/ALL_LS_KB_ARM9/ACP_COMMANDER/. You’ll need java installed too (I had this already on my PC).
Now get the firmware on the Linkstation:
- Run the command to put the Linkstation in emmode at next reboot. Should get a success message.
- Tell Linkstation to reboot (I used web interface as I don’t have the Buffalo software installed anywhere).
- Whilst rebooting, add the entries to the Lsupdater.ini file
- When it’s back on the network, run the Lsupdater.exe as per the instructions. It should find the Linkstation. Cross your fingers and let it upload the firmware and reboot.
- Wait...
Once it’s back, the LASTBOOT.TXT file should be there in the sftp share, and you should be able to ssh to the Linkstation from the vmware box or the PC (I downloaded Putty for that). I'm not sure why, but from the virtual box I needed to ‘ssh root@<ip of linkstation>’ and press return a few (three?) times to get ‘password for root’ prompt - entering the new root password at the first ‘password’ prompt doesn’t work. Could be down to the 'keyboard auth' issue - see the end of the 'getting root access instructions' about this. That also gives the settings to change in Putty when connecting from the PC (essentially turn off ‘keyboard interactive (SSH-2)’ in the Connection - SSH – Auth settings).
So now you’ve got root access.
SSODS install
Next, download ssods tarball for ARM processors - ssods-4.9.1-arm.tar.gz - from http://oinkzwurgl.org/ssods_downloads. I put it in my sftp share on the Linkstation from the PC.
Instructions for SSODS and SBS install are at http://oinkzwurgl.org/ssods_installation, but this is what I did for the Linkstation.
There seems to be enough space on the root filesystem for the install, so I extracted it straight into /opt/ssods4/
First make the directory
mkdir –p /opt/ssods4
Then extract the tarball as per the ssods instructions.
I ran the ssods installer at this point and it complained about no ssods user or group. So go to the Linkstation web interface and create a group called ssods and a user called ssods.
Now (if you didn't before) run
LC_ALL= /opt/ssods4/etc/init.d/rc.ssods start
and wait for it to complete.
You should now be able to go to http://<linkstation IP>:9099 and see the ssods interface in your browser.
Squeezebox Server install
I download the Squeezebox Perl/sourcecode tarball from http://www.mysqueezebox.com/download as per the SSODS instructions. I used 5.7.1, which was current and the latest supported by SSODS. As 5.7.2 has now been released the old version can be found here http://downloads.slimdevices.com/SqueezeboxServer_v7.5.1/ I think it's squeezeboxserver-7.5.1.tgz. Unless you want to test the new one (update this if it works!). Put it anywhere on the machine you’re running the brower from, as the ssods web interface will upload it from that machine.
Give it to the ssods web interface and watch it go.
It should install. Now if you try to run Squeezebox server (as I did) it will start, but it will then fail. For some reason it won’t be able to find MySQL on the Linkstation.
Fixing MySQL
Now on my Linkstation, I didn’t have the built in MySQL server enabled at this point. So I went to the Linkstation web interface and enabled it. That didn’t seem to do much – although the myPHPAdmin then worked (the username is admin and the password is password, but you don’t need to go into it). Starting Squeezebox still failed.
Some searching later and I found this http://forums.slimdevices.com/showthread.php?t=75753&page=3 so I copied
cp /usr/share/mysql/english/errmsg.sys /opt/ssods4/var/home/SqueezeboxServer/MySQL/
May have restarted the Linkstation or ssods here, but either way when I went to the ssods web interface and started Squeezebox server it sprang into life!
So I'm not sure if enabling MySQL via the interface was needed, you could try without it if yours isn’t running.
Success. You can now go to http://<linkstation ip>:9000 and configure your squeezebox server. I'd already ripped some CDs onto the box (as FLAC) and told the SBS to scan the directory.
I didn’t have a squeezebox at this point (this was to make sure I could run it before I forked out for any hardware) so I pointed SoftSqueeze http://softsqueeze.sourceforge.net/ at it. It started playing. Perfect.
Autostart at boot
Now just need to get SSODS and SBS to start automatically when the Linkstation boots. To get SSODS to start I added link to ssods in /etc/init.d using (whilst in /etc/init.d/)
ln –s /opt/ssods4/etc/init.d/rc.ssods ssods.sh
And then added ssods.sh to the end of the line after ‘step 3’ in /etc/init.d/rcS (starts ‘for cmd in diskmon.sh ...’).
Next go to the ssods web interface and tell it to start Squeezebox server automatically when it starts – the "autostart" option on the Settings tab.
Oh, and remove (or rename) emergency.sh in your ftp directory – you don’t need to reset the root password everytime the box boots.
Done
Think that’s it.
Thanks to all the authors of the posts that I used to cobble this lot together. Maybe this’ll help someone :-)