Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Aug 2016 17:22:01 -0600
From:      James Gritton <jamie@freebsd.org>
To:        freebsd-jail@freebsd.org
Subject:   Re: jail not found error?
Message-ID:  <a0e6ebdc3ecff4c5a4cb64b429f43f31@gritton.org>
In-Reply-To: <4c2fb0fd-051c-5b80-018d-e3cbf91bd56d@gjunka.com>
References:  <4c2fb0fd-051c-5b80-018d-e3cbf91bd56d@gjunka.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2016-08-28 15:42, Grzegorz Junka wrote:
> I am trying to set up a Centos 6 jail. It fails with the following 
> error:
> 
> root@ultrabook:~ # service jail start centos6
> Starting jails: centos6jls: jail "centos6" not found
> .
> 
> I somehow managed to run it once by changing the start script from:
> 
> exec.start = "/bin/sh /etc/rc";
> 
> to
> 
> exec.start = "/etc/rc 3";
> 
> It started once but after I shut it down it shows the same error again
> wherever I am trying to start it. This is what I have configured so
> far:
> 
> root@ultrabook:~ # cat /etc/jail.conf
> # Use the rc scripts to start and stop jails. Mount jail's /dev.
> 
> #exec.start = "/bin/sh /etc/rc";
> #exec.stop = "/bin/sh /etc/rc.shutdown";
> exec.clean;
> 
> allow.mount;
> mount.devfs;
> mount.fstab = "/usr/local/etc/fstab/$name";
> devfs_ruleset = 4;
> 
> path = "/j/$name";
> host.hostname = "$name.ultrabook.yoonka.com";
> exec.consolelog = "/var/log/jail/$name";
> 
> centos6 {
>   exec.start = "/etc/rc 3";
>   ip4.addr = 127.0.2.1;
>   interface = lo0;
> }
> 
> 
> root@ultrabook:~ # cat /usr/local/etc/fstab/centos6
> linsys    /j/centos6/sys         linsysfs  rw 0 0
> linproc   /j/centos6/proc        linprocfs rw 0 0
> #tmpfs     /j/centos6/lib/init/rw tmpfs     rw,mode=777 0 0
> /devfs    /j/centos6/dev         devfs     rw,ruleset=4 0 0
> 
> I was following this example:
> 
> https://bluehatrecord.wordpress.com/2015/09/19/the-midnight-oil-jailing-centos6-in-freebsd-10-2/
> 
> but wanted to use the new configuration files. My system:
> 
> root@ultrabook:~ # uname -a
> FreeBSD ultrabook.yoonka.com 10.3-RELEASE FreeBSD 10.3-RELEASE #0
> r297264: Fri Mar 25 02:10:02 UTC 2016
> root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
> 
> How to fix or debug this 'jail "centos6" not found' error and start the 
> jail?
> 
> Grzegorz

I wonder if the jail exists as dying - does it show up in "jls -d"?

Also, for a verbose start, try "jail -v -c centos6".  That shows 
commands that are run when creating the jail, and may pinpoint where the 
trouble is.

- Jamie



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a0e6ebdc3ecff4c5a4cb64b429f43f31>