*New 12.1 series Release:
2020-04-05: XigmaNAS 12.1.0.4.7509 - released

*New 11.3 series Release:
2020-04-05: XigmaNAS 11.3.0.4.7509 - released!


We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

SlimNAS on NAS4Free

XigmaNAS Extensions / Add-ons

Moderator: crest

Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
MattBD
NewUser
NewUser
Posts: 10
Joined: 03 May 2014 20:50
Status: Offline

Re: SlimNAS on NAS4Free

#91

Post by MattBD »

Well, I have the server running and my music library mapped! You'd think that'd be it, but now it seems that the Squeezebox Radio cannot find the server. I can connect to mysqueezebox.com just fine, but the newly built LMS does not appear as an option. It tries to connect to my old server (called FreeNAS), but obviously can't find it and just gives up. I am wondering if this has something to do with the network settings. It'd be nice if I could just point the Squeezebox Radio to an IP address, but it does not seem like that is the case.

I can access the LMS web GUI from any computer on my network, so it seems that the Jail is properly configured. I can also ping the IP I assigned to the Jail.

cookiemonster
Advanced User
Advanced User
Posts: 221
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: SlimNAS on NAS4Free

#92

Post by cookiemonster »

You should be able to do what you need. I don't have a radio, just touch and duet. In the duet controller that I use for both, I just entered the ip address. Are you sure you can't ?
Main: Xigmanas 11.2.0.4 x64-full-RootOnZFS on Supermicro X8DT3. zroot on mirrorred pair of CRUCIAL_CT64M225. Memory: 72GB ECC; 2 Xeon E5645 CPUs; Storage: (HBA) - LSI SAS 9211-4i with 3 SATA x 1 Tb in raidZ1, 1 x 3 Tb SAS drive as single stripe.
Spare1: HP DL580 G5; 128 GB ECC RAM; 4 CPU; 8 x 500 GB disks on H210i
Spare2: HP DL360 G7; 6 GB ECC RAM; 1 Xeon CPU; 5 x 500 GB disks on H210i
Spare3: HP DL380 G7; 24 GB ECC RAM; 2 Xeon E5645 CPUs; 8 x 500 GB disks on IBM M1015 flashed to LSI9211-IT

MattBD
NewUser
NewUser
Posts: 10
Joined: 03 May 2014 20:50
Status: Offline

Re: SlimNAS on NAS4Free

#93

Post by MattBD »

Got it! The IP address entry was a little more buried than I'd remembered and I also wasn't sure how to enter single digit address blocks (but it turns out .001. = .1.). Everything works! Thanks to all those who helped.

To summarize, my solution was to build from source. For whatever reason, the installer that fsbruva wrote did not work for me. I will be backing up this Jail for sure!

Timpanogos_Slim
NewUser
NewUser
Posts: 2
Joined: 18 Aug 2014 18:33
Status: Offline

Re: SlimNAS on NAS4Free

#94

Post by Timpanogos_Slim »

Wanted to say, I'm a new user of NAS4Free and being able to run LMS inside it was one of the major factors that caused me to choose it.

On my first pass, I had the same issue as MattBD. I had created the jail as a "slim" jail and had not checked the boxes for devfs or procfs. And i had run the commands from outside of the jail rather than from inside of the jail.

After fiddling with that for a few minutes i just nuked that jail and started over. Made a full jail, checked the devfs and procfs boxes, and ran all commands within the jail itself. Slam-dunk. works fine.

32-bit, fwiw. haven't attached a squeezebox device yet though.

(Edit: SqueezePlay and SoftSqueeze are working fine. I'll mess with the radio or classic later, after I've migrated more of my music)

Stuarty
Starter
Starter
Posts: 35
Joined: 21 Jun 2013 17:40
Status: Offline

Re: SlimNAS on NAS4Free

#95

Post by Stuarty »

I’ve upgraded to NAS4FREE-amd64 9.2.0.1.972 and upgraded my zfs pools to v5000. I have a working install of theBrig version 0.8. I can create jails that work. I cannot install LMS. I've followed the instructions carefully and the install fails to start squeezebox server. How can I find out what the problem is?

I had a working 9.1 with the Brig and LMS but didn't think through upgrading the host system. Now that I've upgraded my ZFS pools I can't go back to 9.1. Any help appreciated.

cookiemonster
Advanced User
Advanced User
Posts: 221
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: SlimNAS on NAS4Free

#96

Post by cookiemonster »

Stuarty wrote:I’ve upgraded to NAS4FREE-amd64 9.2.0.1.972 and upgraded my zfs pools to v5000. I have a working install of theBrig version 0.8. I can create jails that work. I cannot install LMS. I've followed the instructions carefully and the install fails to start squeezebox server. How can I find out what the problem is?

I had a working 9.1 with the Brig and LMS but didn't think through upgrading the host system. Now that I've upgraded my ZFS pools I can't go back to 9.1. Any help appreciated.
did you get it working? I have a working installation on the same version 9.2.0.1 - Shigawire (revision 972), I could try to help.
Main: Xigmanas 11.2.0.4 x64-full-RootOnZFS on Supermicro X8DT3. zroot on mirrorred pair of CRUCIAL_CT64M225. Memory: 72GB ECC; 2 Xeon E5645 CPUs; Storage: (HBA) - LSI SAS 9211-4i with 3 SATA x 1 Tb in raidZ1, 1 x 3 Tb SAS drive as single stripe.
Spare1: HP DL580 G5; 128 GB ECC RAM; 4 CPU; 8 x 500 GB disks on H210i
Spare2: HP DL360 G7; 6 GB ECC RAM; 1 Xeon CPU; 5 x 500 GB disks on H210i
Spare3: HP DL380 G7; 24 GB ECC RAM; 2 Xeon E5645 CPUs; 8 x 500 GB disks on IBM M1015 flashed to LSI9211-IT

Stuarty
Starter
Starter
Posts: 35
Joined: 21 Jun 2013 17:40
Status: Offline

Re: SlimNAS on NAS4Free

#97

Post by Stuarty »

Thanks for the offer. After lots of trial and error I did get it to work.

I followed a freenas guide at http://forums.freenas.org/index.php?thr ... tch.22359/. Now I have LMS 7.9 on nas4free 9.2 with perl 5.16 and a working scanner and log.

Stuarty
Starter
Starter
Posts: 35
Joined: 21 Jun 2013 17:40
Status: Offline

Re: SlimNAS on NAS4Free

#98

Post by Stuarty »

Here's how I got LMS 7.9 working this month. I'm no expert but I did do this about five times before I got it to work reliably. Most of this is adapted from a recent freenas guide.

Create a full jail and start it. I used TheBrig.

As root on your nas4free install create a mount point for media in the jail. Stop the jail and in the settings for the jail add an fstab entry for the mount point then restart the jail. My fstab entry is

Code: Select all

/tank/media/music /tank2/jails/lms/var/music rw 0 0
Now become root in the jail and set up the environment.

Code: Select all

mkdir -p /usr/local/etc/pkg/repos
ee /usr/local/etc/pkg/repos/FreeBSD.conf
Add the following to FreeBSD.conf:

Code: Select all

FreeBSD: {
	     url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
	     mirror_type: "srv",
	     signature_type: "none",
	     fingerprints: "/usr/share/keys/pkg",
	     enabled: yes
	   }
Then finish setting up 'pkg: Type

Code: Select all

pkg
and answer 'yes' to set up, then

Code: Select all

rm /usr/local/etc/pkg.conf
pkg update -f && pkg upgrade
Install the necessary packages:

Code: Select all

pkg install -y bash git gmake nasm rsync nano p5-DBI p5-EV p5-XML-Parser p5-HTML-Parser p5-JSON-XS p5-Digest-SHA1 p5-YAML-LibYAML p5-Sub-Name p5-Audio-Scan p5-Image-Scale p5-DBD-SQLite p5-Class-XSAccessor p5-Template-Toolkit p5-IO-Interface sox mac faad2
rehash
Make a home for LMS. I'm going to give the paths on my system but of course you might choose different paths.

Code: Select all

mkdir /usr/local/lms
cd /usr/local/lms
Get the latest LMS from github, it should be 'slimserver-vendor'. I got 7.9.
Git was unbearably slow for me so I fetched a .zip.

Code: Select all

fetch https://github.com/Logitech/slimserver-vendor/archive/public/7.9.zip
unzip 7.9.zip
cd slimserver-vendor-public-7.9/CPAN
cp buildme.sh buildme.sh.original
nano buildme.sh
I searched for '/usr/bin/rsync' and replaced it with '/usr/local/bin/rsync' at lines 49 and 50.

I searched for 'amd64-freebsd' and replaced it with 'amd64-freebsd-thread-multi' at line 1103.

At lines 306-10 we find

Code: Select all

if [ $RUN_TESTS -eq 1 ]; then
            make test
        else
            make
        fi

replace it with

Code: Select all

if [ $RUN_TESTS -eq 1 ]; then
        if [ $1 = "Font-FreeType-0.03" ]; then
            echo "Skipping tests for Font-FreeType-0.03"
        else
            make test
        fi
    else
        make
    fi
I searched for all instances of

Code: Select all

RUN_TESTS=1
in the script and changed them to

Code: Select all

RUN_TESTS=0
.

I saved the changed buildme.sh, then tar up the edited slim server-vendor so that I can start again if I need to.

Code: Select all

cd /usr/local/lms
tar cf slimserver-vendor-public-7.9.edited.tar slimserver-vendor-public-7.9/
cd /slimserver-vendor-public-7.9/CPAN
./buildme.sh | tee /usr/local/lms/buildme.sh.log
After it finishes building tar up the important files for perl 5.16

Code: Select all

cd slimserver-vendor-public-7.9/CPAN/build
tar cf /usr/local/lms/arch.tar arch/
cd /usr/local/lms/slimserver-vendor-public-7.9/CPAN/build/5.16/lib/perl5/amd64-freebsd-thread-multi/Class
tar cf /usr/local/lms/xsaccessor118.tar *
Now get a no CPAN slim server and add in our newly built files.

Code: Select all

cd /usr/local/lms
fetch http://downloads.slimdevices.com/nightly/7.9/sc/7805590/logitechmediaserver-7.9.0-1410276236-noCPAN.tgz
tar xzf logitechmediaserver-7.9.0-1410276236-noCPAN.tgz
mv logitechmediaserver-7.9.0-1410276236-noCPAN/* .
tar xf arch.tar -C /usr/local/lms/CPAN/
mv /usr/local/CPAN/Class/XSAccessor /usr/local/lms/CPAN/Class/_XSAccessor
mv /usr/local/lms/CPAN/Class/XSAccessor.pm /usr/local/lms/CPAN/Class/_XSAccessor.pm
tar xf xsaccessor118.tar -C /usr/local/lms/CPAN/Class/
rm xsaccessor118.tar arch.tar logitechmediaserver-7.9.0-1410276236-noCPAN.tgz
chown -R lms:lms /usr/local/lms
Now to create a start up script

Code: Select all

nano /usr/local/etc/rc.d/lms
I used the script from the freenas guide:

Code: Select all

#!/bin/sh
#
# This script is a slightly modified version with hardcoded values of:
# $FreeBSD: branches/RELENG_9_2_0/audio/squeezeboxserver/files/squeezeboxserver.in 302141 2012-08-05 23:19:36Z dougb $
#
 
# PROVIDE: lms
# REQUIRE: LOGIN
# KEYWORD: shutdown
 
#
# Add the following lines to /etc/rc.conf to enable lms:
#
#lms_enable="YES"
#
 
. /etc/rc.subr
 
name=lms
start_precmd="lms_start_precmd"
stop_postcmd="lms_stop_postcmd"
rcvar=lms_enable
 
command=/usr/local/lms/slimserver.pl
command_interpreter=/usr/bin/perl
pidfile=/var/run/${name}/${name}.pid
logdir=/var/log/${name}
statedir=/var/db/${name}
cachedir=${statedir}/cache
prefsdir=${statedir}/prefs
playlistdir=${statedir}/playlists
charset=UTF-8
u=lms
g=lms
command_args="--daemon --pidfile=${pidfile} --logdir=${logdir} --cachedir=${cachedir} --prefsdir=${prefsdir} --charset=${charset}"
lms_user=${u}
lms_group=${g}
 
lms_start_precmd()
{
    # This is stuff is here and not in pkg-install because
    # /var/run may be destroyed at any time and we've had issues
    # with permissions on the various directories under /var getting
    # screwed up in the past.
 
    mkdir -p /var/run/${name}
    chown -RH ${u}:${g} /var/run/${name}
 
    mkdir -p ${logdir}
    chown -RH ${u}:${g} ${logdir}
 
    mkdir -p ${statedir}
    mkdir -p ${cachedir}
    mkdir -p ${prefsdir}
    mkdir -p ${playlistdir}
    chown -RH ${u}:${g} ${statedir}
    export LC_CTYPE=en_US.UTF-8
}
 
lms_stop_postcmd()
{
    pids=`pgrep -u $u`
    if [ -n "${pids}" ]; then
        sleep 1
        kill $pids > /dev/null 2>&1
    fi
    pids=`pgrep -u $u`
    if [ -n "${pids}" ]; then
        wait_for_pids $pids
    fi
}
 
load_rc_config ${name}
 
lms_enable=${lms_enable:-"NO"}
lms_flags=${lms_flags:-""}
 
run_rc_command "$1"
Don't forget rc.conf.

Code: Select all

echo 'lms_enable="YES"' >> /etc/rc.conf
chmod +x /usr/local/etc/rc.d/lms
and an LMS user

Code: Select all

pw groupadd lms
pw useradd lms -g lms -h - -s /bin/sh -c "Logitech Media Server" -d /usr/local/lms
Then, all being well

Code: Select all

service lms onestart
For me this gives a fast working LMS 7.9 with a scanner.log and almost all music formats play. I also added ffmpeg in my jail but I am not sure that it actually does much.
Last edited by Stuarty on 08 Jan 2015 20:37, edited 1 time in total.

cookiemonster
Advanced User
Advanced User
Posts: 221
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: SlimNAS on NAS4Free

#99

Post by cookiemonster »

That's useful Stuarty, thanks for sharing.
Main: Xigmanas 11.2.0.4 x64-full-RootOnZFS on Supermicro X8DT3. zroot on mirrorred pair of CRUCIAL_CT64M225. Memory: 72GB ECC; 2 Xeon E5645 CPUs; Storage: (HBA) - LSI SAS 9211-4i with 3 SATA x 1 Tb in raidZ1, 1 x 3 Tb SAS drive as single stripe.
Spare1: HP DL580 G5; 128 GB ECC RAM; 4 CPU; 8 x 500 GB disks on H210i
Spare2: HP DL360 G7; 6 GB ECC RAM; 1 Xeon CPU; 5 x 500 GB disks on H210i
Spare3: HP DL380 G7; 24 GB ECC RAM; 2 Xeon E5645 CPUs; 8 x 500 GB disks on IBM M1015 flashed to LSI9211-IT

zwitterion
NewUser
NewUser
Posts: 1
Joined: 12 Jul 2013 21:58
Status: Offline

Re: SlimNAS on NAS4Free

#100

Post by zwitterion »

hi there
sounds to have some case mis spelling &/or script modifications in the tuto posted just up front.
In my case:
1)

Code: Select all

fetch https://github.com/Logitech/slimserver-vendor/archive/public/7.9.zip
unzip 7.9.zip
cd slimserver-vendor-public-7.9/CPAN
cp buildme.sh build me.sh.original
nano build me.sh
should be:

Code: Select all

fetch https://github.com/Logitech/slimserver-vendor/archive/public/7.9.zip
unzip 7.9.zip
cd slimserver-vendor-public-7.9/CPAN
cp buildme.sh buildme.sh.original
nano buildme.sh
space between build me.sh not needed

2) buildme.sh script modifications seems outdated as the searched strings are not anymore present or changed
--> when running the modified script to build up everything, following error occurs

Code: Select all

root@LMS:/usr/local/lms/slimserver-vendor-public-7.9/CPAN # nano /usr/local/lms/buildme.sh.log
  GNU nano 2.2.6           File: /usr/local/lms/buildme.sh.log

RUN_TESTS:0 CLEAN:1 USE_HINTS:1 target all
Building for FreeBSD / amd64-freebsd-thread-multi
libz not found - please install it
any help appreciated

brb
NewUser
NewUser
Posts: 2
Joined: 17 Dec 2014 17:04
Status: Offline

Re: SlimNAS on NAS4Free

#101

Post by brb »

Hello all together i'm trying to install the LMS 7.9 in a jail 9.3-RELEASE.

I'm using vender version 7.9 downloaded whith git.

buildme.sh ends here:
D_RUN_PATH="/usr/lib:/usr/local/lib" cc -shared -L/wrkdirs/usr/ports/lang/perl5.18/work/perl-5.18.4 -L/usr/local/lib/perl5/5.18/mach/CORE -Wl,-rpath=/usr/local/lib/perl5/5.18/mach/CORE -lperl -L/usr/local/lib -fstack-protector Scan.o -o blib/arch/auto/Media/Scan/Scan.so /LMS/slimserver-vendor/CPAN/build/include/../lib/libmediascan.a /LMS/slimserver-vendor/CPAN/build/include/../lib/libavformat.a /LMS/slimserver-vendor/CPAN/build/include/../lib/libavcodec.a /LMS/slimserver-vendor/CPAN/build/include/../lib/libswscale.a /LMS/slimserver-vendor/CPAN/build/include/../lib/libavutil.a /LMS/slimserver-vendor/CPAN/build/include/../lib/libexif.a /LMS/slimserver-vendor/CPAN/build/include/../lib/libjpeg.a /LMS/slimserver-vendor/CPAN/build/include/../lib/libpng.a /LMS/slimserver-vendor/CPAN/build/include/../lib/libgif.a /LMS/slimserver-vendor/CPAN/build/include/../lib/libdb.a -lm -lz -lintl
/usr/bin/ld: /LMS/slimserver-vendor/CPAN/build/include/../lib/libavcodec.a(deinterlace.o): relocation R_X86_64_PC32 against `ff_pw_4' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
*** [blib/arch/auto/Media/Scan/Scan.so] Error code 1

Stop in /LMS/slimserver-vendor/CPAN/libmediascan-0.1/bindings/perl.
+ '[' 1 '!=' 0 ']'
+ echo 'make failed, aborting'
make failed, aborting
+ exit 0[/list]


Now i don't know what to do ... :(

Please help me ...

thank you

source
NewUser
NewUser
Posts: 1
Joined: 14 Jan 2015 17:00
Status: Offline

Re: SlimNAS on NAS4Free

#102

Post by source »

Hi there,
Anybody know how to fix LMS in Jail that it can be used by Squeezebox Controller App on iPad? LMS work fine with iPeng and thought web interface, but Squeezebox Controller don't find any server.

thanks in advance...

Stuarty
Starter
Starter
Posts: 35
Joined: 21 Jun 2013 17:40
Status: Offline

Re: SlimNAS on NAS4Free

#103

Post by Stuarty »

The buildme.sh has been updated since I last tried to install LMS but with some small changes my previous steps worked for me again today.

I have nas4free 9.2.0.1, perl 5.16.3 with TheBrig. I don't know what will happen with 9.3 and perl 5.18.

I create, start and stop a jail with TheBrig; this gets me the jail folder created by TheBrig. As root on nas4free I make a mount point in the jail for my media library. In TheBrig settings for the jail I add an fstab entry for the media library, then start the jail.

As root in the jail I set up the environment as described in my earlier post. Now we need a further package due to changes to the buildme.sh; we need graphics/p5-GD.

Code: Select all

pkg install -y bash git gmake nasm rsync nano p5-DBI p5-EV p5-XML-Parser p5-HTML-Parser p5-JSON-XS p5-Digest-SHA1 p5-YAML-LibYAML p5-Sub-Name p5-Audio-Scan p5-Image-Scale p5-DBD-SQLite p5-Class-XSAccessor p5-Template-Toolkit p5-IO-Interface sox mac faad2 graphics/p5-GD
rehash

Code: Select all

mkdir /usr/local/lms
cd /usr/local/lms
fetch https://github.com/Logitech/slimserver-vendor/archive/public/7.9.zip
unzip 7.9.zip
cd slimserver-vendor-public-7.9/CPAN
cp buildme.sh buildme.sh.original
nano buildme.sh
I changed only one thing in the new buildme.sh, I changed RUN_TESTS=1 to RUN_TESTS=0.

Code: Select all

./buildme.sh | tee /usr/local/lms/buildme.sh.log
Build finished.

Code: Select all

cd /usr/local/lms/slimserver-vendor-public-7.9/CPAN/build
tar cf /usr/local/lms/arch.tar arch/
cd /usr/local/lms/slimserver-vendor-public-7.9/CPAN/build/5.16/lib/perl5/amd64-ulti/Class
tar cf /usr/local/lms/xsaccessor118.tar *
cd /usr/local/lms
fetch http://downloads.slimdevices.com/nightly/7.9/sc/e0f0915/logitechmediaserver-7.9.0-1421702201-noCPAN.tgz
tar xzf logitechmediaserver-7.9.0-1421702201-noCPAN.tgz
mv logitechmediaserver-7.9.0-1421702201-noCPAN/* .
tar xf arch.tar -C /usr/local/lms/CPAN/
mv /usr/local/lms/CPAN/Class/XSAccessor /usr/local/lms/CPAN/Class/_XSAccessor
mv /usr/local/lms/CPAN/Class/XSAccessor.pm /usr/local/lms/CPAN/Class/_XSAccessor.pm
tar xf xsaccessor118.tar -C /usr/local/lms/CPAN/Class/
rm xsaccessor118.tar arch.tar logitechmediaserver-7.9.0-1410276236-noCPAN.tgz

pw groupadd lms
pw useradd lms -g lms -h - -s /bin/sh -c "Logitech Media Server" -d /usr/local/lms
chown -R lms:lms /usr/local/lms
nano /usr/local/etc/rc.d/lms
Watch out for introducing white space in the long line when copying and pasting the rc.d script. I used the rc.d script from my previous post and added the user and group as previously. Then…

Code: Select all

echo 'lms_enable="YES"' >> /etc/rc.conf
chmod +x /usr/local/etc/rc.d/lms
service lms onestart
Your mileage may vary. As this was a test I didn't scan a big library.

cookiemonster
Advanced User
Advanced User
Posts: 221
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: SlimNAS on NAS4Free

#104

Post by cookiemonster »

source wrote:Hi there,
Anybody know how to fix LMS in Jail that it can be used by Squeezebox Controller App on iPad? LMS work fine with iPeng and thought web interface, but Squeezebox Controller don't find any server.
thanks in advance...
I've been having the same problem, but I think in my case, I figure it is because a combination of:
1. The freebsd jail system requires to set a static ip address but presents the host's MAC address.
2. My router assigns a dhcp address reservation to a host by its MAC address, so the freenas server MAC address gets its MAC associated to an ip address in the router.
3. Due to the MAC already "taken" according to the router, I can't get the jail associated to an ip address in the router. It's a limitation of the router, I had another that picked up the multiple ip addresses from their broadcast.

So far I think I know what happens in my network. So I then my guess is that the controller app and also squeezer (another app I tried on android) query the lms server ip address with the router, which has no knowledge of it. It also explains why going directly to the jail_ip:port of lms works - this is the web interface.
I want to find a solution too, because at some point my squeezebox controller will have to fail.
Main: Xigmanas 11.2.0.4 x64-full-RootOnZFS on Supermicro X8DT3. zroot on mirrorred pair of CRUCIAL_CT64M225. Memory: 72GB ECC; 2 Xeon E5645 CPUs; Storage: (HBA) - LSI SAS 9211-4i with 3 SATA x 1 Tb in raidZ1, 1 x 3 Tb SAS drive as single stripe.
Spare1: HP DL580 G5; 128 GB ECC RAM; 4 CPU; 8 x 500 GB disks on H210i
Spare2: HP DL360 G7; 6 GB ECC RAM; 1 Xeon CPU; 5 x 500 GB disks on H210i
Spare3: HP DL380 G7; 24 GB ECC RAM; 2 Xeon E5645 CPUs; 8 x 500 GB disks on IBM M1015 flashed to LSI9211-IT

cookiemonster
Advanced User
Advanced User
Posts: 221
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: SlimNAS on NAS4Free

#105

Post by cookiemonster »

I forgot to add, what I've tried looking into is getting the jail to fake a mac address, but my search has led to brick walls on that solution.
That leaves me with trying different routers, but I got a problem that the one I have is needed for its config to get iptv, something I'm paying for.
So far I'm stumped.
Main: Xigmanas 11.2.0.4 x64-full-RootOnZFS on Supermicro X8DT3. zroot on mirrorred pair of CRUCIAL_CT64M225. Memory: 72GB ECC; 2 Xeon E5645 CPUs; Storage: (HBA) - LSI SAS 9211-4i with 3 SATA x 1 Tb in raidZ1, 1 x 3 Tb SAS drive as single stripe.
Spare1: HP DL580 G5; 128 GB ECC RAM; 4 CPU; 8 x 500 GB disks on H210i
Spare2: HP DL360 G7; 6 GB ECC RAM; 1 Xeon CPU; 5 x 500 GB disks on H210i
Spare3: HP DL380 G7; 24 GB ECC RAM; 2 Xeon E5645 CPUs; 8 x 500 GB disks on IBM M1015 flashed to LSI9211-IT

RSS
Starter
Starter
Posts: 26
Joined: 06 Feb 2013 12:22
Status: Offline

Re: SlimNAS on NAS4Free

#106

Post by RSS »

I'm a current FreeNAS 7 user with a system that has run without major incident for a few years now but due to something in the setup I found myself looking at having to reformat the disk and install again. I'm only formatting as I don't know what caused the software to screw up but the NAS works fine with a new USB boot image. Also I want to take advantage of a format and test to ensure the disk is OK.

I was looking at biting the bullet and updating to NAS4Free but a little dismayed to see that the installation process with jail systems is the way to go now. I say dismayed because the FreeNAS route was a fairly simple process using the script.

Could someone just explain the reason or preference to use the jail approach, I'm at this point where I'm thinking do I simply setup the FreeNAS system again or the NAS4Free route.

For reference I use the NAS as a file share and backup device (NAS is also backed up) and on top of this it runs the Logitech app and the transmission app for torrents. I've seen the transfer rate from the NAS to the PC struggle to get over 10MB/s (I have 100MB cable connection) and so the ZFS option for the drive was also a consideration, but I'm running an old ASRock K8NF4G-SATA2 Socket 754 with 1Gb of RAM, the whole point of this was to utilise old H/W originally

Am I looking at a whole world of pain to go NAS4Free......? :shock:
11.0.0.4 - Sayyadina
x64-embedded on Pentium(R) Dual-Core CPU E5200 @ 2.50GHz
MSI 7529 v1.1(G31M3 V2) motherboard
2GB DDR2 memory
4TB SATA drive WD Red
Sonos & Google Play

Stuarty
Starter
Starter
Posts: 35
Joined: 21 Jun 2013 17:40
Status: Offline

Re: SlimNAS on NAS4Free

#107

Post by Stuarty »

I have a working LMS 7.9 on nas4free 10.1.0.2 - Prescience (revision 1454) with beta version of The Brig.

Code: Select all

root@lms:/ # uname -a
FreeBSD lms.local 10.1-RELEASE-p9 FreeBSD 10.1-RELEASE-p9 #0 r282117M: Tue Apr 28 03:42:54 CEST 2015     root@dev.nas4free.org:/usr/obj/nas4free/usr/src/sys/NAS4FREE-amd64  amd64
Basically I combined commands from my previous posts in this thread with two new posts on the Freenas forum:

https://forums.freenas.org/index.php?th ... tch.27161/

The rc.d script is from a different thread:

https://forums.freenas.org/index.php?th ... ost-186927

Here's the quick and dirty version.

Create the jail with The Brig. Become root in the jail and set up the environment:

Code: Select all

portsnap fetch extract
mkdir -p /usr/local/etc/pkg/repos
ee /usr/local/etc/pkg/repos/FreeBSD.conf
Add the following to FreeBSD.conf

Code: Select all

FreeBSD: {
	     url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
	     mirror_type: "srv",
	     signature_type: "none",
	     fingerprints: "/usr/share/keys/pkg",
	     enabled: yes
	   }
Install packages (not all maybe necessary):

Code: Select all

pkg
rm /usr/local/etc/pkg.conf
pkg update -f && pkg upgrade
pkg install -y bash git gmake nasm rsync nano p5-DBI p5-EV p5-XML-Parser p5-HTML-Parser p5-JSON-XS p5-Digest-SHA1 p5-YAML-LibYAML p5-Sub-Name p5-Audio-Scan p5-Image-Scale p5-DBD-SQLite p5-Class-XSAccessor p5-Template-Toolkit p5-IO-Interface sox mac faad2 libgd p5-Cpanel-JSON-XS p5-DBI screen gcc49
rehash
Get the most recent version of 7.9.

Code: Select all

mkdir /usr/local/lms
cd /usr/local/lms
fetch https://github.com/Logitech/slimserver-vendor/archive/public/7.9.zip
unzip 7.9.zip
cd slimserver-vendor-public-7.9/CPAN
cp buildme.sh buildme.sh.original
nano buildme.sh
Change all instances of 'RUN_TESTS=1' to 'RUN_TESTS=0' in 'buildme.sh'. Then, while in ''/usr/local/lms/slimserver-vendor-public-7.9/CPAN" try './buildme.sh | tee /usr/local/lms/buildme.sh.log'. It should fail saying that there's no gcc.

Do the following

Code: Select all

ln -s /usr/local/bin/gcc49 /usr/bin/gcc
ln -s g++49 g++
And try to build again with "./buildme.sh | tee /usr/local/lms/buildme.sh.log". After lots of building, voila…

Code: Select all

cd /usr/local/lms
Now, download another version of LMS, the "Logitech Media Server: Unix Tarball (for Perl 5.8-5.18, i386, x86_64, i386 FreeBSD, ARM EABI, PowerPC) from http://downloads.slimdevices.com/nightl ... hp?ver=7.9. For me it was 'logitechmediaserver-7.9.0-1431440256.tgz'

Code: Select all

fetch http://downloads.slimdevices.com/nightly/7.9/sc/50ba429/logitechmediaserver-7.9.0-1431440256.tgz
tar xf logitechmediaserver-7.9.0-1431440256.tgz
cd logitechmediaserver-7.9.0-1431440256/CPAN/arch/5.18
cp -Rp /usr/local/lms/slimserver-vendor-public-7.9/CPAN/build/arch/5.18/amd64-freebsd-thread-multi .
rm -rf i386-linux-thread-multi
rm -rf i386-linux-thread-multi-64int
rm -rf x86_64-linux-thread-multi
cd cp -Rp /usr/local/lms/slimserver-vendor-public-7.9/CPAN/build/arch/
rm -rf 5.10
rm -rf 5.12
rm -rf 5.14
rm -rf 5.16
rm -rf 5.20
rm -rf 5.8
cd /usr/local/lms
mv /usr/local/lms/logitechmediaserver-7.9.0-1431440256/* /usr/local/lms
ls -al
rmdir logitechmediaserver-7.9.0-1431440256


Set up user and group.

Code: Select all

pw groupadd -n lms -g 30001
pw useradd -n lms -u 30001 -g lms -s /usr/sbin/nologin -c "Logitech Media Server" -d /nonexistent
chown -R lms:lms /usr/local/lms
Add the rc.d script from the post at https://forums.freenas.org/index.php?th ... ost-186927

Code: Select all

chown root:wheel /usr/local/etc/rc.d/lms
chmod 555 /usr/local/etc/rc.d/lms
echo 'lms_enable="YES"' >> /etc/rc.conf
service lms onestart
Finally need to ensure that media files are shared in the jail and then configure LMS thought the Web GUI. Works for me.
Last edited by Stuarty on 18 Aug 2015 23:42, edited 1 time in total.

pup26
Starter
Starter
Posts: 16
Joined: 10 Feb 2013 21:03
Status: Offline

Re: SlimNAS on NAS4Free

#108

Post by pup26 »

HI All
I am having problems installing LMS, I have a working Jail but the script fails to fetch the required files:

jexec 2 /bin/sh /tmp/install.sh
Fetching the LMS tarball

logitechmediaserver-7.8.0-1349191090-perl-5.14100% of 24 MB 1819 kBps 00m14s
Fetching the other files for install

squeezeboxserver.tpl 100% of 1682 B 12 MBps 00m00s
Starting to install dependent packages

package gettext
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports ... ettext.tbz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports ... ettext.tbz' by URL
sox transcoder
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports ... st/sox.tbz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports ... st/sox.tbz' by URL
faad transcoder
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports ... /faad2.tbz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports ... /faad2.tbz' by URL
flac transcoder
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports ... t/flac.tbz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports ... t/flac.tbz' by URL
mac transcoder
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports ... st/mac.tbz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports ... st/mac.tbz' by URL
mpc transcoder
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports ... st/mpc.tbz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports ... st/mpc.tbz' by URL
wavpack transcoder
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports ... avpack.tbz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports ... avpack.tbz' by URL
Starting to install perl. You can safely disregard symlink warnings

Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports ... t/perl.tbz: File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports ... t/perl.tbz' by URL
/tmp/install.sh: perl: not found
This looks like FreeBSD-9.3 i386 perl-.

Group "slimserv" added.
User "slimserv" added.
/usr/local/squeezeboxserver doesn't exist, we'll do a new installation.
Creating directories...
Installing rc script...
/tmp/install.sh: cannot create /usr/local/etc/rc.d/squeezeboxserver: No such file or directory
chown: /usr/local/etc/rc.d/squeezeboxserver: No such file or directory
chmod: /usr/local/etc/rc.d/squeezeboxserver: No such file or directory
Installing tarfile...
/tmp/Transcode.tbz 100% of 1042 kB 1133 kBps 00m01s

Cleaning up..
/tmp/install.sh: /usr/local/etc/rc.d/squeezeboxserver: not found
Access the jail's ip at port 9000 to begin administering



thanks for the help
-roy

pup26
Starter
Starter
Posts: 16
Joined: 10 Feb 2013 21:03
Status: Offline

Re: SlimNAS on NAS4Free

#109

Post by pup26 »

looking at the FTP it really does not contain the required directory packages-9-stable, it only has : packages-8.4-release/ so I don't really see how I can install LMS using the script.
Is there somewhere else hosting the files and I can modify the script?
Thanks

pup26
Starter
Starter
Posts: 16
Joined: 10 Feb 2013 21:03
Status: Offline

Re: SlimNAS on NAS4Free

#110

Post by pup26 »

Hi
I found the location of the file for 9.0/9.1/9.2:
http://ftp-archive.freebsd.org/pub/Free ... se/Latest/
its worth modifying the scripts. (I will try to find out myself once I will have some time)
thanks

Yuyito
NewUser
NewUser
Posts: 1
Joined: 13 Jul 2015 05:14
Status: Offline

Re: SlimNAS on NAS4Free

#111

Post by Yuyito »

FreeeBSD does not include GCC compiler any more.

After fiddling with jails and pkgfor days, I finally managed to install GCC, YASM, and GMAKE, all required by the build.sh . GCC library requires 70+MB and that eats up the jail 'local' partition space.

However, when I compile I get this error...
export CPP= CC=gcc CXX=g++ CPPFLAGS= CFLAGS=-fPIC -DU_USING_ICU_NAMESPACE=0 -O3 CXXFLAGS=-fPIC -DU_USING_ICU_NAMESPACE=0 -O3 LDFLAGS=-fPIC MAKE=/usr/local/bin/gmakeRunning ./configure --prefix=/mnt/usb16/jl/lms/slimserver-vendor-public-7.9/CPAN/build --enable-static --with-data-packaging=archive for BSD using the GNU C++ compiler
checking for ICU version numbers... release 4.6, library 46.0, unicode version 6.0
checking build system type... x86_64-unknown-freebsd9.3
checking host system type... x86_64-unknown-freebsd9.3
checking target system type... x86_64-unknown-freebsd9.3
checking whether to build debug libraries... no
checking whether to build release libraries... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/mnt/usb16/jl/lms/slimserver-vendor-public-7.9/CPAN/icu/source':
configure: error: C compiler cannot create executables
See `config.log' for more details
./runConfigureICU: ./configure failed
gmake: *** No targets specified and no makefile found. Stop.
make failed
I believe gcc is okay. I creates symbolic links. If I type 'gcc -v' it answers gcc 4.8.

I will post my method (to pkg install gcc) once I get this to work. Or if someone would like to pick up the challenge from here, I can describe what I did.


Please help.

peterz
NewUser
NewUser
Posts: 1
Joined: 19 Sep 2015 23:12
Status: Offline

Re: SlimNAS on NAS4Free

#112

Post by peterz »

Stuarty wrote:I have a working LMS 7.9 on nas4free 10.1.0.2 - Prescience (revision 1454) with beta version of The Brig.

Code: Select all

root@lms:/ # uname -a
FreeBSD lms.local 10.1-RELEASE-p9 FreeBSD 10.1-RELEASE-p9 #0 r282117M: Tue Apr 28 03:42:54 CEST 2015     root@dev.nas4free.org:/usr/obj/nas4free/usr/src/sys/NAS4FREE-amd64  amd64
Snap!
I tried to follow your guide on Nas4Free 10.2.0.2 - Prester (revision 1814) using the FreeBSD 10.2 tar balls without succes.
Under 10.2 the perl version is 5.20 and when running the buildme.sh script it fails as follows:

...
Running Mkbootstrap for Media::Scan ()
chmod 644 Scan.bs
cc -c -I/usr/local/lms/slimserver-vendor/CPAN/build/include -I/usr/local/lms/slimserver-vendor/CPAN/build/include -I/usr/local/lms/slimserver-vendor/CPAN/build/include -I/usr/local/lms/slimserver-vendor/CPAN/build/include -I/usr/local/lms/slimserver-vendor/CPAN/build/include -I/usr/local/lms/slimserver-vendor/CPAN/build/include -I/usr/local/lms/slimserver-vendor/CPAN/build/include -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -O2 -pipe -fstack-protector -fno-strict-aliasing -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.20/mach/CORE" -O2 -Wall -Wno-unused-value -Wno-format-security Scan.c
./xs/Result.xs:45:36: warning: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Wformat]
length = sprintf(string, "%llu", r->size);
~~~~ ^~~~~~~
%lu
1 warning generated.
rm -f blib/arch/auto/Media/Scan/Scan.so
LD_RUN_PATH="/usr/lib:/usr/local/lib" cc -shared -L/wrkdirs/usr/ports/lang/perl5.20/work/perl-5.20.3 -L/usr/local/lib/perl5/5.20/mach/CORE -Wl,-rpath=/usr/local/lib/perl5/5.20/mach/CORE -lperl -L/usr/local/lib -fstack-protector Scan.o -o blib/arch/auto/Media/Scan/Scan.so /usr/local/lms/slimserver-vendor/CPAN/build/include/../lib/libmediascan.a /usr/local/lms/slimserver-vendor/CPAN/build/include/../lib/libavformat.a /usr/local/lms/slimserver-vendor/CPAN/build/include/../lib/libavcodec.a /usr/local/lms/slimserver-vendor/CPAN/build/include/../lib/libswscale.a /usr/local/lms/slimserver-vendor/CPAN/build/include/../lib/libavutil.a /usr/local/lms/slimserver-vendor/CPAN/build/include/../lib/libexif.a /usr/local/lms/slimserver-vendor/CPAN/build/include/../lib/libjpeg.a /usr/local/lms/slimserver-vendor/CPAN/build/include/../lib/libpng.a /usr/local/lms/slimserver-vendor/CPAN/build/include/../lib/libgif.a /usr/local/lms/slimserver-vendor/CPAN/build/include/../lib/libdb.a -lm -lz -lintl
/usr/bin/ld: /usr/local/lms/slimserver-vendor/CPAN/build/include/../lib/libavcodec.a(deinterlace.o): relocation R_X86_64_PC32 against `ff_pw_4' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value

cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make: stopped in /usr/local/lms/slimserver-vendor/CPAN/libmediascan-0.1/bindings/perl
make failed, aborting


It took some puzzling to discover that it works if you use the tar balls for FreeBSD 10.1 when creating the jail.
I now have a running LMS :)

HTH,
Peter.
:-)

Stuarty
Starter
Starter
Posts: 35
Joined: 21 Jun 2013 17:40
Status: Offline

Re: SlimNAS on NAS4Free

#113

Post by Stuarty »

I have a working LMS 7.9 on Nas4Free 10.2 in a jail with perl 5.20.3 The steps are very similar to those I posted above from May. I hope this helps others get a working LMS.

I created a jail with the Brig as described previously (viewtopic.php?f=79&t=3894&start=425#p61530). I start and stop it to make sure that it works. I used tar balls for 10.2 when creating the jail.

With the jail stopped, as root on my nas4free install, I create a mount point for media in the jail. In the Brig jail config I add an fstab entry for the mount point then restart the jail. My fstab entry is

Code: Select all

/tank/media/music /tank/jails/lms/mnt/music rw 0 0
Then I become root in the jail and type the following:

Code: Select all

portsnap fetch extract
mkdir -p /usr/local/etc/pkg/repos
ee /usr/local/etc/pkg/repos/FreeBSD.conf
Add the following, save and exit.

Code: Select all

FreeBSD: {
        url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
        mirror_type: "srv",
        signature_type: "none",
        fingerprints: "/usr/share/keys/pkg",
        enabled: yes
      }
Install pkg and then necessary packages then fetch a recent copy of LMS. Below is the nightly I used, you may need to change this.

Code: Select all

pkg
rm /usr/local/etc/pkg.conf
pkg update -f && pkg upgrade
pkg install -y bash git gmake nasm rsync nano p5-DBI p5-EV p5-XML-Parser p5-HTML-Parser p5-JSON-XS p5-Digest-SHA1 p5-YAML-LibYAML p5-Sub-Name p5-Audio-Scan p5-Image-Scale p5-DBD-SQLite p5-Class-XSAccessor p5-Template-Toolkit p5-IO-Interface sox mac faad2 libgd p5-Cpanel-JSON-XS p5-DBI screen gcc49
rehash

mkdir /usr/local/lms
cd /usr/local/lms
fetch https://github.com/Logitech/slimserver-vendor/archive/public/7.9.zip
unzip 7.9.zip
cd slimserver-vendor-public-7.9/CPAN
cp buildme.sh buildme.sh.original
nano buildme.sh
Edit 'buildme.sh', change 'RUN_TESTS=1' to 'RUN_TESTS=0'. Make the following symbolic links so that the buildme.sh script can find the installed packages.

Code: Select all

ln -s /usr/local/bin/gcc49 /usr/bin/gcc
ln -s /usr/local/bin/g++49 /usr/bin/g++
ln -s -f /usr/local/bin/perl5.20.3 /usr/bin/perl
ln -s -f /usr/local/bin/perl5.20.3 /usr/bin/perl5
Build with the following; it worked for me.

Code: Select all

./buildme.sh | tee /usr/local/lms/buildme.sh.log
Now combine your build with a recent nightly so that we have the correct modules for our platform along with the most recent LMS. I went to http://downloads-origin.slimdevices.com ... y/?ver=7.9 and chosen 'Logitech Media Server: Unix Tarball (for Perl 5.8-5.18, i386, x86_64, i386 FreeBSD, ARM EABI, PowerPC)'

Code: Select all

cd /usr/local/lms
fetch http://downloads-origin.slimdevices.com/nightly/7.9/sc/94fdf0b/logitechmediaserver-7.9.0-1448035497.tgz
tar xf logitechmediaserver-7.9.0-1448035497.tgz
cd logitechmediaserver-7.9.0-1448035497/CPAN/arch/5.20
cp -Rp /usr/local/lms/slimserver-vendor-public-7.9/CPAN/build/arch/5.20/amd64-freebsd-thread-multi .
rm -rf i386-linux-thread-multi
rm -rf i386-linux-thread-multi-64int
rm -rf x86_64-linux-thread-multi
cd ..
rm -rf 5.10
rm -rf 5.12
rm -rf 5.14
rm -rf 5.16
rm -rf 5.18
rm -rf 5.8
cd /usr/local/lms
mv /usr/local/lms/logitechmediaserver-7.9.0-1448035497/* /usr/local/lms
rmdir logitechmediaserver-7.9.0-1448035497
Create the user and group

Code: Select all

pw groupadd -n lms -g 30001
pw useradd -n lms -u 30001 -g lms -s /usr/sbin/nologin -c "Logitech Media Server" -d /nonexistent
I used the rc.d script from the following thread http://forums.slimdevices.com/showthrea ... reeNAS-9-3

Code: Select all

chown -R lms:lms /usr/local/lms
chown root:wheel /usr/local/etc/rc.d/lms
chmod 555 /usr/local/etc/rc.d/lms
echo 'lms_enable="YES"' >> /etc/rc.conf
service lms onestart
Screen Shot 2015-11-24 at 21.51.40.png
You do not have the required permissions to view the files attached to this post.

RainDamage
NewUser
NewUser
Posts: 9
Joined: 20 Oct 2014 17:11
Status: Offline

Re: SlimNAS on NAS4Free

#114

Post by RainDamage »

Stuarty wrote:I have a working LMS 7.9 on Nas4Free 10.2 in a jail with perl 5.20.3 The steps are very similar to those I posted above from May. I hope this helps others get a working LMS.
Hi, just wanted to let you know this helped me tremendously. Running LMS 7.9 on NAS4Free 9.3.0.2.

Thanks.
The Hague area - Central European Time

bupban
NewUser
NewUser
Posts: 6
Joined: 31 Aug 2014 09:36
Status: Offline

Re: SlimNAS on NAS4Free

#115

Post by bupban »

Hi everyone
great work stuarty!
I am running N4F 9.3.0.2 (rev 1955) and thebrig 0.91 (alcatraz) and can confirm that the install described in the post above from Nov 24, 2015 works like a charm. Running the latest nightly 7.9 Logitech Media Server now.
Cheers,
bupban

Stuarty
Starter
Starter
Posts: 35
Joined: 21 Jun 2013 17:40
Status: Offline

Re: SlimNAS on NAS4Free

#116

Post by Stuarty »

Here I go again. LMS nightly in a Freebsd 10.2 jail on nas4free 10.2 prester. Early steps are the same as before. Create the jail. Add the packages. At some point before starting the final product we need to stop the jail and create a mount point for the media library.

Code: Select all

portsnap fetch extract
mkdir -p /usr/local/etc/pkg/repos
ee /usr/local/etc/pkg/repos/FreeBSD.conf
Add the file, save and exit.

Code: Select all

FreeBSD: {
        url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
        mirror_type: "srv",
        signature_type: "none",
        fingerprints: "/usr/share/keys/pkg",
        enabled: yes
      }
Install the packages.

Code: Select all

pkg
rm /usr/local/etc/pkg.conf
pkg update -f && pkg upgrade
pkg install -y bash git gmake nasm rsync nano p5-DBI p5-EV p5-XML-Parser p5-HTML-Parser p5-JSON-XS p5-Digest-SHA1 p5-YAML-LibYAML p5-Sub-Name p5-Audio-Scan p5-Image-Scale p5-DBD-SQLite p5-Class-XSAccessor p5-Template-Toolkit p5-IO-Interface sox mac faad2 libgd p5-Cpanel-JSON-XS p5-DBI screen gcc49
rehash
Get LMS.

Code: Select all

mkdir /usr/local/lms
cd /usr/local/lms
git clone https://github.com/Logitech/slimserver-vendor.git
cd slimserver-vendor
ls -al
cd CPAN
ls -al
cp buildme.sh buildme.sh.original
nano buildme.sh
Edit 'buildme.sh', change 'RUN_TESTS=1' to 'RUN_TESTS=0'. Make the following symbolic links so that the buildme.sh script can find the installed packages.

Code: Select all

ln -s /usr/local/bin/gcc49 /usr/bin/gcc
ln -s /usr/local/bin/g++49 /usr/bin/g++
ln -s -f /usr/local/bin/perl5.20.3 /usr/bin/perl
ln -s -f /usr/local/bin/perl5.20.3 /usr/bin/perl5
Build with the following; it worked for me.

Code: Select all

./buildme.sh | tee /usr/local/lms/buildme.sh.log
Here comes the new bit. Image::Scale has been updated so we need to copy both the newly built Scale.so and Scale.pm. Otherwise we get Scale.so version 0.11 but Scale.pm version 0.08.

Code: Select all

cd slimserver-vendor/CPAN/build
tar cf /usr/local/lms/arch.tar arch/
cd /usr/local/lms/slimserver-vendor/CPAN/build/5.20/lib/perl5/amd64-freebsd-thread-multi/Image
tar cf /usr/local/lms/Scale11.tar *
cd /usr/local/lms
Fetch an appropriate noCPAN nightly. I got:

Code: Select all

fetch http://downloads.slimdevices.com/nightly/7.9/sc/ae43ff8/logitechmediaserver-7.9.0-1461319207-noCPAN.tgz
tar xzf logitechmediaserver-7.9.0-1461319207-noCPAN.tgz
Combine newly built files with noCPAN.

Code: Select all

mv logitechmediaserver-7.9.0-1461319207-noCPAN/* .
tar xf arch.tar -C /usr/local/lms/CPAN/
mv /usr/local/lms/CPAN/Image/Scale.pm /usr/local/lms/CPAN/Image/_Scale.pm
cd /usr/local/lms/
tar xf Scale11.tar -C /usr/local/lms/CPAN/Image/
Everything else is as before.

Code: Select all

pw groupadd -n lms -g 30001
pw useradd -n lms -u 30001 -g lms -s /usr/sbin/nologin -c "Logitech Media Server" -d /nonexistent
Add the rc.d script as before

Code: Select all

nano /usr/local/etc/rc.d/lms
Set permissions and ownership and start.

Code: Select all

chown -R lms:lms /usr/local/lms
chown root:wheel /usr/local/etc/rc.d/lms
chmod 555 /usr/local/etc/rc.d/lms
echo 'lms_enable="YES"' >> /etc/rc.conf
service lms onestart

Stuarty
Starter
Starter
Posts: 35
Joined: 21 Jun 2013 17:40
Status: Offline

Re: SlimNAS on NAS4Free

#117

Post by Stuarty »

Information in post #117 above worked again today to install the latest LMS 7.9 nightly in a 10.3 jail with nas4free 10.3.0.3 - Pilingitam (revision 2898).

RSS
Starter
Starter
Posts: 26
Joined: 06 Feb 2013 12:22
Status: Offline

Re: SlimNAS on NAS4Free

#118

Post by RSS »

Having struggled with LMS for a few years the final straw for me was having to retire my old 2TB drive and rebuild the NAS. At this point it made sense to move up from the older FreeNAS system I was using, sad as it was my entry into NAS and I was comfortable with how to use it, however a new world of NAS4Free awaited....
That then gave me the issue with LMS, again knew it well, had the supporting H/W of a duet and radio but it's not without its bugs and a few times required coaxing the system into life (wife refused to use it) just before parties etc..! I got it working on the new NAS4Free through the use of a jail but you know what, life's too short, it should be easier and I felt let down by Logitech dropping the product leaving it for 3rd parties to fill in the gaps (which I think they did a brilliant job of BTW).
I tried the Sonos system, it was really plug and play, could be controlled from tablet, PC or phone and used Google play to hold all my music so I didn't even need the NAS on to access my music. Since then I've added a Play-5 speaker and the system works very well. In fact I would say the weakest part is Google Play where some tracks etc can get lost, but I could always point the Sonos to the NAS if it becomes a real issue.

My point :?: , I felt it was time to move on, just because you can make an older system work through hours of tinkering, for me, I had to question what I was trying to achieve, and that was a system to play my music. I'd defended my LMS system through numerous hiccups, but it was I have to admit a little flaky at times. Hats off to those who have it running in a NAS4Free jail :ugeek: , but for me plug & pray is now replaced with plug and play. :D
11.0.0.4 - Sayyadina
x64-embedded on Pentium(R) Dual-Core CPU E5200 @ 2.50GHz
MSI 7529 v1.1(G31M3 V2) motherboard
2GB DDR2 memory
4TB SATA drive WD Red
Sonos & Google Play

cookiemonster
Advanced User
Advanced User
Posts: 221
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: SlimNAS on NAS4Free

#119

Post by cookiemonster »

Hi Stuarty. I followed post #117 to install lms on a 10.3 jail inside a 10.3.0.3 nas4free nas as well. Wonder if you can give me a pointer or two.
All complete and lms starts but going to the lms UI: Advanced > File Types, I got a message somewhre that lame was not installed.
I did a make install clean from /usr/ports/audio/lame in the jail, all good.
I replaced the faad binary in the jais' /usr/local/bin/ with one of the logitech's precompiled ones for unix-noCPAN. A nigtly 7.9. The reason is I have some music in apple lossless format (some of my brother's music - no choice there). In the past replacing the binary file has solved the problems. Not this time.
I still get an error trying to play apple uncompressed files: error in lms log is "decoder does not support the file format". Issuing faad in a shell gives me "ELF interpreter /libexec/ld-elf.so.1 not found, error 8". I've found the file in /libexec/ in the jail. There is also a link in /usr/libexec pointing to it.
With this as background, would you mind sharing why merging the built lms with noCPAN? I'm thinking, could it be possible to have overridden logitech's faad and it's dependency when merging?

jistme
Status: Offline

Re: SlimNAS on NAS4Free

#120

Post by jistme »

Hi Stuarty,

A great effort you are making here! It's appreciated a lot.
Even if it says 'experienced' next to my name, I still only have newbie capabilities in this area.
I am trying a clean install of SlimNAS on my 10.3.0.3 embedded following your instructions.
Alas I am getting stuck at a very early stage already.

When I try to perform your instructions from post #117, I am guessing I need to start with what a line you mention in #114, namely:
"Then I become root in the jail and type the following:"

This is where I don't know exactly what to do.
Can I do that from within the NAS4Free user interface?
(I much hope so, since when trying Putty, I can't even get access to my server. (access denied)

Can you clarify that part for me please?

Post Reply

Return to “Extensions / Add-ons”