Page 1 of 1

Install jail do not auto run

Posted: 17 Jan 2013 03:13
by luxv
i install jail with WIKI,The following is my installation process :
1)in System|Advanced|rc.conf add a variable named jail_enable and use value = YES

2)
mkdir /jail
mkdir /mnt/data/jail
mkdir /mnt/data/jail/{work,proto,conf}
mount_nullfs /mnt/data/jail /jail
cd /jail/work
tar xvf /jail/work/base.txz -C /jail/proto/
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/
# cp /jail/proto/usr/share/zoneinfo/Europe/Berlin /jail/proto/etc/localtime
# touch /jail/conf/fstab.proto
mkdir /jail/proto/mnt/Video
mkdir /mnt/data/Video
nano /jail/conf/fstab.proto <--"/mnt/data/Video /jail/proto/mnt/Video nullfs ro 0 0"
无标题.jpg
# touch conf/rc.conf.local
# nano conf/rc.conf.local
{### EXAMPLE - MODIFY TO FIT YOUR NEEDS ###
jail_enable="YES" # enable jails YES|NO
jail_list="proto" # name of the jails to start "proto http://www...
jail_proto_rootdir="/jail/proto" # path to our jail
jail_proto_hostname="proto.domain.local" # hostname
jail_proto_ip="192.168.124.201" # ip of the jail
jail_proto_interface="em0" # 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}

# nano /jail/conf/jail_start
{#!/bin/tcsh -x
mkdir /jail
mount_nullfs /mnt/data/jail /jail
ln -s /jail/conf/rc.conf.local /etc
/etc/rc.d/jail start}
# chmod 755 /jail/conf/jail_start
in System|Advanced|Command Scripts: add a Command Scripts "/mnt/data/jail/conf/jail_start " and Type: "PostInit "
2.jpg
but i reboot N4F,jail not auto run,It must be I run "/ MNT/data/jail/conf/jail_start" script.
My installation process where did we go wrong?How can automatic startup jail?

Re: Install jail do not auto run

Posted: 17 Jan 2013 04:50
by DanAddz
is your mnt called data??

Re: Install jail do not auto run

Posted: 17 Jan 2013 15:47
by luxv
Yes,I mount HDD on mnt ,the HDD name called data,the N4F is x86-full