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 ... rOnFreeNASStep 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.tbzFTP 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 &