This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

[SOLVED] Jail Install

Jails with XigmaNAS
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
Mizma
experienced User
experienced User
Posts: 79
Joined: 02 Feb 2013 15:53
Status: Offline

[SOLVED] Jail Install

Post by Mizma »

Hi I have tried to configure a jail followoing the wiki on a embedded installation.

But one way or another somthing isnt correct. ive done as follow (NoX my test drive):

mkdir /jail
mkdir /mnt/NoX/jail
mkdir /mnt/NoX/jail/{work,proto,conf}
mount_nullfs /NoX/data/jail /jail #I dont recall if this line worked but if i try it aftervards it does'nt
cd /jail/work

Downloaded files to Work (base.txz and lib32.txz)


cd /jail
mkdir -p conf/root/{etc/rc.d/,usr/bin,usr/sbin}
cp proto/etc/rc.d/jail conf/root/etc/rc.d/
cp proto/usr/sbin/{jail,jexec,jls} conf/root/usr/sbin/
cp proto/usr/bin/mktemp conf/root/usr/bin/

cp /etc/resolv.conf /jail/proto/etc/
touch /jail/conf/fstab.proto
cp /jail/proto/usr/share/zoneinfo/Region/Town /jail/proto/etc/localtime

touch conf/root/etc/rc.conf.local

nano conf/rc.conf.local

put this in ->
-----------------------------------------------------------------
### EXAMPLE - MODIFY TO FIT YOUR NEEDS ###
jail_enable="YES"
jail_list="proto"
jail_proto_rootdir="/jail/proto"
jail_proto_hostname="proto.domain.local"
jail_proto_ip="192.168.1.201"
jail_proto_interface="em0"
jail_proto_devfs_enable="YES"
jail_proto_mount_enable="YES"
jail_proto_fstab="/jail/conf/fstab.proto"
-------------------------------------------------------------------
nano /jail/conf/jail_start

Put this in ->
-------------------------------------------------------------------
mount_nullfs /mnt/NoX/jail /jail
mount_unionfs /jail/conf/root/etc/ /etc
mount_unionfs /jail/conf/root/usr/ /usr
rehash
#start all jails
/etc/rc.d/jail start
---------------------------------------------------------------------
chmod 777 /jail/conf/jail_start


Now i tried jail after rebooting with #jls and it didn't work. No ip precent. I tryed to backtrack and the only thing was the "mount_nullfs /NoX/data/jail /jail " line. One other thing my NAS i connected to a router with DHCP config.
Last edited by Mizma on 03 Feb 2013 23:24, edited 1 time in total.

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Jail Install

Post by alexey123 »

jail_proto_interface="em0"

Check your server interface name. 2 ways:
  • Nas4Free menu Network|Interface Management
    ifconfig
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: Jail Install

Post by raulfg3 »

Mizma wrote:mkdir /jail
mkdir /mnt/NoX/jail
mkdir /mnt/NoX/jail/{work,proto,conf}
mount_nullfs /NoX/data/jail /jail #I dont recall if this line worked but if i try it aftervards it does'nt
Bad, in line = mount_nullfs /NoX/data/jail /jail

must be

Code: Select all

mount_nullfs /mnt/NoX/jail /jail 
repeat step from this point

Your jail:start is bad too, use one described in wiki unless you know what do.

Code: Select all

#!/bin/tcsh -x
#mounting to /jail
mkdir /jail
mount_nullfs /mnt/NoX/jail /jail
# copy jail binaries to /usr, not needed if N4F is 454 or up
# because Daoyama include needed files, uncoment if you use low .454 version
# cp -r /jail/conf/root/ /
# link config files to /etc
ln -s /jail/conf/rc.conf.local /etc
#start all jails
/etc/rc.d/jail start
notice that I correct mount-nullfs to your need

PD: answer question of Alexey123 your interface MUST be YOUR interface not em0 used in wiki (can be er0, ef0, etc... depends yours chipset)
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Jail Install

Post by alexey123 »

Also you not need jail binaries if you use 457 or higher version
This lines not need in startup script

Code: Select all

mount_unionfs /jail/conf/root/etc/ /etc
mount_unionfs /jail/conf/root/usr/ /usr
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

Mizma
experienced User
experienced User
Posts: 79
Joined: 02 Feb 2013 15:53
Status: Offline

Re: Jail Install

Post by Mizma »

I had
jail_proto_interface="re0"
in config "rc.conf.local" in Nas4Free menu Network|Interface Management it says the same (copy paste before 'em0')
---------------------------
ifconfig
nas4free:/mnt/NoX/jail# ifconfig
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAS
T,WOL_MCAST,WOL_MAGIC,LINKSTATE>
ether 50:46:5d:9f:8c:b8
inet 192.168.1.100 netmask 0xffffff00 broadcast 192.168.1.255
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
ipfw0: flags=8801<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
----------------------------------------------
and the line mount_nullfs line givs this:

nas4free:/# mount_nullfs /mnt/NoX/jail /jail
mount_nullfs: /jail: No such file or directory

Mizma
experienced User
experienced User
Posts: 79
Joined: 02 Feb 2013 15:53
Status: Offline

Re: Jail Install

Post by Mizma »

#!/bin/tcsh -x
#mounting to /jail
mkdir /jail <-this line makes a directory in root called jail is it supposed to be this wy in embedded aswell?
mount_nullfs /mnt/NoX/jail /jail
# copy jail binaries to /usr, not needed if N4F is 454 or up
# because Daoyama include needed files, uncoment if you use low .454 version
# cp -r /jail/conf/root/ /
# link config files to /etc
ln -s /jail/conf/rc.conf.local /etc
#start all jails
/etc/rc.d/jail start

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Jail Install

Post by alexey123 »

Add to nas4free /etc/rc.conf

Code: Select all

rc_debug="YES"
rc_info="YES"
And try to run jail manually

Code: Select all

/etc/rc.d/jail start
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

Mizma
experienced User
experienced User
Posts: 79
Joined: 02 Feb 2013 15:53
Status: Offline

Re: Jail Install

Post by Mizma »

added settings:
Image
Rebooted

Mizma
experienced User
experienced User
Posts: 79
Joined: 02 Feb 2013 15:53
Status: Offline

Re: Jail Install

Post by Mizma »

running
/etc/rc.d/jail start
--->

nas4free:/# /etc/rc.d/jail start
/etc/rc.d/jail: DEBUG: checkyesno: jail_enable is set to YES.
/etc/rc.d/jail: DEBUG: run_rc_command: start_precmd: jail_prestart
/etc/rc.d/jail: DEBUG: checkyesno: jail_parallel_start is set to NO.
/etc/rc.d/jail: DEBUG: run_rc_command: doit: jail_start
Configuring jails:/etc/rc.d/jail: DEBUG: checkyesno: jail_set_hostname_allow is
set to YES.
/etc/rc.d/jail: DEBUG: checkyesno: jail_socket_unixiproute_only is set to YES.
/etc/rc.d/jail: DEBUG: checkyesno: jail_sysvipc_allow is set to NO.
.
Starting jails:.

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Jail Install

Post by alexey123 »

when you start to built jail you wrote
mkdir /jail
mkdir /mnt/NoX/jail
mkdir /mnt/NoX/jail/{work,proto,conf}
mount_nullfs /NoX/data/jail /jail #I dont recall if this line worked but if i try it aftervards it does'nt
Check, if you have any files on

Code: Select all

/mnt/NoX/data/jail
I have such start log
~# /etc/rc.d/jail start proto
/etc/rc.d/jail: DEBUG: checkyesno: jail_enable is set to YES.
/etc/rc.d/jail: DEBUG: run_rc_command: start_precmd: jail_prestart
/etc/rc.d/jail: DEBUG: checkyesno: jail_parallel_start is set to YES.
/etc/rc.d/jail: DEBUG: run_rc_command: doit: jail_start
Configuring jails:/etc/rc.d/jail: DEBUG: checkyesno: jail_set_hostname_allow is set to YES.
/etc/rc.d/jail: DEBUG: checkyesno: jail_socket_unixiproute_only is set to NO.
/etc/rc.d/jail: DEBUG: checkyesno: jail_sysvipc_allow is set to NO.
.
Starting jails:/etc/rc.d/jail: DEBUG: proto devfs enable: YES
/etc/rc.d/jail: DEBUG: proto fdescfs enable: NO
/etc/rc.d/jail: DEBUG: proto procfs enable: NO
/etc/rc.d/jail: DEBUG: proto mount enable: YES
/etc/rc.d/jail: DEBUG: proto hostname: proto.local
/etc/rc.d/jail: DEBUG: proto ip: 10.0.0.5
/etc/rc.d/jail: DEBUG: proto interface: vr0
/etc/rc.d/jail: DEBUG: proto fib:
/etc/rc.d/jail: DEBUG: proto root: /jail/proto
/etc/rc.d/jail: DEBUG: proto devdir: /jail/proto/dev
/etc/rc.d/jail: DEBUG: proto fdescdir: /jail/proto/dev/fd
/etc/rc.d/jail: DEBUG: proto procdir: /jail/proto/proc
/etc/rc.d/jail: DEBUG: proto ruleset:
/etc/rc.d/jail: DEBUG: proto fstab: /jail/fstab.proto
/etc/rc.d/jail: DEBUG: proto exec start: /bin/sh /etc/rc
/etc/rc.d/jail: DEBUG: proto exec stop: /bin/sh /etc/rc.shutdown
/etc/rc.d/jail: DEBUG: proto flags: -l -U root -n proto
/etc/rc.d/jail: DEBUG: proto consolelog: /var/log/jail_proto_console.log
/etc/rc.d/jail: DEBUG: checkyesno: _mount is set to YES.
/etc/rc.d/jail: INFO: Mounting fstab for jail proto (/jail/fstab.proto)
/etc/rc.d/jail: DEBUG: checkyesno: _devfs is set to YES.
/etc/rc.d/jail: INFO: Mounting devfs on /jail/proto/dev
/etc/rc.d/jail: DEBUG: reading rulesets from file (/etc/defaults/devfs.rules)
/etc/rc.d/jail: DEBUG: found ruleset: devfsrules_hide_all=1
/etc/rc.d/jail: DEBUG: adding rule (add hide)
/etc/rc.d/jail: DEBUG: found ruleset: devfsrules_unhide_basic=2
/etc/rc.d/jail: DEBUG: adding rule (add path log unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path null unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path zero unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path crypto unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path random unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path urandom unhide)
/etc/rc.d/jail: DEBUG: found ruleset: devfsrules_unhide_login=3
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyp*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyq*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyr*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptys*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyP*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyQ*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyR*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyS*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyl*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptym*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyn*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyo*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyL*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyM*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyN*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyO*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyp*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyq*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyr*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttys*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyP*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyQ*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyR*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyS*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyl*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttym*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyn*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyo*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyL*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyM*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyN*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyO*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path ptmx unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path pts unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'pts/*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path fd unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'fd/*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path stdin unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path stdout unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path stderr unhide)
/etc/rc.d/jail: DEBUG: found ruleset: devfsrules_jail=4
/etc/rc.d/jail: DEBUG: adding rule (add include $devfsrules_hide_all)
/etc/rc.d/jail: DEBUG: adding rule (add include $devfsrules_unhide_basic)
/etc/rc.d/jail: DEBUG: adding rule (add include $devfsrules_unhide_login)
/etc/rc.d/jail: DEBUG: adding rule (add path zfs unhide)
/etc/rc.d/jail: DEBUG: devfs_rulesets_from_file: no such file (/etc/devfs.rules)
/etc/rc.d/jail: DEBUG: devfs_init_rulesets: devfs rulesets initialized
/etc/rc.d/jail: DEBUG: devfs_domount(): mount-point is (/jail/proto/dev), ruleset is (devfsrules_jail)
/etc/rc.d/jail: DEBUG: devfs_init_rulesets: devfs rulesets already initialized
/etc/rc.d/jail: DEBUG: devfs_set_ruleset: setting ruleset (4) on mount-point (/jail/proto/dev)
/etc/rc.d/jail: DEBUG: checkyesno: _fdescfs is set to NO.
/etc/rc.d/jail: DEBUG: checkyesno: _procfs is set to NO.
proto.local.
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

Mizma
experienced User
experienced User
Posts: 79
Joined: 02 Feb 2013 15:53
Status: Offline

Re: Jail Install

Post by Mizma »

its a lot of files (all those unpacked i guess)

Changed jail_start to:
#!/bin/tcsh -x
#mounting to /jail
mkdir /jail
mount_nullfs /mnt/NoX/
#Attach jail files to
rehash
#start all jails
/etc/rc.d/jail start

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Jail Install

Post by alexey123 »

execute
ls /jail -l
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

Mizma
experienced User
experienced User
Posts: 79
Joined: 02 Feb 2013 15:53
Status: Offline

Re: Jail Install

Post by Mizma »

Last login: Sun Feb 3 12:43:43 2013
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
The Regents of the University of California. All rights reserved.

Welcome to NAS4Free!
nas4free:~# /etc/rc.d/jail start
/etc/rc.d/jail: DEBUG: checkyesno: jail_enable is set to YES.
/etc/rc.d/jail: DEBUG: run_rc_command: start_precmd: jail_prestart
/etc/rc.d/jail: DEBUG: checkyesno: jail_parallel_start is set to NO.
/etc/rc.d/jail: DEBUG: run_rc_command: doit: jail_start
Configuring jails:/etc/rc.d/jail: DEBUG: checkyesno: jail_set_hostname_allow is
set to YES.
/etc/rc.d/jail: DEBUG: checkyesno: jail_socket_unixiproute_only is set to YES.
/etc/rc.d/jail: DEBUG: checkyesno: jail_sysvipc_allow is set to NO.
.
Starting jails:/etc/rc.d/jail: DEBUG: proto devfs enable: YES
/etc/rc.d/jail: DEBUG: proto fdescfs enable: NO
/etc/rc.d/jail: DEBUG: proto procfs enable: NO
/etc/rc.d/jail: DEBUG: proto mount enable: YES
/etc/rc.d/jail: DEBUG: proto hostname: proto.domain.local
/etc/rc.d/jail: DEBUG: proto ip: 192.168.1.201
/etc/rc.d/jail: DEBUG: proto interface: re0
/etc/rc.d/jail: DEBUG: proto fib:
/etc/rc.d/jail: DEBUG: proto root: /jail/proto
/etc/rc.d/jail: DEBUG: proto devdir: /jail/proto/dev
/etc/rc.d/jail: DEBUG: proto fdescdir: /jail/proto/dev/fd
/etc/rc.d/jail: DEBUG: proto procdir: /jail/proto/proc
/etc/rc.d/jail: DEBUG: proto ruleset:
/etc/rc.d/jail: DEBUG: proto fstab: /jail/conf/fstab.proto
/etc/rc.d/jail: DEBUG: proto exec start: /bin/sh /etc/rc
/etc/rc.d/jail: DEBUG: proto exec stop: /bin/sh /etc/rc.shutdown
/etc/rc.d/jail: DEBUG: proto flags: -l -U root
/etc/rc.d/jail: DEBUG: proto consolelog: /var/log/jail_proto_console.log
/etc/rc.d/jail: DEBUG: checkyesno: _mount is set to YES.
/etc/rc.d/jail: INFO: Mounting fstab for jail proto (/jail/conf/fstab.proto)
/etc/rc.d/jail: DEBUG: checkyesno: _devfs is set to YES.
/etc/rc.d/jail: INFO: Mounting devfs on /jail/proto/dev
/etc/rc.d/jail: DEBUG: reading rulesets from file (/etc/defaults/devfs.rules)
/etc/rc.d/jail: DEBUG: found ruleset: devfsrules_hide_all=1
/etc/rc.d/jail: DEBUG: adding rule (add hide)
/etc/rc.d/jail: DEBUG: found ruleset: devfsrules_unhide_basic=2
/etc/rc.d/jail: DEBUG: adding rule (add path log unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path null unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path zero unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path crypto unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path random unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path urandom unhide)
/etc/rc.d/jail: DEBUG: found ruleset: devfsrules_unhide_login=3
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyp*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyq*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyr*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptys*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyP*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyQ*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyR*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyS*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyl*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptym*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyn*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyo*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyL*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyM*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyN*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ptyO*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyp*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyq*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyr*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttys*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyP*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyQ*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyR*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyS*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyl*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttym*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyn*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyo*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyL*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyM*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyN*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'ttyO*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path ptmx unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path pts unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'pts/*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path fd unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path 'fd/*' unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path stdin unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path stdout unhide)
/etc/rc.d/jail: DEBUG: adding rule (add path stderr unhide)
/etc/rc.d/jail: DEBUG: found ruleset: devfsrules_jail=4
/etc/rc.d/jail: DEBUG: adding rule (add include $devfsrules_hide_all)
/etc/rc.d/jail: DEBUG: adding rule (add include $devfsrules_unhide_basic)
/etc/rc.d/jail: DEBUG: adding rule (add include $devfsrules_unhide_login)
/etc/rc.d/jail: DEBUG: adding rule (add path zfs unhide)
/etc/rc.d/jail: DEBUG: devfs_rulesets_from_file: no such file (/etc/devfs.rules)
/etc/rc.d/jail: DEBUG: devfs_init_rulesets: devfs rulesets initialized
/etc/rc.d/jail: DEBUG: devfs_domount(): mount-point is (/jail/proto/dev), rulese
t is (devfsrules_jail)
/etc/rc.d/jail: DEBUG: devfs_init_rulesets: devfs rulesets already initialized
/etc/rc.d/jail: DEBUG: devfs_set_ruleset: setting ruleset (4) on mount-point (/j
ail/proto/dev)
/etc/rc.d/jail: DEBUG: checkyesno: _fdescfs is set to NO.
/etc/rc.d/jail: DEBUG: checkyesno: _procfs is set to NO.
/etc/rc.d/jail: DEBUG: checkyesno: _fdescfs is set to NO.
/etc/rc.d/jail: DEBUG: checkyesno: _devfs is set to YES.
/etc/rc.d/jail: DEBUG: checkyesno: _procfs is set to NO.
/etc/rc.d/jail: DEBUG: checkyesno: _mount is set to YES.
cannot start jail "proto":
jail: exec /bin/sh: Exec format error
jail: /bin/sh /etc/rc: failed
.
nas4free:~#

Mizma
experienced User
experienced User
Posts: 79
Joined: 02 Feb 2013 15:53
Status: Offline

Re: Jail Install

Post by Mizma »

nas4free:/mnt/NoX# ls /jail -l
ls: -l: No such file or directory
/jail:
conf proto work

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Jail Install

Post by alexey123 »

Mizma wrote:nas4free:/mnt/NoX# ls /jail -l
ls: -l: No such file or directory
/jail:
conf proto work
Ok
Now check

Code: Select all

ls -lo /jail/proto
I have
~# ls -lo /jail/proto
total 73
-rw-r--r-- 2 root wheel - 1014 Dec 4 09:08 .cshrc
-rw-r--r-- 2 root wheel - 256 Dec 4 09:08 .profile
-r--r--r-- 1 root wheel - 6203 Dec 4 09:08 COPYRIGHT
drwxr-xr-x 2 root wheel - 1024 Dec 4 09:07 bin
drwxr-xr-x 7 root wheel - 1024 Dec 4 09:08 boot
dr-xr-xr-x 7 root wheel - 512 Feb 3 15:33 dev
drwxr-xr-x 20 root wheel - 2048 Feb 2 14:38 etc
lrwxr-xr-x 1 root wheel - 8 Jan 28 13:08 home -> usr/home
drwxr-xr-x 3 root wheel - 1536 Dec 4 09:07 lib
drwxr-xr-x 3 root wheel - 512 Dec 4 09:07 libexec
drwxr-xr-x 2 root wheel - 512 Dec 4 09:06 media
drwxr-xr-x 2 root wheel - 512 Dec 4 09:06 mnt
dr-xr-xr-x 2 root wheel - 512 Dec 4 09:06 proc
drwxr-xr-x 2 root wheel - 2560 Dec 4 09:07 rescue
drwxr-xr-x 5 root wheel - 512 Feb 2 14:40 root
drwxr-xr-x 2 root wheel - 2560 Dec 4 09:08 sbin
lrwxr-xr-x 1 root wheel - 11 Dec 4 09:08 sys -> usr/src/sys
drwxrwxrwt 6 root wheel - 512 Feb 3 15:33 tmp
drwxr-xr-x 16 root wheel - 512 Jan 28 13:08 usr
drwxr-xr-x 26 root wheel - 512 Feb 3 15:33 var
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

Mizma
experienced User
experienced User
Posts: 79
Joined: 02 Feb 2013 15:53
Status: Offline

Re: Jail Install

Post by Mizma »

I have
~# ls -lo /jail/proto
total 76
-rw-r--r-- 2 root wheel - 1014 Dec 4 08:34 .cshrc
-rw-r--r-- 2 root wheel - 256 Dec 4 08:34 .profile
-r--r--r-- 1 root wheel - 6203 Dec 4 08:34 COPYRIGHT
drwxr-xr-x 2 root wheel - 1024 Dec 4 08:33 bin
drwxr-xr-x 7 root wheel - 1024 Dec 4 08:34 boot
dr-xr-xr-x 2 root wheel - 512 Dec 4 08:32 dev
drwxr-xr-x 20 root wheel - 2048 Feb 2 16:11 etc
drwxr-xr-x 3 root wheel - 1536 Dec 4 08:33 lib
drwxr-xr-x 3 root wheel - 512 Feb 2 16:04 libexec
drwxr-xr-x 2 root wheel - 512 Dec 4 08:32 media
drwxr-xr-x 2 root wheel - 512 Dec 4 08:32 mnt
dr-xr-xr-x 2 root wheel - 512 Dec 4 08:32 proc
drwxr-xr-x 2 root wheel - 2560 Dec 4 08:33 rescue
drwxr-xr-x 2 root wheel - 512 Dec 4 08:34 root
drwxr-xr-x 2 root wheel - 2560 Dec 4 08:34 sbin
lrwxr-xr-x 1 root wheel - 11 Dec 4 08:34 sys -> usr/src/sys
drwxrwxrwt 2 root wheel - 512 Dec 4 08:32 tmp
drwxr-xr-x 14 root wheel - 512 Dec 4 08:34 usr
drwxr-xr-x 23 root wheel - 512 Dec 4 08:32 var

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Jail Install

Post by alexey123 »

May be you use wrong binaries as here ?
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

Mizma
experienced User
experienced User
Posts: 79
Joined: 02 Feb 2013 15:53
Status: Offline

Re: Jail Install

Post by Mizma »

A good idee to try this path.
I have a intel i3 x64 processor
And then i need both base.txz and lib32.txz.
This files:
Index för ftp://ftp.freebsd.org/pub/FreeBSD/relea ... 1-RELEASE/

Downloding them direktly to work bur how do i proceed now? do i need to erace the old ones or just run
tar xvf /jail/work/base.txz -C /jail/proto/
tar xvf /jail/work/lib32.txz -C /jail/proto/

Mizma
experienced User
experienced User
Posts: 79
Joined: 02 Feb 2013 15:53
Status: Offline

Re: Jail Install

Post by Mizma »

its 2 files on the ftp
the one i used
ftp://ftp.freebsd.org/pub/FreeBSD/relea ... 1-RELEASE/
and
ftp://ftp.freebsd.org/pub/FreeBSD/relea ... 1-RELEASE/
are those the same or with one to chose?

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Jail Install

Post by alexey123 »

The some file, just linked.
Do you have x64 nas4free ?
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

Mizma
experienced User
experienced User
Posts: 79
Joined: 02 Feb 2013 15:53
Status: Offline

Re: Jail Install

Post by Mizma »

Yes its a new built system with a Intel i3 processor. But then again it says in webgui :
Image

Mizma
experienced User
experienced User
Posts: 79
Joined: 02 Feb 2013 15:53
Status: Offline

Re: Jail Install

Post by Mizma »

As you see it only says "x86-embedded on I......" Does this indicate that I have installed the wrong realese not the 64 bit wersion?

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Jail Install

Post by alexey123 »

i3 must work on x64.
Do you add binaries for 32 bit? You need download and extract it
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Jail Install

Post by alexey123 »

I see in your debug strangle

Code: Select all

/etc/rc.d/jail: DEBUG: devfs_init_rulesets: devfs rulesets already initialized                                  ^
/etc/rc.d/jail: DEBUG: devfs_set_ruleset: setting ruleset (4) on mount-point (/jail/proto/dev)                  |
/etc/rc.d/jail: DEBUG: checkyesno: [color=#BF0000]_fdescfs[/color] is set to NO.    1 time                      |
/etc/rc.d/jail: DEBUG: checkyesno:[color=#004040] _procfs[/color] is set to NO.      1 time                     |
/etc/rc.d/jail: DEBUG: checkyesno: [color=#BF0000]_fdescfs[/color] is set to NO.     2 time                     |
/etc/rc.d/jail: DEBUG: checkyesno: _devfs is set to YES.   Why?  Why it ask second time?  ------------>>> --
/etc/rc.d/jail: DEBUG: checkyesno: [color=#004040]_procfs[/color] is set to NO.   2 time
/etc/rc.d/jail: DEBUG: checkyesno: _mount is set to YES.
cannot start jail "proto":
jail: exec /bin/sh: Exec format error
Wait for fsbruva will check, he have x-64 cpu.
Check also sizes for
/usr/sbin/jail
/etc/rc.d/jail
/usr/bin/mktemp
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

Mizma
experienced User
experienced User
Posts: 79
Joined: 02 Feb 2013 15:53
Status: Offline

Re: Jail Install

Post by Mizma »

I redo the whole installation of nas4free i need to confirm which file i used.

Mizma
experienced User
experienced User
Posts: 79
Joined: 02 Feb 2013 15:53
Status: Offline

Re: Jail Install

Post by Mizma »

I thougt that i had installed the 64 bit wersion but was wrong about that. After reinstall of nas4free with 64bit vertion jail started to work :D

Thaks for the help

Mizma
experienced User
experienced User
Posts: 79
Joined: 02 Feb 2013 15:53
Status: Offline

Re: Jail Install

Post by Mizma »

Do i have to have a static ip for the jail to be anable to acces internet from inside the jail? Or how do I set up the ip for connection against a DHCP-server??

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: [SOLVED] Jail Install

Post by alexey123 »

If you want to use DHCP, you need have full DHCP server. It need to know set IP adress not only for mac, it need know give ip for mac+hostname.
Better way DNS+DHCP.
Also inside jail you need activate DHCP client. I try this way, it work, but I revert settings to ststic IP.

Your jail begin to work? Edit your first post as solved, pls
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

Post Reply

Return to “Jails”