Monday, September 10, 2012

NanoBSD 6.3 to 8.0 - what do I need to change?

Upgrading some NanoBSD boxes from FreeBSD 6.3 to 8.0, and adding BGP functionality along the way. A couple of config changes that are required:

Enable BGP

  1. add /cfg/local/bgpd.conf and edit to suit (hint: AS and IP addresses ought to match what is assigned for the site)
  2. add  openbgpd_enable="YES" to /cfg/rc.conf
  3. add _bgpd user account to /etc/passwd and /etc/group like this:

pw useradd "_bgpd" -u 130 -c "BGP Daemon" -d /var/empty -s /sbin/nologin
mount /cfg
cp /etc/group /cfg
cp /etc/passwd /cfg
cp /etc/pwd.db /cfg
cp /etc/spwd.db /cfg
mount -u -o ro / 

NTPD changes

On boot, ntpd fails to start with errors such as:

Starting ntpd.
ERROR:  only one configfile option allowed
ntpd - NTP daemon program - Ver. 4.2.4p5


In /cfg/rc.conf, change this:

ntpd_enable="YES"
ntpd_flags="-g -p /var/run/ntpd.pid -f /etc/ntpd.drift -c /etc/ntp.conf -t 3"


to this:

ntpd_enable="YES"
ntpd_config="/etc/ntp.conf"      # ntpd(8) configuration file
ntpd_flags="-p /var/run/ntpd.pid -f /etc/ntpd.drift -t 3"

Wireless access point

Change ath0 interface config from this:

ifconfig_ath0="ssid bsdbox media autoselect mode 11g mediaopt hostap up"

... to this...

wlans_ath0="wlan0"
create_args_wlan0="wlanmode hostap"
ifconfig_wlan0="ssid bsdbox media autoselect mode 11g mediaopt hostap up"


Edit /cfg/hostapd.conf and change interface=ath0 to interface=wlan0

Edit /cfg/rc.conf and change the bridge members so that ath0 is removed, and wlan0 added

Other stuff

  1. add "kern.maxfilesperproc=4096" to /cfg/sysctl.conf so that newer version of bind can start
Also, you can ignore all this stuff in dmesg:
FAILURE - READ_DMA status=51 error=10 LBA=15625215
ad0: FAILURE - READ_DMA status=51 error=10 LBA=15625215


Apparently it's just FreeBSD's way to tell you to relax and have fun :-) PfSense info on it over here

You can also relax about this error:
Starting named.
named[1302]: the working directory is not writable

That's because at boot, /etc/namedb/ isn't writable, but it becomes so when the mfs (RAM disk ) is mounted there. I think...

DMA and Ultra DMA

Transcend UDMA 16GB CF cards do not work reliably - they will not boot on power-up (this is in a Soekris net5501). I can get them to boot by letting boot fail, drop into COMBios over serial, issue a reboot, then and only then will it boot. I suspect this is related to DMA levels supported by the net5501. Obviously not reliable enough for our purposes, so I have ordered some DMA66 SanDisk 4GB cards.