# bind98 + openssl1.0.0 + chroot = issues



## razixx (May 30, 2011)

Hi guys, I'm trying my hand at getting named running with ports and am running into issues. I've got bind98 built with openssl and 
	
	



```
REPLACE_BASE=YES
```

When I try and run in chroot I get this error:

```
May 29 18:14:07 watcher chris: /etc/rc.d/named: WARNING: failed to start named
May 29 18:21:07 watcher named[59095]: starting BIND 9.8.0-P2 -t /var/named -u bind
May 29 18:21:07 watcher named[59095]: built with '--localstatedir=/var' '--disable-linux-caps' '--disable-symtable' '--with-
randomdev=/dev/random' '--with-openssl=/usr/local' '--with-libxml2=/usr/local' '--without-idn' '--enable-threads' '--sysconfdir=/etc/namedb'
 '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info/' '--build=i386-portbld-freebsd8.2' 'build_alias=i386-portbld-freebsd8.2'
 'CC=cc' 'CFLAGS=-O2 -pipe -fno-strict-aliasing' 'LDFLAGS= -rpath=/usr/local/lib' 'CPPFLAGS=' 'CPP=cpp' 'CXX=c++' 'CXXFLAGS=-O2 -pipe
 -fno-strict-aliasing'
May 29 18:21:07 watcher named[59095]: initializing DST: openssl failure
May 29 18:21:07 watcher named[59095]: exiting (due to fatal error
```

When run with 
	
	



```
echo 'named_chrootdir=""' >> /etc/rc.conf
```
named works as expected

```
May 29 19:20:29 watcher named[6566]: running
```

So something must be missing in the chroot, the question is what and how do I get it there? :e


----------



## razixx (May 30, 2011)

I'm going to try using the version of bind included in the base install with openssl-1.0.0 tonight to see if things work any differently.  I'll report back with my findings.  I probably should have just used the base install in the first place.


----------



## razixx (May 31, 2011)

Ok so I've got my installation going, not with bind98 however.
`# pkg_delete bind98-base-9.8.0.2`
`# cd /usr/ports/dns/bind96`
`# make REPLACE_BASE=yes install clean`

Using the exact same config files from the last install, everything started up just fine in the chroot environment.

```
dns1# /etc/rc.d/named start
Starting named.
```

No errors.


----------



## Ian (May 31, 2011)

Hi fella..

Had the same issue a few mins ago myself. My chroot is /var/named.

I installed bind98 from ports the same as you did, then:


```
cd /var/named
mkdir usr
mkdir usr/lib
cd usr/lib
cp -r /usr/lib/engines .

/usr/sbin/named -c /etc/namedb/named.conf -t /var/named -u bind
```


My bind is back up and running 


HTH.



Cheers..

Ian


----------



## razixx (Jun 1, 2011)

Hey thanks buddy, I'll give this a try later.


----------

