PDA

View Full Version : The point on SlimServer 6.5 and Linkstation II with Openlink



gbruzzo
2006-10-11, 07:59
Dear all,

Can we converge on a statement of common understanding on how to install SlimServer 6.5 on a Linkstation II (mipsel and PPC) without recurring to a further reflash of the Linkstation?

Even if am currently running Slimserver 6.3.1 confortably I would really like to take advantage of the new features of 6.5 (including version 3 of Softsqueeze...)

I have repeatedly tried installation and failed on my LSII with Openlink, as detailed in a previous thread (http://forums.slimdevices.com/showthread.php?t=27509). A number of development MySql libraries are missing, which does not allow me to compile the required perl modules.

From what I understand success was achieved only with a Freelink flash of the Linkstation - as a Debian machine.

I am very cautious, and would not want to reflash my Linkstation if not demonstrably necessary, since I would be loosing the current Buffalo web interface, not to speak the risk of bricking the nas.

I would therefore like to hear any comments from those of us who are not willing to reflash and would like to preserve Openlink.

It was mentioned, that one could install a package manager similar to apt-get (IPKG - see http://linkstationwiki.net/index.php?title=Category:Ipkg)

Has anyone tried? What are the available packages? Can one load any of the packages that one can with AptGet with Freelink/Debian? If so what packages should one install?

Thank you all, I hope we may be able to come to the end of this.

Giacomo

srasher
2006-10-12, 13:33
I fully agree with your point! I also do not want to install the openlink stuff and would really like to see the 6.5 working with Freelink (on my mipsel Linkstation II). So far I have not started any installation trials but done some research on the commonly mentioned issues.

Of course, I meant I do not want to install the FREELINK stuff but STAY WITH THE OPENLINK ;-)

I hope this is not too far away from your original topic to get a full status clarification but here is a first finding from some googling:

Have a look here for mysql-devel package for mipsel:

http://momonga.nahi.to/pub/mips/mipsel/

I know it is an rpm but there is a tool called rpm2targz to make it "installable" on a non-Openlinked Linkstation. The outcoming archive contains this:

./usr/
./usr/bin/
./usr/bin/comp_err
./usr/bin/mysql_config
./usr/include/
./usr/include/mysql/
./usr/include/mysql/chardefs.h
./usr/include/mysql/errmsg.h
./usr/include/mysql/history.h
./usr/include/mysql/keymaps.h
./usr/include/mysql/m_ctype.h
./usr/include/mysql/m_string.h
./usr/include/mysql/my_alloc.h
./usr/include/mysql/my_config.h
./usr/include/mysql/my_dbug.h
./usr/include/mysql/my_dir.h
./usr/include/mysql/my_getopt.h
./usr/include/mysql/my_global.h
./usr/include/mysql/my_list.h
./usr/include/mysql/my_net.h
./usr/include/mysql/my_no_pthread.h
./usr/include/mysql/my_pthread.h
./usr/include/mysql/my_semaphore.h
./usr/include/mysql/my_sys.h
./usr/include/mysql/mysql.h
./usr/include/mysql/mysql_com.h
./usr/include/mysql/mysql_embed.h
./usr/include/mysql/mysql_version.h
./usr/include/mysql/mysqld_error.h
./usr/include/mysql/raid.h
./usr/include/mysql/readline.h
./usr/include/mysql/sslopt-case.h
./usr/include/mysql/sslopt-longopts.h
./usr/include/mysql/sslopt-vars.h
./usr/include/mysql/tilde.h
./usr/lib/
./usr/lib/libmysqlclient.a
./usr/lib/libmysqlclient.la
./usr/lib/libmysqlclient.so -> libmysqlclient.so.12.0.0
./usr/lib/libmysqlclient_r.a
./usr/lib/libmysqlclient_r.la
./usr/lib/libmysqlclient_r.so -> libmysqlclient_r.so.12.0.0
./usr/lib/mysql/
./usr/lib/mysql/libdbug.a
./usr/lib/mysql/libheap.a
./usr/lib/mysql/libmerge.a
./usr/lib/mysql/libmyisam.a
./usr/lib/mysql/libmyisammrg.a
./usr/lib/mysql/libmystrings.a
./usr/lib/mysql/libmysys.a
./usr/lib/mysql/libnisam.a
./usr/lib/mysql/libvio.a

Looks like it might help, doesn't it?!

Maybe I'll start trying around with this and you're previous findings over the upcoming weekend.

Hope this is of any help! Cheers, Sebastian

gbruzzo
2006-10-13, 03:16
srasher,

maybe we have a misunderstanding. I have an LSII flashed with openlink, not freelink. I would like not to have to reflash from openlink to freelink.

Is this your case?

gbruzzo
2006-10-13, 03:19
Ok sorry, just seen your [/EDIT].

Where can I get the rpm2targz tool?

Giacomo

srasher
2006-10-13, 05:18
Hi Giacomo,

it is just a shell script. You can get it e.g. here

http://keesan.freeshell.org/bl/rpm2targz

I did not yet have time to try stuff with the mysql-devel libs package converted to a tar.gz but will try over the weekend. I am of course interested in anything you find out in case you'd also run some trials.

Cheers,
Sebastian

gbruzzo
2006-10-13, 06:52
Hi Sebastian,

will do so this weekend. Very very keen to get slimserver 6.5 running. The scanning is much faster and separate from the playing, which should really make for a superior experience of use...

Will let you know how I proceed.

Giacomo

madfuzzy
2006-10-13, 12:26
I've managed to get all of the modules to compile using the contents of the package file on Openlink 0.52b (on a LS2), which is great news, however I've run into another wall on starting Slimserver up:

2006-10-13 20:15:44.3269 ERROR: MySQLHelper: startServer() Couldn't find a executable for 'mysqld'! This is a fatal error. Exiting.

I'm guessing I either need to create a new user for Slimserver and modify its path to get it to start up? Can anyone run me through what I need to do?

madfuzzy
2006-10-14, 05:30
OK, I found a way of linking in an executable for mysqld but I can now see why people are repartioning with Freelink: I don't seem to have enough free space in my /root partition for mysql to actually be able to create the necessary databases in that partition (I'm trying to run things from /mnt/slimserver).

I've moved my installation from /mnt/slimserver to /mnt/hda/slimserver and started it with a user that isn't root (after giving privs for this user to both this folder and the /mnt/slim-data one via chown) and it seems to have come up, although my LS2 is taking a hammering as it's rescanning the music database (there's more than 10 instances of mysqld running).

I'm going to give it a couple of hours to see what happens, as I daren't upgrade my Squeezebox 2 firmware in case I have to downgrade to 6.3.1 again.

stevos
2006-10-14, 08:45
Sounds promising, if it works could you post a guide including where you got the missing modules from and how you got them to work plus how you got mysql to run properly

fingers crossed
steve

madfuzzy
2006-10-14, 09:35
I installed the mysql-devel package from the link above into the default locations.

Then I was able to build all of the modules (including mysql) with "build-perl-modules.pl" in Slimserver's "Bin" folder (I already had all of the expat libraries installed from my previous 6.3.1 installation).

The next major stumbling block for me was linking in mysql where Slimserver could find it, which is where I cheated a bit. Inside the Slimserver "Bin" folder I created a folder called "mipsel-linux-gnu-thread-multi".

Inside that I put a copy of "mysqld" that I grabbed from the Debian "mysql-server-4.1_4.1.11a-4sarge7_mipsel.deb" mipsel package on the Debian website. I needed to extract the tgz archive containing mysql from its .deb package using "ar -x", then I could untar it.

Once untarred I did a cp of the "mysqld" file into the newly created "mipsel-linux-gnu-thread-multi" folder inside Slimserver's "Bin" folder.

Next I made sure that I had a seperate user account for slimserver (which I called "slimserv") as it won't run as root in 6.5.0 because of mysql. I then did a "chown -R slimserv" on both my "slim-data" and "slimserver" folders to make sure that my slimserver user account had access to them.

Once that was done I issued the following command and it came up:

./slimserver.pl --daemon --prefsfile /mnt/slim-data/slimserver.pref --cachedir /mnt/slim-data --user slimserv

What I soon realised was that because of the very limited amount of space in /root, that I needed to move things elsewhere or the databases would never be created (it choked several times on me at first before I moved things to a different partition).

So far I have only moved my Slimserver installation from /mnt/slimserver to /mnt/hda/slimserver, but I get the feeling I will need to move /mnt/slim-data to /mnt/hda/slim-data as the mysql database seems huge at the moment and is growing as I type (it's been going for about 2-3 hours so far which is normal for first time database creation on my LS2).

I've decided that I'm letting the scan of my music library complete before I do anything else (including upgrading the firmware on my Squeezebox 2), just in case. This means that I haven't actually tried streaming any music yet. :)

My major concern at the moment is that I have multiple instances of mysqld running (more than 10!) which means my LS2 is swapping out. I get the feeling that I'll need to tweak the "my.cnf" file to something more suitable for the 64mb of RAM on the LS (probably based on the "my_small.cnf" that comes with the standard mysql server distribution).

I tried to do this earlier but I think Slimserver over-wrote my updated version on start up. Can anyone tell me where the template for Slimserver's "my.cnf" is stored so I can create a new one that won't overwrite it with the existing version?

Anyway my general feeling is, thanks to srasher who found those mipsel mysql-devel libraries, that you CAN run 6.5.0 on an Openlink Linkstation, but at the moment there's quite a lot of legwork required.

aubuti
2006-10-14, 10:41
Congratulations on your pioneering efforts! I figured it could be done, but that it was probably over my head, and your description confirms both. I'll be very interested to hear how performance is on an LS with only 64MB of RAM.

Is mysqld starting at boot time independent of slimserver? From your description I would guess not, but I'm not sure. If it is, you can disable it, because slimserver will start up its own instance when slimserver loads. That saved me some memory on my LS HG (Freelink'd).

madfuzzy
2006-10-14, 11:15
Nope, Slimserver is loading mysql on my box, and for some reason, it's bringing up 11 instances of it on startup (only one of which it actually seems to use when doing anything):

Here's my top readout with everything idle at the moment:

Mem: 60576K used, 1268K free, 0K shrd, 1520K buff, 27556K cached
Load average: 1.01, 0.60, 0.47 (State: S=sleeping R=running, W=waiting)

PID USER STATUS RSS PPID %CPU %MEM COMMAND
3288 slimserv R 36M 1 15.2 60.9 slimserver.pl
3307 root R 792 3180 5.7 1.2 top
3301 slimserv S 7556 3291 0.0 12.2 mysqld
3290 slimserv S 7556 3288 0.0 12.2 mysqld
3298 slimserv S 7556 3291 0.0 12.2 mysqld
3291 slimserv S 7556 3290 0.0 12.2 mysqld
3293 slimserv S 7556 3291 0.0 12.2 mysqld
3297 slimserv S 7556 3291 0.0 12.2 mysqld
3292 slimserv S 7556 3291 0.0 12.2 mysqld
3294 slimserv S 7556 3291 0.0 12.2 mysqld
3295 slimserv S 7556 3291 0.0 12.2 mysqld
3296 slimserv S 7556 3291 0.0 12.2 mysqld
3299 slimserv S 7556 3291 0.0 12.2 mysqld
3233 root S N 1276 2126 0.0 2.0 smbd
3180 root S 692 186 0.0 1.1 bash
2128 root S N 548 1 0.0 0.8 nmbd
2174 nobody S N 460 1 0.0 0.7 proftpd
230 daemon S 340 1 0.0 0.5 lpd
225 root S 340 1 0.0 0.5 thttpd

Also my belief that Slimserver was overwriting any changes that I made by hand to "my.cnf" in my slim-data folder is definitely true. I need someone to tell me where it's reading the default my.cnf file from each time to make sure it uses a custom version.

As for it being a bit over your head, this is a massively hacky way of doing things but it seemed to work. :)

There MAY be ways of simplifying the process, but I'll leave that up to other people more well versed in the ways of Linux (especially those with PowerPC or ARM based LS boxes).

For reference, the full rescan of my library took between 4.5 and 5 hours for "663 albums with 7212 songs by 504 artists".

Updated my firmware and both streaming MP3s from the LS and from BBC 6 Music is working a treat. Here's the top readout whilst I'm streaming music from the LS:

Mem: 60308K used, 1536K free, 0K shrd, 1140K buff, 30924K cached
Load average: 0.20, 0.61, 0.59 (State: S=sleeping R=running, W=waiting)

PID USER STATUS RSS PPID %CPU %MEM COMMAND
3288 slimserv R 33M 1 21.7 55.6 slimserver.pl
3307 root R 676 3180 0.7 1.0 top
3301 slimserv S 11M 3291 0.0 19.2 mysqld
3290 slimserv S 11M 3288 0.0 19.2 mysqld
3294 slimserv S 11M 3291 0.0 19.2 mysqld
3298 slimserv S 11M 3291 0.0 19.2 mysqld
3295 slimserv S 11M 3291 0.0 19.2 mysqld
3297 slimserv S 11M 3291 0.0 19.2 mysqld
3299 slimserv S 11M 3291 0.0 19.2 mysqld
3296 slimserv S 11M 3291 0.0 19.2 mysqld
3291 slimserv S 11M 3290 0.0 19.2 mysqld
3293 slimserv S 11M 3291 0.0 19.2 mysqld
3292 slimserv S 11M 3291 0.0 19.2 mysqld
3233 root S N 672 2126 0.0 1.0 smbd
2128 root S N 540 1 0.0 0.8 nmbd
2174 nobody S N 460 1 0.0 0.7 proftpd
225 root S 340 1 0.0 0.5 thttpd
230 daemon S 316 1 0.0 0.5 lpd
237 root S 248 1 0.0 0.4 cron

Good luck to other people who give this a shot!

aubuti
2006-10-14, 12:23
I don't know the ins & outs of MySQL, but from other posts and what's on my LS it appears that it's normal for a single instance of my mysqld to have ~10 processes running. And obviously, those processes are all sharing the same 12.2% or 19.2% of memory. But maybe you can scale it down a bit through my.cnf.

madfuzzy
2006-10-14, 12:29
That's encouraging to hear I guess. I'd like to tweak mysql if I can so that it's slightly less memory hungry, but I have to say I'm fairly impressed with the performance of 6.5.0 on my Openlinked LS2 so far.

Navigation feels faster on the Squeezebox (it's definitely less laggy) and searches seem quicker as well, so it's worth having a go at installing it if you have a semi-OK grasp of Linux.

The "funny" thing is I'll probably have to go through a good chunk of it again when 6.5.1 is released, but I'll worry about that bridge when I need to cross it.

aubuti
2006-10-14, 13:33
...so it's worth having a go at installing it if you have a semi-OK grasp of Linux.
Personally, I'm quite happy with Freelink + SS6.5 on my PowerPC LinkStation, and seeing what you had to do on your LS II I'm glad I switched from OpenLink to the Freelink route. No way I'd give up apt-get by going back to OpenLink. But others -- especially in this thread -- are more wedded to OpenLink than I, so I expect some will follow your trail.

I've also found performance a little snappier under 6.5 than under 6.2. But this version of SS is definitely taxing the 64MB RAM of the early LSs. It operates a lot more comfortably in the 128MB of the gigabit LSs (HD-HG). For example, my library is about 1/2 the size of yours, and a complete clear and rescan takes 'only' 30 minutes.

srasher
2006-10-16, 03:01
Greaaaaaaat!!!!! I also managed to get it running a few moments ago, thanks to madfuzzy for the great documentation of your efforts!

Here are my findings so far:

1) I tried it with a nightly of 6.5.1 and I don't think you will have to go through many of the hacks you did again because it seems to be perfectly OK with the versions of the additional tools (expat, mysql-devel) installed for 6.5.0.

2) mysqld: I just created the additional dir in "Bin" as you proposed and did a symlink to /mnt/hda/opt/mysql/libexec/mysqld (which is where I installed mysql due to the recommendations in the LinkstationWiki) from there.

3) Regarding "my.cnf": In "<slimserver-install-dir>/MySQL/" there is a file called "my.tt" which contains exactly the lines that are written into the "slim-data/my.cnf" so this might be the template you have been looking for to start tuning/playing around with the settings to try to reduce the number of instances of mysqld. Unfortunately I am also no MySQL expert so I don't know how to start but if I find something I'll let you know. Of course, I'm also interested in anything you might find out!

Anyway: great to have it somehow working!

Cheers, Sebastian

srasher
2006-10-16, 03:12
One additional remark on the number of instances of mysqld: I found this threat which is not offering loads of information but seems to indicate that the innodb support of MySQL (which seems to be mandatory for SS as far as I understand) is one of the major factors contributing to the number of server instances:

http://forums.mysql.com/read.php?35,49782,57066#msg-57066

Maybe it's just a minor issue and tweaking the server spawning is anyway possible. I'm curious reading about any new findings on your side!

aubuti
2006-10-16, 05:01
One additional remark on the number of instances of mysqld: I found this threat which is not offering loads of information but seems to indicate that the innodb support of MySQL (which seems to be mandatory for SS as far as I understand) is one of the major factors contributing to the number of server instances:
I don't know what other MySQL tweaks might be possible, but I can confirm that innodb support is mandatory for slimserver 6.5.x : http://forums.slimdevices.com/showthread.php?t=26468

stevos
2006-10-16, 12:23
I may be being a bit stupid, but i can't work out from the above posts where i actually get a downloadable version of mysql-devel and how i actually install it.

madfuzzy
2006-10-16, 14:09
Download this file: http://momonga.nahi.to/pub/mips/mipsel/MySQL-devel-4.0.25-1m.mipsel.rpm

I converted the .rpm using rpm2cpio ("rpm2cpio MySQL-devel-4.0.25-1m.mipsel.rpm"), and I then extracted files from the .cpio file that was produced using the Windows app 7zip. It was then a case of copying all the extracted mysql-devel files to their correct locations on the LS.

stevos
2006-10-16, 14:16
How do i know which is the correct location?

madfuzzy
2006-10-16, 14:24
Greaaaaaaat!!!!! I also managed to get it running a few moments ago, thanks to madfuzzy for the great documentation of your efforts!

Here are my findings so far:

1) I tried it with a nightly of 6.5.1 and I don't think you will have to go through many of the hacks you did again because it seems to be perfectly OK with the versions of the additional tools (expat, mysql-devel) installed for 6.5.0.

2) mysqld: I just created the additional dir in "Bin" as you proposed and did a symlink to /mnt/hda/opt/mysql/libexec/mysqld (which is where I installed mysql due to the recommendations in the LinkstationWiki) from there.

3) Regarding "my.cnf": In "<slimserver-install-dir>/MySQL/" there is a file called "my.tt" which contains exactly the lines that are written into the "slim-data/my.cnf" so this might be the template you have been looking for to start tuning/playing around with the settings to try to reduce the number of instances of mysqld. Unfortunately I am also no MySQL expert so I don't know how to start but if I find something I'll let you know. Of course, I'm also interested in anything you might find out!

Glad that it worked for you and it wasn't just fluke on my part. :)

Thanks for the tip on the mysqld symlink (and for the link to what seems to be the mysql template). I may well change my setup when 6.5.1 goes final (in the next few days maybe).

As for the mysql tweaking, I was thinking of using these values from my_small.cfg in the install of mysql (it says it's for use on "a system with little memory (<= 64M) where MySQL is only used from time to time and it's important that the mysqld daemon doesn't use much resources", which sounds like it may be good for a LinkStation):

key_buffer = 16K
max_allowed_packet = 1M
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K

This may have to wait for later in the week, but if you want to give it a shot in the meantime and report back, feel free.

madfuzzy
2006-10-16, 14:28
How do i know which is the correct location?

Copy all of the subfolders that you extract from the rpm into /usr on your LS.

Inside the /usr folder of the rpm file you should have the following subfolders (all of which contain files):

/bin
/include
/include/mysql
/lib
/lib/mysql

All of these need to be copied inside /usr on your main root partition for mysql to compile successfully.

stevos
2006-10-16, 23:40
is there a way to automate that process.

cp usr /usr doesn't appear to work neither does mv usr /usr

stevos
2006-10-17, 03:27
Which version of mysql did you use?

How do you setup a seperate account for slimserver?

Do you then need to log into that instead of root, if so how?

How do you use the 'chown -R slimserv' command to give access to certain folders?

I am sure i am not the only person that needs these steps to finish the process

srasher
2006-10-17, 03:32
Try

cp -r usr/* /usr/

srasher
2006-10-17, 03:36
The last post was of course related to your questions regarding the mysql-devel lib copying.

Regarding your latest questions:

1) MySQL 4.1.20, as noted in the LinkstationWiki article that was referenced several times regarding MySQL installation (I do not have the link at hand currently).

2) Just do it similar to the introduction of the mysql user as explained in the above mentioned article, e.g.



groupadd slimserv
useradd -g slimserv slimserv
passwd slimserv


The last command is used to set a password for the new user so that you can login with that account.

3) Go to the directory where your slimserver 6.5.0/1 installation resides and do



chown -R slimserv <slimserver-dir>
chgrp -R slimserv <slimserver-dir>


If you also have a separated data/cachedir, you should change the rights there also.

After that you can do a


su slimserv

to login with the new user account and after that start the slimserver with the same command as before as the new user.

Hope that helps.

Cheers,
Sebastian

johnme
2006-10-17, 07:45
I'm working on a Terastation 1st generation (ppc) which is for me very similar to the linkstation. I've followed the instructions to install the slimserver 6.5 but I'm stopped with the same error than MadFuzzy had some days ago which is:
ERROR: MySQLHelper: startServer() Couldn't find a executable for 'mysqld'! This is a fatal error. Exiting.
I've just installed the dev lib of mysql and there's no mysqld anywhere on my disk. I've dowloaded the binary executable for ppc on the debian site and put it in the bin folder of the slimserver folder, create the account to access it but nothing work ? Any ideas ? Do I have to install the all mysql package ?
help would very appreciated ? thanks

madfuzzy
2006-10-17, 08:15
Where exactly did you put the mysqld file? I think Slimserver needs to look for it inside a folder inside "slimserver/Bin" that's named after the architecture that it's running on (in your case it's probably "powerpc-something", because on MIPS based LinkStations it's called "mipsel-linux-gnu-thread-multi").

You can find out what the folder should be called by checking the name of the folder containing all of the CPAN modules that were created when you ran "build-perl-modules.pl". You should find it inside "slimserver/CPAN/arch/5.8.7".

gbruzzo
2006-10-20, 02:08
Hi all,

sorry to go one step back, but I am having issues installing MySql of all things (4.1.20) on my Linkstation II (Mipsel) with openlink.

I am following the instructions on
http://www.linkstationwiki.net/index.php?title=Apache_w/_PHP_and_MySQL_Support_%28MIPSel%29

when i run (after having created /mnt/hda/misc/opt/mysql as pointed out)

./configure --prefix=/mnt/hda/opt/mysql --with-readline

I get

configure: error: cannot guess build type; you must specify one

I have the latest versions of the config.guess and config.sub files and still my machine build is not being recognized.
Has anyone encountered this problem or have any suggestions?

I am a little fearful, that it might require me to reflash with openlink 0.52b. Funnily enough, on www.linkstationwiki.net there are two versions of 0.52b (current and obsolete, but same version munbers). One is 48.6 mb (the one I used to flash the linkstation), the other, apparently more recent is 47.5 mb.

Does anyone have any suggestions?

Thank you all in advance,

Giacomo

stevos
2006-10-20, 03:39
The guide states

"The next major stumbling block for me was linking in mysql where Slimserver could find it, which is where I cheated a bit. Inside the Slimserver "Bin" folder I created a folder called "mipsel-linux-gnu-thread-multi".

Inside that I put a copy of "mysqld" that I grabbed from the Debian "mysql-server-4.1_4.1.11a-4sarge7_mipsel.deb" mipsel package on the Debian website. I needed to extract the tgz archive containing mysql from its .deb package using "ar -x", then I could untar it.

Once untarred I did a cp of the "mysqld" file into the newly created "mipsel-linux-gnu-thread-multi" folder inside Slimserver's "Bin" folder."


I have downloaded the mipsel-linux-gnu-thread-multi file, but i don't understand find the mysqld file. Could someone explain this

I managed to open the deb file using 7-zip, but there appears to be loads of subdirectories, within which i can't find a file called 'mysqld'

stevos
2006-10-20, 11:08
Tried to compile the perl modules and get the following error

Downloading DBD-mysql-3.0002.tar.gz to: /mnt/hda/slimserver
Uncompressing..
Configuring..
PERL5LIB=/mnt/hda/slimserver/DBI-1.50/blib/lib:/mnt/hda/slimserver/DBI-1.50/blib
/arch /usr/bin/perl Makefile.PL
Building..
Warning: duplicate function definition 'do' detected in mysql.xs, line 224
Warning: duplicate function definition 'rows' detected in mysql.xs, line 559
/usr/bin/ld:/usr/lib/libmysqlclient.so: file format not recognized; treating as
linker script
/usr/bin/ld:/usr/lib/libmysqlclient.so:1: parse error
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/DBD/mysql/mysql.so] Error 1
Couldn't find a valid dynamic library for DBD-mysql-3.0002.tar.gz - something is
wrong. Exiting!



Any ideas?

out of interest when i enter access my linkstation i don't login, i just use what either the default is, and i used this to install mysql.

I then logged in as slimserv and attempted to build the modules.

What am i missing?

aubuti
2006-10-22, 05:48
Thanks for posting the error message, but sorry, that one's way too esoteric for me. Good luck.

heyho
2006-10-30, 05:33
Can one of you clever chaps either write a script to automate the 6.3.1 to 6.5 process as per the excellent 6.3.1 script that was submitted on this forum or submit a definitive set of steps to take please.

TiredLegs
2006-11-02, 12:52
Can one of you clever chaps either write a script to automate the 6.3.1 to 6.5 process as per the excellent 6.3.1 script that was submitted on this forum or submit a definitive set of steps to take please.
Step-by-step instructions would be awesome. As a Linux newbie, it was a bit of a struggle for me to get 6.3.1 installed. (And I couldn't have done it without the excellent FieldNetworks instructions.) Now that 6.3.1 is running, I'm reluctant to attempt to switch over to 6.5 without a clear understanding of the whole process.

stevos
2006-11-04, 04:16
Installing 6.3.1 is very easy on openlink, just install devtools, expat and run the build-perl-modules thing. I could easily write a indepth instructions for this (i have done it enough times) but someone needs to cover the gaps between that and 6.5

Splatter
2006-11-27, 12:34
Hi all!
I've had great help reading this forum when getting slimserver to work on my linkstation. I tought I'd gather the scattered instructions to one place. These should be easy to follow, if you have corrections to them, please post them and I'll fix it.

First of all. Do everything at your own risk. I take no responsibility if you brick your station. This worked for me but ymmv.

First of all flash the linkstation with the newest openlink firmware. Follow the instructions at
http://linkstationwiki.net/index.php?title=The_LinkStation_firmware_flasher

Ensure that you can log into the linkstation and that you have root access. Start the process by creating directories needed for the installation
mkdir /mnt/hda/misc
mkdir /mnt/hda/opt


After that you should install the development tools. They're needed for building all the stuff
cd /mnt/hda/misc
wget http://downloads.linkstationwiki.net/development_tools/mipsel-tools-2_1.tgz
mkdir devtools
cd devtools
tar -xzvf ../mipsel-tools-2_1.tgz
./install.sh

This section is for installing expat. It's needed by slimserver
cd /mnt/hda/misc
wget http://switch.dl.sourceforge.net/sourceforge/expat/expat-1.95.8.tar.gz
tar -xzvf /mnt/hda/misc/expat-1.95.8.tar.gz
cd expat-1.95.8
./configure --prefix=/usr
make install

After that configure and install mysql. These instructions differ a bit from the ones in the apache+mysql+php instructions.
This should compile a better optimized version of mysql. The following commands will get the mysql source and configure it so it's suitable for our system
cd /mnt/hda/misc
wget http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQL-4.1/mysql-4.1.20.tar.gz
tar -zxvf mysql-4.1.20.tar.gz
cd mysql-4.1.20
groupadd mysql
useradd -g mysql mysql
export CFLAGS=-O3
export CXXFLAGS=-O3
./configure --prefix=/mnt/hda/opt/mysql --with-readline --without-debug

The next step will compile mysql and install it. It takes a long time (around 5-6 hours on my box)
make
make install

The following commands will dowload a suitable version of development libraries for mysql. These are needed when building the slimserver perl modules
cd /mnt/hda/misc
wget http://momonga.nahi.to/pub/mips/mipsel/MySQL-devel-4.0.25-1m.mipsel.rpm
rpm2cpio MySQL-devel-4.0.25-1m.mipsel.rpm | cpio -di
cp -r usr/* /usr

Now you should get the slimserver package and run the following commands:
cd /mnt/hda/opt/

Please! This might have changed at the time of reading! Please check the correct vesion!
wget http://www.slimdevices.com/downloads/nightly/latest/6.5/SlimServer_6.5_v2006-11-21.tar.gz
tar -xvzf SlimServer_6.5_v2006-11-21.tar.gz
cd SlimServer_6.5_v2006-11-21


This will build the perl modules needed for slimserver
For some reason Bin/build-perl-modules.pl compained if I didn't do the following (you might have to run Bin/build-perl-modules.pl once before doing the following):
cp -r /mnt/hda/opt/SlimServer_6.5_v2006-11-21/Compress-Zlib-1.41/blib/lib/auto/ /mnt/hda/opt/SlimServer_6.5_v2006-11-21/CPAN
The following command will take about 20 minutes.
Bin/build-perl-modules.pl
just use the defaults for the questions

Now Slimserver needs to see mysql, so:
cd Bin
mkdir mipsel-linux-gnu-thread-multi
cd mipsel-linux-gnu-thread-multi
ln -s /mnt/hda/opt/mysql/libexec/mysqld mysqld

The following commands will add the slimserv user and make it the owner of the slimserv files
cd /mnt/hda/opt/
addgroup slimserv
adduser slimserv -g slimserv
passwd slimserv
(enter new desired password)
chown -R slimserv:slimserv SlimServer_6.5_v2006-11-21
mkdir slim-data
chown -R slimserv:slimserv slim-data

Now you should be ready to start slimserver
cd SlimServer_6.5_v2006-11-21
./slimserver.pl --daemon --prefsfile /mnt/hda/opt/slim-data/slimserver.pref --cachedir /mnt/hda/opt/slim-data --user slimserv

To make it start automatically do this
cd /etc/init.d/
echo "/mnt/hda/opt/SlimServer_6.5_v2006-11-21/slimserver.pl --daemon --prefsfile /mnt/hda/opt/slim-data/slimserver.pref --cachedir /mnt/hda/opt/slim-data --user slimserv" > slimserver
cd /etc/rc.d/rd2.d
ln -s /etc/init.d/slimserver S90slimserver

Done!
Slimserver is quite usable but not too smooth running on a linkstation. I'll see if it could be optimized when I have the time to look into it.

Cheers,
Kalle

aubuti
2006-11-27, 22:26
Well done! Is there a prize for best first post? I hope this helps out all the folks with MIPS-based LinkStations.

TiredLegs
2006-11-28, 05:17
Thank you Splatter! That's exactly the kind of detailed instructions that should help numerous users.

One question: Anyone know if the instructions need to be different for a LinkStation I (PPC)?

gbruzzo
2006-11-30, 05:49
Splatter,

well done!

Giacomo

stevos
2006-12-01, 12:15
Anyone feeling brave enough to take all that and make it into an install script?

TiredLegs
2006-12-01, 12:50
Does flashing a LinkStation with Openlink have any impact on the LinkStation's ability to connect an expansion drive to its USB port?

stevos
2006-12-02, 04:50
No all the linkstation features are retained, it just opens up the backdoor for reprogramming.

stevos
2006-12-02, 05:11
The link to the developement tools doesn't work you need to use

wget http://downloads.linkstationwiki.net/development_tools/mipsel-tools-2_1.tgz

stevos
2006-12-02, 05:24
ditto expat

wget http://prdownloads.sourceforge.net/expat/expat-1.95.8.tar.gz

stevos
2006-12-02, 05:30
ditto the first mysql download

wget http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQL-4.1/mysql-4.1.20.tar.gz

stevos
2006-12-02, 05:32
Damn just realised what has happened, the forum is cutting down the links.

The way to install them is type wget then right click on the link and click copy shortcut and then paste that after the wget command.

Not sure if this only effects IE or mozilla as well.

stevos
2006-12-02, 06:55
Oh and don't forget if you want to use a static ip address and retain internet connection type

echo 'nameserver 217.115.138.24' >> /etc/resolv.conf

bladerun
2006-12-02, 12:54
Ok

I have a Powerpc-hdhlan LinkStations I used the cgi method to get root access! using this method http://fieldnetworks.com/slim/linkstation.html

Now I want to install 6.5 instead of the 6.1 that was suppulied on the web site http://fieldnetworks.com/slim/linkstation.html


Does any one have a tar file with all the modules and plug-in complied and setup?

or do I have to install openlink? If I have to could you explain why?

stevos
2006-12-02, 16:16
Another problem found

when i type

addgroup slimserv or

adduser slimserv -g slimserv

i get addgroup or adduser command not found

Any ideas?

stevos
2006-12-02, 16:27
Solved it

should be groupadd and useradd

Anyother error

cd /etc/rc.d/rd2.d

should read

cd /etc/rc.d/rc2.d

stevos
2006-12-02, 16:53
Damn damn blast it still doesn't work

Okay when i type

./slimserver.pl --daemon --prefsfile /mnt/hda/opt/slim-data/slimserver.pref --cachedir /mnt/hda/opt/slim-data --user slimserv

followed by ps -A

slimserver.pl is running, which is one big step forward

However when i go into a internet browser and type

192.168.1.10:9000

i get no page found.

So close but so far.

Help before i lose my sanity.

stevos
2006-12-03, 04:31
Sorry for all the posts but i managed to get it working using

SlimServer_6.5_v2006-11-24.tar.gz

From the old nightlybuilds

http://www.slimdevices.com/downloads/nightly/SlimServer_v2006-11-25/

It might work with the latest version but i couldn't get it to do so.

wuya
2006-12-03, 22:06
I do not find "SlimServer_6.5_v2006-11-21"

but SlimServer_6.5_v2006-12-03.tar.gz not have Compress-Zlib-1.41

miked98
2006-12-03, 23:50
hi, thanks for the v. clear step-by-steps.

i also built Perl 5.8.8 from the tarball ( http://www.perl.com/CPAN/src/stable.tar.gz ). this does take a good deal of time (i left it running overnight), but the entire system seems a bit zippier as a result.

given the sluggishness of the LS, every little bit of performance uptick helps.

Splatter
2006-12-05, 02:19
Thanks for the feedback. I'll do some tweaking on the instructions to fix the bugs. But that'll have to wait a few days.


hi, thanks for the v. clear step-by-steps.

i also built Perl 5.8.8 from the tarball ( http://www.perl.com/CPAN/src/stable.tar.gz ). this does take a good deal of time (i left it running overnight), but the entire system seems a bit zippier as a result.

given the sluggishness of the LS, every little bit of performance uptick helps.

Great! Thanks! Just what I've been looking for. What optimization did you use when compiling Perl? -O2? -O3? I've also been thinking if it would be possible to compile the modules the build-perl-modules.pl with better optimization. I don't know it helps a lot though.

miked98
2006-12-07, 22:54
i compiled it with -O3 flags. it took a few hours to run, but i think if you look around the web, there are some additional optimizations you could include that i did not.

for those of us running freelink on linkstations, i believe there are several areas where slimserver could be improved to yield acceptable performance -- in particular with the speed of MySQL queries and HTML page-rendering.

one possible issue i see, based my naive knowledge of Slimserver but a slightly more informed knowledge of MySQL, is that many of the most frequently queried tables (for example the 'tracks' table) use 'text' and 'blob' data types to store song title information. more compact summary tables, containing only char fields, would be much faster to query, might speed up the response times (which even in my optimized set-up can take a few seconds per page rendering).

aubuti
2006-12-08, 07:32
for those of us running freelink on linkstations, i believe there are several areas where slimserver could be improved to yield acceptable performance -- in particular with the speed of MySQL queries and HTML page-rendering.
Count me in as interested in improving performance on a freelinked LS (PPC gigabit), especially on HTML page-rendering! Unfortunately, my knowledge of MySQL and slimserver's guts is so limited that I could only be a consumer of this information, not a producer.

stevos
2006-12-17, 05:45
My squeezebox works fairly well with my linkstation running v6.5 but my nokia770 is unuseable.

Is there anyway to locally cashe the nokia770 web pages. Basically the idea would be that the linkstation would not have to render the web page everytime i access it. After all the music/images on the linkstation doesn't change very often.

jpickup
2006-12-24, 08:39
I've just managed to get 6.5 running on a LSII but am also concerned about the memory being chewed up by all the mysqld instances. I'd expect slimserver only requires a one or two database connections so a couple of daemons should suffice...

Has anyone figured out the optimal mysql settings for running on the LSII?

aubuti
2006-12-24, 11:13
I've just managed to get 6.5 running on a LSII but am also concerned about the memory being chewed up by all the mysqld instances. I'd expect slimserver only requires a one or two database connections so a couple of daemons should suffice...

Has anyone figured out the optimal mysql settings for running on the LSII?
The multiple mysqld lines you see when you do "ps aux" or similar diagnostics are multiple threads from the same process. And the memory use is not the sum of all the memory shown. Rather, those threads are sharing that memory. This is normal, and actually a good thing. It's the threading that allows slimserver to scan the database while leaving memory free to stream, something pre-6.5 (based on sqlite) couldn't do.

One thing to check is to make sure that it's *only* slimserver that is loading mysql. For example, I installed MySQL on its own (on a FreeLink'd PPC LinkStation HG) before installing slimserver 6.5. The original MySQL installation would start itself at boot time (via /etc/init.d/mysql), and then slimserver starts its own instance. You don't want that, so be sure that the only MySQL you have running is the one that slimserver launches.

edugaev
2007-09-18, 12:33
First of all, thanks *a lot* to splatter a stevos for detailed instructions on setting up a slimserver 6.5 for openlink linkstation II. Everything worked as described for slimserver version 6.5.4

One thing to warn future generations is to use copy-paste of command shell lines rather than typing them in -- there are some 'O' that could be confused with '0'. Al least I did it.

One thing that bothers me is that I am using Transporter and its menu and IR somewhat lags: even volume control. Does it really contact slimserver even for volume setting?

However, flac files play gapless, so musicwise it is ok...

Another question if anyone had any luck configuring slimserver 7 on linkstation II?

colinm
2007-09-25, 12:01
edugaev, do you have a copy of those instructions please?

I'm still running SlimServer 6.3.1 on Openlink, but am tempted if there are performance improvements to go to 6.5.

Is the general opinion (since this thread started last year) that it's worth going to 6.5?

gbruzzo
2007-09-25, 16:24
Is the general opinion (since this thread started last year) that it's worth going to 6.5?

Honestly, probably not. The Linkstation II is a little too underpowered to run SS 6.5+. Go for one of the new NAS boxes (TS109/209 or New Synologies with 500 Mhz chip - at least - and 128 of ram). Then again it is only my 2 pence worth....

colinm
2007-09-26, 14:12
ok, thanks gbruzzo, that's good advice!
Cheers

gbruzzo
2007-09-27, 01:51
Read this as an example (replace TS101 with LSII)

http://forums.slimdevices.com/showthread.php?t=38626

cheers,

Giacomo