Building ARM Packages with Poudriere (the simple way)..

August 25, 2015 by · Leave a Comment 

The current directions for building ARM packages are quite long and need to be updated. This is my work-in-progress directions until I get everything right and then I will update the documentation.

  1. Install poudriere and qemu-user-static: pkg install poudriere qemu-user-static
  2. Enable qemu-user-static in rc.conf: qemu_user_static_enable="YES"
  3. Run the startup script to configure your system for building different architectures: /usr/local/etc/rc.d/qemu_user_static start
  4. Create a ports tree to build: poudriere ports -c -m svn+https -p svn
  5. Create an ARM build jail. Note, this will take awhile: poudriere jail -c -j 11armv6 -v head -a arm.armv6 -m svn+https

Now you can test build whatever packages you want for your ARM device:
poudriere testport -j 11armv6 -p svn -o x11-wm/lxsession

Official Vagrant FreeBSD Images

August 7, 2015 by · 5 Comments 

I am very proud to announce that FreeBSD Vagrant images are now available.

For VMWare, create a Vagrantfile like so:

Vagrant.configure("2") do |config|
  config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true = "freebsd/FreeBSD-11.0-CURRENT" = "sh"

For VirtualBox, create a Vagrantfile like:

Vagrant.configure("2") do |config|
  config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true = "freebsd/FreeBSD-11.0-CURRENT" = "sh"
  config.vm.base_mac = "080027D14C66"

Then run:
vagrant up

On first boot the machine will come up and install missing pkgs and run freebsd-update if needed. Note that this can take a few minutes. If it fails to boot try using: vagrant up --no-destroy-on-error. On my 2004 iMac with a spinning disk it takes just over 3 minutes. On my mid 2014 MBP with a SSD it takes about 1 minute and 45 seconds. In the future we will reevaluate installing the missing packages on boot vs when the VM is built.

Note that you can replace `FreeBSD-11.0-CURRENT’ with `FreeBSD-10.0-RC2′ or others. To see a full list of versions available, check the Hashicorp Atlas website here:

Going forward:

  • All snapshots will include Vagrant images, so weekly updates of FreeBSD -STABLE branches and -CURRENT.
  • All future releases will including Vagrant images.

Fan Speed monitoring

January 18, 2015 by · 1 Comment 

Recently I moved a server into a proper cabinet with doors. After a few days I noticed the fans were spinning up and down. So I started investigating ways to monitor the fan speed. I figured having a graph of them long term would give me a nice way to show changes in the environment, beyond the temperature monitoring I am already doing.

I was not having much luck searching the Internet. Luckily, Darius on IRC pointed me to a project called bsdhwmon by Jeremy Chadwick, a fellow FreeBSD Developer. The server is running an older Supermicro X7SBi motherboard with a Winbond 83627HG chip which is listed on the supported page of bsdhwmon.

It was easy to setup:

  • Install bsdhwmon: pkg install bsdhwmon
  • Load the SMBus Controller driver for my motherboard: kldload ichsmb
  • Load the Generic SMB I/O Device driver: kldload smb

All I had to do from that point was run bsdhwmon:
# bsdhwmon
CPU1 Temperature 46 C
System Temperature 29 C
FAN1 10975 RPM
FAN2 11344 RPM
FAN3 7219 RPM
FAN4 7068 RPM
FAN6 11065 RPM
VcoreA 1.122 V
MCH Core 1.508 V
-12V -12.672 V
V_DIMM 1.808 V
+3.3V 3.296 V
+12V 11.904 V
5Vsb 5.046 V
5VDD 4.998 V
P_VTT 1.228 V
Vbat 3.312 V

It is important to remember to add the kernel modules to be loaded at boot. Adding the following to /boot/loader.conf will take care of that:

Note that ichsmb will load smbus, but not the smb kernel driver.

Now that I have the tools, I can monitor it at will.

Upgrading Graphite

March 17, 2014 by · Leave a Comment 

Recently swills@ upgraded Graphite and reconfigured how it works to fit more in to the FreeBSD file system layout.

So if you are upgrading from a graphite installation older than 0.9.12_1, you will need to follow the following instructions:

  1. Stop carbon
  2. Copy the old data from /usr/local/storage/whisper/* to /var/db/carbon/whisper/
  3. Copy the /usr/local/etc/carbon/carbon.conf.example over to carbon.conf
  4. Set the SECRET_KEY to something random in /usr/local/etc/graphite/
  5. Then follow the instructions after the install, including updating the httpd.conf per the message after the install
  6. Restart Carbon and Apache

Be careful that you do not miss any of the steps and you should have a working Graphite install.

Puppet + pkgng/poudriere

May 21, 2013 by · 1 Comment 

First thing we will need a clone of into /usr/local/etc/puppet/modules/.

This will be pushed out to the clients as long as: pluginsync = true

For me the next step is to create a manifests/init.pp in the new module directory. This is important to me because I want to sync out a /usr/local/etc/pkg.conf to all my machines so that they point to my internal poudriere repos. So I end up with something like this:

file { "/usr/local/etc/pkg.conf":
        mode => 755,
        owner => root,
        content => "packagesite: http://pkg/91-web/

Once that is done it is easy to use pkgng packages via:

package { "www/apache22":
        ensure => installed,
        provider => pkgng,
        require => File['/usr/local/etc/pkg.conf'],

BSDCan 2013 Talk: FreeBSD Birth to Death: Managing the Lifecycle of a FreeBSD Server

May 17, 2013 by · 2 Comments 

This is a bunch of links to the tools I talk about in my presenation





Config Management:
Salt Stack:





Serial Console:

Generic Resources:
FreeBSD Handbook:
Everything Sysadmin Blog:

The Importance of Serial Console

January 16, 2013 by · 2 Comments 

I have long been a huge fan of having serial console on my servers–it can really save the day when a mistake is made. Yesterday, one of my coworkers botched the sshd_config in an upgrade of a server, so the server came up fine, but without sshd. As a result, the system was not accessible for remote login via the network.

Over the years, I have done serial console in many ways. I began with a single null modem cable between the back of two servers. Next, I utilized a RocketPort multi-port serial card with 8 serial ports on it. These days, I have moved on to employing big serial console servers such as those made by OpenGear, providing up to 48 ports. They also have ancillary features such as providing a Nagios platform and Environmental monitoring.

No matter your physical connectivity, I recommend using Conserver. This helps by logging what is happening on the console, which can be very handy if you need to see what happened in the past whether it be a function of the system, or to see who did what. It also provides multi-user access, so you can watch while someone else is working and both of you can collaborate on fixing a problem.

In order for the previous technologies to be useful, the servers require configuration as well. The first step is to configure the BIOS for serial console redirection. Once this has been performed, the OS will need to be configured to present a console login via the serial port. The FreeBSD Handbook explains how to do this Here.

Scripted Install of FreeBSD 9

May 8, 2012 by · Leave a Comment 

Continuing in the theme of automation, here is a distilled guide on how I do an install on FreeBSD 9.

It is pretty basic, here are some of the highlights:

  1. GPT disk layout
  2. ZFS Only Install (which could be easily converted to UFS)
  3. The Script is nice and short!

PXE Booting FreeBSD 9

March 23, 2012 by · Leave a Comment 

I have thrown together a quick guide to get FreeBSD 9 to PXE Boot:

In FreeBSD 9, a few things have changed. If you have an old PXE environment from FreeBSD 8, you will want to make note of the following:

  • No more mfsroot.
  • Which means, no more changes to /boot/loader.conf, it should be empty infact.
  • You need the new pxeboot binary from 9, do not try using an old one.

anoncvs1/cvsup14 Update

March 23, 2012 by · Leave a Comment 

Just a quick note. I have cvsup14 running again, and has been for awhile.

Anoncvs I have not gotten around to setting up yet, hopefully soon.

Next Page »