Installation problem with PSM 1.72.0 and FreeNAS 8.3.0

For help and support with issues specific to Linux/Unix
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

Installation problem with PSM 1.72.0 and FreeNAS 8.3.0

Postby Boatski » Tue Dec 04, 2012 5:37 am

I've been following this guide to get PS3 Media Server setup on a fresh FreeNAS installation. I end up getting file system full errors when I get to adding the mplayer package. Here's a run down of what I'm doing.

The first thing I do is:
Code: Select all
cd /var
mount -uw /
pkg_add -v -r xtrans
pkg_add -v -r xproto
pkg_add -v -r xextproto
pkg_add -v -r javavmwrapper
pkg_add -v -r ffmpeg
pkg_add -v -r mplayer


Everything works fine up until I add the mplayer package. While that's installing, I end up getting file system full errors. If I run:
Code: Select all
df -h


I get something like this: (fresh install)
Image

But it's full and says something like
Code: Select all
/dev/ufs/FreeNASs1a 926M 926M 17M 109% /


I am able to get PSM up and running if I skip the mplayer and MediaInfo installs, but I need MEncoder to transcode some movies that will be streamed. Though, I noticed PSM disappears from /var when I do a reboot.

I've looked around the last few days and can't seem to find anyone with the same problem. I've tried setting up PSM on two different USB drives, 2GB and 4GB, but FreeNAS always partitions the same amount anyway. Does anyone know what's going wrong or can someone point me in the right direction?
Boatski
 
Posts: 1
Joined: Tue Dec 04, 2012 5:01 am

Re: Installation problem with PSM 1.72.0 and FreeNAS 8.3.0

Postby L1NK3D » Thu Jan 31, 2013 2:17 pm

Did you ever get this issue figured out? I am having the same problem, and another. The PMS installation get's wiped out when I reboot, if I install it to /var/PMS (which is where one guide recommended).

There should be a way to increase the size of the root partition, but I haven't figured it out yet. In my case I have a 250GB drive I am using for my installation of FN (overkill I know). Looking online, I found a few guides that state in previous version of FN you could modify the partitions during the install process but this doesn't seem to be an option in 8.3.0.

At this point I am considering finding another solution but I already migrated some of my data to the ZFS pool...
L1NK3D
 
Posts: 1
Joined: Thu Jan 31, 2013 2:12 pm

Re: Installation problem with PSM 1.72.0 and FreeNAS 8.3.0

Postby tineye89 » Tue Feb 05, 2013 5:10 am

Its just NOT possible any longer. I Have spent 2 days (also using the guild linked to above) trying to load the required packages but the 1GB partition FreeNas is limited to just isn't enough. I was able to make some headway and install most of the packages by setting the PKG_TMPDIR to my that of my ZFS volume:

setenv PKG_TMPDIR /mnt/ZFS_VOLUME0/pkg_tmp

This helped because the pkg_add command actually uses disk space for staging/decompressing. By setting this to my ZFS Volume I was able to eliminate that problem, but it wasn't enough. The package that seems to be the larges and worst offender is "gcc" no matter what I couldn't get this to install. It and its dependencies would fill up the entire 1GB partition of FreeNas.

It also helped to remove the verbose flag "-v" from the pkg_add. It must have been adding some additional logging to disk as well.
tineye89
 
Posts: 3
Joined: Thu Dec 27, 2012 5:27 am

Re: Installation problem with PSM 1.72.0 and FreeNAS 8.3.0

Postby tineye89 » Mon Feb 11, 2013 2:04 am

Well I need to qualify what I said in my previous post. I was correct it is NOT is possible to install the latest PS3 Media Server in FreeNAS 8.3. But you can create a jailed instance of FreeBSD, which can run the PSM, within your FreeNAS. The catch was the jailed instance had to run on my ZFS file system. Not a huge deal I didn't think.

I was able to get mine up and running, using the steps below. The only problem I had was was at the very end all of a sudden my folders that contained my content failed to mount on restarts? What the heck?? Not sure but since I only reboot once or twice a year not a big deal. I will work on a solution if any of you can see what I am doing wrong please post a solution.

----- Install Steps -------------------------------------------
Based on steps from these guides:
http://tapalla.wordpress.com/2012/08/18 ... r-freenas/
http://stepbystep.wikkii.com/wiki/PS3Me ... rOnFreeNAS

Step 1 - Create our base directories
mkdir /mnt/ZFS_VOLUME0/PS3MediaServer
mkdir /mnt/ZFS_VOLUME0/PS3MediaServer/jail
mkdir /mnt/ZFS_VOLUME0/PS3MediaServer/FreeBSD

Step 2 - Download FreeBSD
cd /mnt/ZFS_VOLUME0/PS3MediaServer/FreeBSD/
wget -rnd ftp://ftp1.us.freebsd.org/pub/FreeBSD/releases/`uname -m`/`uname -r | cut -d- -f1-2`/base/ `uname -r | cut -d- -f1-2`_`uname -m`_base

Step 3 - Install FreeBSD to jail
setenv DESTDIR /mnt/ZFS_VOLUME0/PS3MediaServer/jail/
sh install.sh
NOTE: The first time I installed FreeBDS I got a bunch of the following error when I tried to run install.sh.
./var/empty/: Can't set user=0/group=0 for var/emptyCan't update time for var/empty
./usr/lib/librt.so.1: Could not unlink
./usr/bin/chpass: Could not unlink nouchg
...
So I had to use the chflags command. But it didn't happen the second time, might have something to do with the fact that I accidentally nested /FreeBSD under /jail instead of at the same level in /PS3MediaServer.
chflags -v -R noschg /mnt/ZFS_VOLUME0/PS3MediaServer/jail/
sh install.sh

Step 4 - Copy over some of the FreeNAS configurations to the jail
cd /mnt/ZFS_VOLUME0/PS3MediaServer/jail/etc
cp /etc/resolv.conf .
cp /etc/localtime .
mount -uw /
cd /conf/base/etc
cp -a /conf /mnt/ZFS_VOLUME0/PS3MediaServer/jail
mount -t devfs devfs /mnt/ZFS_VOLUME0/PS3MediaServer/jail/dev

Step 5 - Create directory for Java
mkdir /mnt/ZFS_VOLUME0/PS3MediaServer/jail/usr/local/virtual_java/

Step 6 - Download Java 1.6
http://www.freebsdfoundation.org/cgi-bi ... .07.02.tbz
FTP diablo-jre-freebsd7.amd64.1.6.0.07.02.tbz to /mnt/ZFS_VOLUME0/PS3MediaServer/jail/usr/local/virtual_java/

Step 7 - Change the apparent root to the jail directory, then update FreeBSD
cd /mnt/ZFS_VOLUME0/PS3MediaServer
chroot jail freebsd-update fetch install
"ctl-z" to get out of update not in instructions.

Step 8 - Run the Jail
chroot /mnt/ZFS_VOLUME0/PS3MediaServer/jail
set prompt="PS3MediaServer &> "

Step 9 - Download and Install PortSnap.
cd /var/db/portsnap
portsnap fetch
cd /usr/ports
portsnap extract

Step 10 - Download & Install Ports
cd /usr/ports/x11/xtrans/ && make install clean
cd /usr/ports/x11/xproto/ && make install clean
cd /usr/ports/x11/xextproto/ && make install clean
cd /usr/ports/java/javavmwrapper/ && make install clean
cd /usr/ports/x11-toolkits/gtk20/ && make install clean
cd /usr/ports/multimedia/ffmpeg/ && make install clean
cd /usr/ports/multimedia/mplayer/ && make install clean
cd /usr/ports/multimedia/mencoder/ && make install clean

Step 10.1 - Tried to Download & Install mediainfo from Ports but it didn't create the required libzen.so or libmediainfo.so libraries.
So I had to downloaded source code from http://mediainfo.sourceforge.net/en/Download/Source and manually build.
copy MediaInfo_DLL_0.7.61_GNU_FromSource.tar.bz2 to /var
cd /var
tar -xvf MediaInfo_DLL_0.7.61_GNU_FromSource.tar.bz2 && cd MediaInfo_DLL_GNU_FromSource

Step 10.2 - At least on mediainfo v0.7.61 the SO_Compile.sh script was messed up for the libzen.
Add the "--enable-shared" to the $ZenLib_Options line.
./configure $ZenLib_Options --enable-shared --libdir=/usr/lib $*

Step 10.3 - Compile & Make
sh SO_Compile.sh
cd /var/MediaInfo_DLL_GNU_FromSource/ZenLib/Project/GNU/Library && make install
cd /var/MediaInfo_DLL_GNU_FromSource/MediaInfoLib/Project/GNU/Library && make install

Step 11 - Install the JRE
cd /usr/local/virtual_java
pkg_add -v /usr/local/virtual_java/diablo-jre-freebsd7.amd64.1.6.0.07.02.tbz

Step 12 - Make sure you are root
Has to be ran under FreeNas Root So because we did a chroot to jail above you need to either "exit" or open another window and execute the following:
echo libz.so.4 libz.so.5 > /mnt/ZFS_VOLUME0/PS3MediaServer/jail/etc/libmap.conf
echo libz.so.4 libz.so.5 > /mnt/ZFS_VOLUME0/PS3MediaServer/jail/conf/base/etc/libmap.conf

Step 13 - Make sure you are root
If you see the Java help manual after typing java, the JRE should be installed at this point.
su root
java

Step 14 - unzip PSM
chroot /mnt/ZFS_VOLUME0/PS3MediaServer/jail
set prompt="PS3MediaServer &> "
cd /var
tar -xvf pms-generic-linux-unix-1.72.0.tgz
rm pms-generic-linux-unix-1.72.0.tgz
cd /var/pms-1.72.0

Step 15 - Mount the directories you want the PS3 Media Server to see.
mkdir -p /mnt/ZFS_VOLUME0/PS3MediaServer/jail/mnt/ZFS_VOLUME0/audio
mount_nullfs /mnt/ZFS_VOLUME0/Audio /mnt/ZFS_VOLUME0/PS3MediaServer/jail/mnt/ZFS_VOLUME0/audio
mkdir -p /mnt/ZFS_VOLUME0/PS3MediaServer/jail/mnt/ZFS_VOLUME0/video
mount_nullfs /mnt/ZFS_VOLUME0/Video /mnt/ZFS_VOLUME0/PS3MediaServer/jail/mnt/ZFS_VOLUME0/video
mkdir -p /mnt/ZFS_VOLUME0/PS3MediaServer/jail/mnt/ZFS_VOLUME0/pictures
mount_nullfs /mnt/ZFS_VOLUME0/Pictures /mnt/ZFS_VOLUME0/PS3MediaServer/jail/mnt/ZFS_VOLUME0/pictures
mount | sort
If you need to unmount them one of this should work.
unmount /mnt/ZFS_VOLUME0/PS3MediaServer/jail/mnt/ZFS_VOLUME0/audio

Step 16 - Test run look for errors in log file.
chroot /mnt/ZFS_VOLUME0/PS3MediaServer/jail
set prompt="PS3MediaServer &> "
cd /var/pms-1.72.0
sh PMS.sh
ctl+c to exit

Tweeking
Set JVM heap space larger
/var/pms-1.72.0
vi PMS.sh
from: -Xmx768M
to: -Xmx1024M
Configure your PMS.conf settings

Startup in background
FreeNas 8.3 doesn't allow for command scripts so execute the following to kick this off in the background and exit the putty session.
Had to repeat Step 15 for some reason on the 100th reboot it failed to remount the content folders.
chroot /mnt/ZFS_VOLUME0/PS3MediaServer/jail
./var/pms-1.72.0/PMS.sh &
tineye89
 
Posts: 3
Joined: Thu Dec 27, 2012 5:27 am

Re: Installation problem with PSM 1.72.0 and FreeNAS 8.3.0

Postby OlliL » Mon Feb 11, 2013 7:37 am

Just some additions:

The mediainfo port gets fixed as soon as my PR is submitted:
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/175817

As soon as my Java-Fix is included in the next shipment of OpenJDK or locally in the FreeBSD ports, OpenJDK would work as well and I would recommend to use it instead of Diablo JRE when it is fixed:
http://hg.openjdk.java.net/bsd-port/bsd ... a676f5b5db

Regarding your re-mounting problems on bootup - why not just entering your jailed mountpoints in your FreeNAS /etc/fstab?

In general - why can't you just install all the ports somewhere on your ZFS mount without setting up a Jail? Building the ports on your FreeNAS installation and working with PREFIX and LOCALBASE does not help?
OlliL
 
Posts: 19
Joined: Sat Feb 19, 2011 3:48 pm

Re: Installation problem with PSM 1.72.0 and FreeNAS 8.3.0

Postby hipyvn » Fri Mar 08, 2013 10:27 am

Hi All!!!!!
i have problem with "Step 10.2"
-------------------------------------------------------------------------------
Step 10.2 - At least on mediainfo v0.7.61 the SO_Compile.sh script was messed up for the libzen.
Add the "--enable-shared" to the $ZenLib_Options line.
./configure $ZenLib_Options --enable-shared --libdir=/usr/lib $*
-------------------------------------------------------------------------------------------
This is my error: "ZenLib: Undefined variable". or please open this link: http://www.flickr.com/photos/hipyvn/853 ... otostream/
please help me!!!!
thanks & best regards
hipyvn
 
Posts: 2
Joined: Fri Mar 08, 2013 10:00 am

Re: Installation problem with PSM 1.72.0 and FreeNAS 8.3.0

Postby tineye89 » Mon Mar 11, 2013 1:55 am

OlliL, to answer your first question modifications are not persisted to etc/fstab, essentially its recreated every time on boot up. I think I could get it to work by modifying /conf/base/etc/rc.d/ix-fstab (http://forums.freenas.org/archive/index.php/t-7199.html) but that can be a bit tricky and I just didn't want to risk screwing anything up. As to your second question, I didn't think of that. Sounds plausible, maybe next time I upgrade I will give it a go. :)

hipyvn, not sure what you are doing? From the image you linked too it looks like you are trying to run it from the command line? All I was trying to get across was that you needed to
1) Open the SO_Compile.sh file
2) Find the $ZenLib_Options line
3) Add the "--enable-shared" to it so that it looks like "./configure $ZenLib_Options --enable-shared --libdir=/usr/lib $*"
4) Save and close the file
tineye89
 
Posts: 3
Joined: Thu Dec 27, 2012 5:27 am

Re: Installation problem with PSM 1.72.0 and FreeNAS 8.3.0

Postby hipyvn » Mon Mar 11, 2013 3:53 pm

Hi Tineye89!!!
Thank you for help me! You right! I'm trying to run it from the command line. And now, I see, I see..... I was passed it.
Thank you again
hipyvn
 
Posts: 2
Joined: Fri Mar 08, 2013 10:00 am


Return to Linux/Unix Support

Who is online

Users browsing this forum: Bing [Bot] and 8 guests