Page 1 of 2

set up jail for serviio

Posted: 11 Apr 2013 14:11
by cuculainn
Hi guys

I am completely new to NAS4free and jails. I have NAS4free installed (embedded) and working.

I want to install Serviio.

I was trying to follow the instructions on this forum, but I am failing miserably!!

where do i enter the code to setup a jail is it in the command window on the web inteface of NAS4free or do I need to access the NAS directly

Sorry for such a basic question, but any help is appreciated.

If anyone has a link to a dummies guide to jails i would apprciate that also

Re: set up jail for serviio

Posted: 11 Apr 2013 14:21
by raulfg3
you need to enter code in the shell, use SSH sevice in NAS and use Putty in your Desktop PC.

PD: Fsbruva are working in a easy way to installl jails called "thebrig" , search forum if you want to know more.

Re: set up jail for serviio

Posted: 11 Apr 2013 17:43
by cuculainn
I really appreciate your reply, so what your saying is basically if I am entering the code remotely I use PUTTY (I run Ubuntu so I will need the linux equivalent) which will link with the SSH service on NAS....


Anyway I will give it a go but will probably have more questions :D

Re: set up jail for serviio

Posted: 11 Apr 2013 17:58
by raulfg3
cuculainn wrote:I really appreciate your reply, so what your saying is basically if I am entering the code remotely I use PUTTY (I run Ubuntu so I will need the linux equivalent) which will link with the SSH service on NAS...
YES

Re: set up jail for serviio

Posted: 12 Apr 2013 01:03
by cuculainn
ok,

so I made some progress, got as far as where i have to download the BSD base system, and It got to about 6% and then write failed file system is full no space left on device.

I think I made a mistake creating the mount point is there anyway to delete what I have done and start over?

thanks for your help

Re: set up jail for serviio

Posted: 12 Apr 2013 07:52
by raulfg3
cuculainn wrote:so I made some progress, got as far as where i have to download the BSD base system, and It got to about 6% and then write failed file system is full no space left on device.
strange if you create the jail in your data disk.
cuculainn wrote:I think I made a mistake creating the mount point is there anyway to delete what I have done and start over?
"rm" see wiki jails : HOWTO delete a jail.
jail.jpg

PD: consider to try to install thebrig is easy for beginers: viewtopic.php?f=79&t=1654&p=16870

Re: set up jail for serviio

Posted: 12 Apr 2013 14:29
by cuculainn
Thanks again for reply,

I have a 12 gb disk that I have installed NAS4free on, this is the mount pt that I am trying to install the jail. It shows up on the NAS as being empty so I dont know why it says there is no space on device.

When i was installing NAS4free, it gave me option(i think) to partition the drive an leave remaining space available as storage. Would this be the reason? as in it is trying to download to the patition with NAS4free on it which may be too small?

Maybe i will just delete and try your other sugestion, even though it looks just as complicated :P

Re: set up jail for serviio

Posted: 12 Apr 2013 14:40
by raulfg3
cuculainn wrote:I have a 12 gb disk that I have installed NAS4free on, this is the mount pt that I am trying to install the jail. It shows up on the NAS as being empty so I dont know why it says there is no space on device.
if you use the wiki, you need to create /jail in your boot nas4Free (in "/"), and the real jail folder in your data disk, normally in /mnt/YourDatadisk/jail (replace yourdatadisk by your real pool), and mount using nullfs to /jail .

in the wiki Jail is:

Code: Select all

# cd /
# mkdir /jail
# mkdir /mnt/data/jail
# mkdir /mnt/data/jail/{work,proto,conf}
# mount_nullfs /mnt/data/jail /jail
remember replace "data" by your pool/mount.

Please can you post this same lines using your pool name??

Re: set up jail for serviio

Posted: 12 Apr 2013 14:45
by raulfg3
cuculainn wrote:When i was installing NAS4free, it gave me option(i think) to partition the drive an leave remaining space available as storage. Would this be the reason? as in it is trying to download to the patition with NAS4free on it which may be too small?
can be.

Nas4Free for default suggest 384MB to install on it, that is the minimun that need to boot, and is usefull for old hardware and small CF.

But if you have a 12GB disk to boot Nas4Free, do a new full reinstall, and this time select 2048MB ( you don't need more) to install Nas4Free, next restore previosly saved config and you have a new N4F install on a 2GB parttion, so you don't have space problems this time ( you can use 10240MB if you want, but 2GB is enought).

Re: set up jail for serviio

Posted: 12 Apr 2013 15:32
by cuculainn
Thanks,

I will do a fresh install and create a 2gb partition and then I will get back to you and post the lines from your previous post with my mount pt

Re: set up jail for serviio

Posted: 15 Apr 2013 23:03
by cuculainn
raulfg3 wrote:
cuculainn wrote:I have a 12 gb disk that I have installed NAS4free on, this is the mount pt that I am trying to install the jail. It shows up on the NAS as being empty so I dont know why it says there is no space on device.
if you use the wiki, you need to create /jail in your boot nas4Free (in "/"), and the real jail folder in your data disk, normally in /mnt/YourDatadisk/jail (replace yourdatadisk by your real pool), and mount using nullfs to /jail .

in the wiki Jail is:

Code: Select all

# cd /
# mkdir /jail
# mkdir /mnt/data/jail
# mkdir /mnt/data/jail/{work,proto,conf}
# mount_nullfs /mnt/data/jail /jail
remember replace "data" by your pool/mount.

Please can you post this same lines using your pool name??
Ok so I re installed NAS4free, and set up a 2 gb partition. (realised I had done the embedded install last time!)

So my lines should be. ( I notice you have included the first line which is not in the wiki. # cd /

Code: Select all

# cd /
# mkdir /jail
# mkdir /mnt/NAS/jail
# mkdir /mnt/NAS/jail/{work,proto,conf}
# mount_nullfs /mnt/NAS/jail /jail
So I take it i enter each line individually?

I'm gonna wait for you before I go anywhere!!

Re: set up jail for serviio

Posted: 16 Apr 2013 00:18
by cuculainn
Ok,

So decided to go ahead and give this a go

I have got to this point without any problems (i think)

Code: Select all

mkdir /jail/proto/mnt/Video
but looking ahead it is getting more complicated, so maybe if you are back online you can give me some more advice


thanks again for your help

Re: set up jail for serviio

Posted: 16 Apr 2013 07:50
by raulfg3
now you need to edit fstab.proto to mount your video path inside the jail

Code: Select all

nano /jail/conf/fstab.proto
and add the apropiate line:
/mnt/data/Video /jail/proto/mnt/Video nullfs ro 0 0
in red are the path to your Video folder

I do not know what is, I supposse

Code: Select all

/mnt/NAS/Video /jail/proto/mnt/Video nullfs ro 0 0
next step is create rc.conf.local

Re: set up jail for serviio

Posted: 16 Apr 2013 09:38
by cuculainn
raulfg3 wrote:now you need to edit fstab.proto to mount your video path inside the jail

Code: Select all

nano /jail/conf/fstab.proto
and add the apropiate line:
/mnt/data/Video /jail/proto/mnt/Video nullfs ro 0 0
in red are the path to your Video folder

I do not know what is, I supposse

Code: Select all

/mnt/NAS/Video /jail/proto/mnt/Video nullfs ro 0 0
next step is create rc.conf.local
Thanks for getting back,

One thing before I do that, I plan to add another harddrive where I will store most of my stuff, will it be possible to add another video or downloads path to the jail in the future?

Re: set up jail for serviio

Posted: 16 Apr 2013 11:07
by raulfg3
cuculainn wrote:One thing before I do that, I plan to add another harddrive where I will store most of my stuff, will it be possible to add another video or downloads path to the jail in the future?
Yes, you can add as many lines as you want, only limitation is that each line is a separate folder in jail ( you can't merge several Video folders in only one folder in destination)

Re: set up jail for serviio

Posted: 17 Apr 2013 00:02
by cuculainn
Ok, so thanks for your help to date I am still making progress and really appreciate your help.

I am now ready to "Create rc.conf.local:"

When the wiki says modify to fit needs this is what I am planning to put in. Does it get entered exactly as formatted below?

Code: Select all

jail_enable="YES"	# enable jails YES|NO
jail_list="proto"	# name of the jails to start "proto www..."
jail_proto_rootdir="/jail/proto"		# path to our jail
jail_proto_hostname="proto.domain.local"	# hostname 
jail_proto_ip="192.168.1.110"		# ip of the jail 
jail_proto_interface="xI0"		# Network Interface to use, replace on your NAS interface name
jail_proto_devfs_enable="YES"		# use devfs 
jail_proto_mount_enable="YES"		# mount YES|NO 
jail_proto_fstab="/jail/conf/fstab.proto"	# File with Filesystems to mount

Three questions.

1. I assume I assign a static ip address on router to match the one above?
2. I am not sure what the network interface to use....is it what I use to log in to NAS4free?
3. is there anything there that you think I should change?


thanks :D

Re: set up jail for serviio

Posted: 17 Apr 2013 07:28
by raulfg3
cuculainn wrote:. I am not sure what the network interface to use....is it what I use to log in to NAS4free?
use the interface that you assing to LAN in : Network|Interface Management
cuculainn wrote:1. I assume I assign a static ip address on router to match the one above?
NO, you need to assing one compatible with your actual IP, and free, eg: if you use 192.168.1.250 for your NAS, 192.168.1.201 is good, but if you use 192.168.0.10 for your NAS, then IP can be 192.168.0.101 by example

cuculainn wrote:3. is there anything there that you think I should change?
I use jail_proto_hostname="proto" # hostname for jail proto

Re: set up jail for serviio

Posted: 17 Apr 2013 20:32
by cuculainn
Quick question I have just entered the line with IP address and network interface.

How do I save this as per the wiki?

"Change the settings to fit your needs and save. Especially jail_proto_interface and jail_proto_ip."

Re: set up jail for serviio

Posted: 17 Apr 2013 21:24
by raulfg3
use save in your editor ( if use embeded file editor, push save, if use "ee" (file editor in shell) use save, etc....

Re: set up jail for serviio

Posted: 18 Apr 2013 00:13
by cuculainn
Thanks again for your continued support.

So i have got to the end of the wiki, and rebooted.

Now I am wondering where do I enter "# jls" to check the jail?

Thanks again

Re: set up jail for serviio

Posted: 18 Apr 2013 15:58
by cuculainn
raulfg3 wrote:use save in your editor ( if use embeded file editor, push save, if use "ee" (file editor in shell) use save, etc....

Just reviewing what I have completed and think I may have done this step wrong.

I completed all this in Putty. when I enter nano does this open up the file editor?

To save do I actually enter "save, etc...."

please dont give up on me at this stage...I feel I am so close to sucess!

Re: set up jail for serviio

Posted: 18 Apr 2013 21:52
by raulfg3
nano is a file editor like notepad ( well not like notepad, is more like emacs if you know), you can use it to edit file, and use escape to save file ( escape is to open a menu to do things).

Trick: use Nas4Free embeded file editor in Advanced|File Editor and locate desired file to edit in /jail/conf/fstab.proto or in /mnt/yourpool/jail/conf/fstab.proto . is better because have a interface not a command line.

Re: set up jail for serviio

Posted: 18 Apr 2013 21:57
by raulfg3
cuculainn wrote:Thanks again for your continued support.

So i have got to the end of the wiki, and rebooted.

Now I am wondering where do I enter "# jls" to check the jail?

Thanks again
if you type jls and you do all step in wiki corect, you must have an output like this:

Code: Select all

# jls
    
    JID  IP Address      Hostname                      Path
    1    192.168.1.110   proto.domain.local            /jail/proto

PD. revise that 192.168.1.100 are not in use in your LAN, because jail need it to use for jail proto.

Re: set up jail for serviio

Posted: 21 Apr 2013 15:00
by cuculainn
raulfg3 wrote:
cuculainn wrote:Thanks again for your continued support.

So i have got to the end of the wiki, and rebooted.

Now I am wondering where do I enter "# jls" to check the jail?

Thanks again
if you type jls and you do all step in wiki corect, you must have an output like this:

Code: Select all

# jls
    
    JID  IP Address      Hostname                      Path
    1    192.168.1.110   proto.domain.local            /jail/proto

PD. revise that 192.168.1.100 are not in use in your LAN, because jail need it to use for jail proto.
Hi Raul,

well I decided to do another fresh install and start over. Having read some of the other wikis and forums I had a better understanding of what I was doing wrong.

So this time I have had sucess and when i enter

Code: Select all

# jls
i get

Code: Select all

    JID  IP Address      Hostname                      Path
    1    192.168.1.110   proto.domain.local            /jail/proto
So now i am wondering do I set the ip address up as a static ip on the router?
It currently is not used by router.

Also my Nas is a pretty old pc so would I be better to install MiniDLna instead of Serviio?
I have been reading your thread on MiniDLNA and thinking of that instead


Thanks for all your help

Re: set up jail for serviio

Posted: 22 Apr 2013 12:47
by cuculainn
Ok,

So as I said in previous post I have my jail set up and working at last!

I decided to install Serviio so created a new jail called serviio which worked

I then started the install process as per the HowTO on the forum. It was installing fine, but after 9 hours still had not completed installing of ffmpeg1................Is this normal?

I left running over night but at some stage I lost connection to server.

So I have decided to delete jail and start over again.

Should I jsut install miniDLNA instead of Serviio?
Does MIniDLNA be recognised by Samsung tvs as good as Serviio?

Thanks for continued support

Re: set up jail for serviio

Posted: 22 Apr 2013 13:25
by raulfg3
cuculainn wrote:Should I jsut install miniDLNA instead of Serviio?
YES, And if you have a low end NAS is better because serviio need a lot of resources & CPU to work.
cuculainn wrote:Does MIniDLNA be recognised by Samsung tvs as good as Serviio?
YES, No problem, at this point.


PD: a trick that I discover last days, you can use embedded fuppes UPNP if you use loewe as profile for your SAMSUNG the only bad for this is that you need to updata database by hand because cron or command line do not work.

viewtopic.php?f=38&t=1074

So still recomend to use minidlna if you want cron update of your media files.

Re: set up jail for serviio

Posted: 22 Apr 2013 13:58
by cuculainn
Great thanks for reply. I am going to study your Howto on installing MiniDlna and try that first

Re: set up jail for serviio

Posted: 23 Apr 2013 12:38
by cuculainn

PD: a trick that I discover last days, you can use embedded fuppes UPNP if you use loewe as profile for your SAMSUNG the only bad for this is that you need to updata database by hand because cron or command line do not work.

viewtopic.php?f=38&t=1074

So still recomend to use minidlna if you want cron update of your media files.

Tried tehe fuppes UPNP and used Loewe connect profile but it didnt work.

I think I am going to install the MiniDLNA.

One further question in your How to you use ee to edit files.....I have been using the editor in NAS4free. is it ok to do this?

Re: set up jail for serviio

Posted: 23 Apr 2013 13:31
by raulfg3
cuculainn wrote:One further question in your How to you use ee to edit files.....I have been using the editor in NAS4free. is it ok to do this?
YES, is OK, you can use the editor that you know and works with unix ( do not use notepad or windows edit, because insert CR/LF at the end on lines)
cuculainn wrote:Tried tehe fuppes UPNP and used Loewe connect profile but it didnt work.
, Strange, I have a SAMSUNG B651 and works fine for me, do you see fuppes webPage?, if yes you need to push "update" or Rebuild database to say to fuppes that you want that fuppes indexes all your multimedia folders ( at least folders that you add in config webGUI).

Re: set up jail for serviio

Posted: 23 Apr 2013 18:01
by cuculainn
cuculainn wrote: Strange, I have a SAMSUNG B651 and works fine for me, do you see fuppes webPage?, if yes you need to push "update" or Rebuild database to say to fuppes that you want that fuppes indexes all your multimedia folders ( at least folders that you add in config webGUI).
when you say do I see fuppes webpage do you mean the webgui?

if you mean the webgui then yes I can see it.

I am not sure that I saw a update option though. I will check later

thanks again