Jails in FreeBSD 8.0

Hi all,

I have been getting a strange error when I attempt to start a jail in FreeBSD 8. In the jail's /var/log/messages file I'm getting the error:

Code:
Dec 14 23:45:52 jailname login: chflags(/dev/pts/1): No such file or directory
Dec 14 23:45:52 jailname login: chown(/dev/pts/1): No such file or directory

In my host system I can see that /dev is mounted in the jail:

Code:
host$ df -h
....
devfs                             1.0K    1.0K      0B   100%   /jails/jailname/dev
fdescfs                           1.0K    1.0K      0B   100%  /jails/jailname/dev/fd

and going to /jails/jailname/dev/pts on the host shows that there are two entries in that directory, 0 and 1.

Code:
host$ ls /jails/jailname/dev/pts
total 0
crw--w----  1 root  tty    0, 129 Dec 15 00:04 0
crw--w----  1 root  tty    0, 139 Dec 15 00:04 1

However, inside the jail:
Code:
jailname# ls /dev/pts
jailname#

Once it is booted, the jail runs normally, but booting takes a couple minutes. It has no third-party services in it (databases, webservers, mailservers, etc), so it wouldn't be hanging while they start.

The weird thing is that other jails on the same machine run perfectly fine - one jail has tomcat, apache & postgres running in it and it starts in under 10s. They don't have the /dev/pts error showing in their logs too.

I'm at a loss as to why this is happening. They are all running off the same basejail, created with ezjail-admin. I'm wondering if anyone has come across this, and if they have found a solution.
 
Not sure, I never use ezjails. I always make my own, it's not that hard. The jail(8) man page is pretty clear on how to do it.
 
Code:
Dec 14 23:45:52 jailname login: chflags(/dev/pts/1): No such file or directory
Dec 14 23:45:52 jailname login: chown(/dev/pts/1): No such file or directory
You can ignore this message. This message only occurs if you do a:
Code:
jexec 1 login -f root
--> as outlined is another thread, you don't have access to the pts device from your current login shell if you are using jexec. (your current pts is created in the host system and not in the jail.

Just use:
Code:
jexec 1 tcsh

Or if you are using ezjail change "ezjail_default_execute" in "ezjail.conf" to:
Code:
ezjail_default_execute=tcsh
(That's used in "ezjail-admin console jailname")


Once it is booted, the jail runs normally, but booting takes a couple minutes.
Well, if your problem is not related to the pts message.
(this message is only created if you "login" to a jail. Just read /var/log/messages" from outside a jail)
 
Thank you all for your responses. It's good to know that I can ignore that message.

It turns out that the startup delay was caused by something completely different. I had assigned the jail an IP that my network admin had told me was free, but it turns out something else already had it. :r

I changed it and it works beautifully now.
 
Back
Top