Re: Problems chrooting BIND 9.2.2 in a Solaris 8 box
From: Joseph Tam (tam_at_math.ubc.ca)
Date: Fri, 12 Mar 2004 14:22:27 -0800 (PST) To: GARCIA CABALLERO Jordi <Jordi.GARCIA@oami.eu.int>
On Thu, 11 Mar 2004, GARCIA CABALLERO Jordi wrote:
> Chrooting BIND 9.2.2 in a Solaris 8 02/2002 box, I get this weird error when
> running named in the jail:
> # /usr/sbin/chroot /export/home/dns /usr/local/sbin/named -u named
> What I see from the console
> Mar 11 18:26:15 oasv020 named: /etc/named.conf:16: change directory
> to '/dns/etc' failed: file not found
> Mar 11 18:26:15 oasv020 named: /etc/named.conf:16: parsing failed
> Mar 11 18:26:15 oasv020 named: loading configuration: file not found
> Mar 11 18:26:15 oasv020 named: exiting (due to fatal error)
I believe that chroot-ing from the command line will chroot the daemon
too early (i.e. before it has time to grab the prerequisite files) and
consequently, all file references are relative to the chroot jail directory.
You may be better off using the -t parameter and let named chroot itself.
I discovered this while playing around with trying to do exactly what
you were doing (chroot-ing right from the start -- it requires that
you set up all the dynamic library and /etc files beforehand or making
a statically linked executable, a grisly tasks). You may find this useful:
I have since moved on to using DJBDNS, which I recommend.
Joseph Tam <email@example.com>