[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [ezjail] start/stop script broken on latest 9-STABLE



Now that the dust has settled and our jails can start at boot-time, its
time to buildworld and update our jails using 
	ezjail-admin update -I

Unfortunately, if you're tracking FreeBSD9.0Stable, you might find your
jails not starting due to a missing symbol,
	/bin/sh: Undefined symbol "_ThreadRuneLocale"jail: /bin/sh /etc/rc:
failed
This is due to libc.so not being updated in the basejails, because it has
the flag schg set. In fact there are a few friends in /lib that also aren't
being updated for the same reason.

To get things working after you've updated your basejail you'll need to:
(please substitute where your jails are, mine are in /usr/jails/JAILBASE)
	chflags noschg /usr/jails/JAILBASE/lib/libc.so.7
/usr/jails/JAILBASE/lib/libcrypt.so.5
	chflags noschg /usr/jails/JAILBASE/lib/libthr.so.3 

Then copy from your base system files into your basejail, e.g
	cp /lib/libc.so.7 /lib/libcrypt.so.* /lib/libthr.so.*
/usr/jails/JAILBASE/lib/
A quick kludge, will get you going again

So to the cause: ezjail-admin has a routine ezjail_splitworld for updating
& ezjail_dirlist is  correctly set and used to chflags -R noschg, yet
something seems to be locking these specific files?  The rest of lib is
being updated...  I have multiple basejails, and one of them contains:
	-r-xr-xr-x  1 root  wheel  schg 394492 Feb 12 08:47
/usr/jails/bj2/sbin/init
	-r-xr-xr-x  1 root  wheel  schg 217604 Feb 12 08:47
/usr/jails/bj2/libexec/ld-elf.so.1
Clearly the problem isn't confined to /lib.  Because things are happening
pretty quickly its easy to miss, messages like:

/usr/jails/bj1/lib/libc.so.7cpio: lib/libc.so.7: Can't unlink
already-existing object: Operation not permitted

/usr/jails/bj1/lib/libcrypt.so.5cpio: lib/libcrypt.so.5: Can't unlink
already-existing object: Operation not permitted

I'm thankful for the changes at (on 22nd May)
http://svnweb.freebsd.org/base/stable/9/lib/libc/locale/setrunelocale.c?r1=
235785&r2=235784&pathrev=235785
That caused this discovery to be triggered, I did insert 
    chflags -R noschg ${ezjail_jailbase}/${dir}; 
at line 276 of ezjail-admin V3.2 and my jails are correctly updated.
Though I'll leave the resolution to someone technical.

Regards, Dewayne