Archive for June, 2012

FreeBSD + Dell 12G + X520-DA2 10G NIC

June 30, 2012 2 comments

Intel 82599 based NICs on Dell 12G Servers w/ FreeBSD?

Dell offers the X520-DA2 10G Fiber NIC based on the Intel 82599 chipset for it’s 12G line of servers. It seems that there were two batches of this NIC manufactured. One batch was Dell branded, the other Intel branded.

According to this post, the FreeBSD source appears to be missing PCI ID’s etc that would enable the Dell branded card to work under FreeBSD on it’s 12G servers resulting in the card not being recognized by the OS. Inspection of dmesg shows that there is an ethernet card with no driver attached.

This is currently being corrected in HEAD, but for the time being swapping in an Intel branded equivalent which is seen by FreeBSD without a problem is sufficient. Unfortunately, the Dell BIOS does not recognize the card. having said that, the card is recognized in the OS and does work using the ixgbe(4) driver. The interface name begins with “ix”.

Categories: FreeBSD

Using screen to connect to serial ports

June 22, 2012 2 comments

Using screen to connect to serial ports

screen is cool. screen is an indespencable tool to any unix administrator. My challenge was to find a solution to connect to the serial port on a server chassis. The solution I found was to utilize a USB-Serial adapter (and associated Mac OS X Lion Driver), null modem cable, and rj45-db9 adapter in conjunction with screen.

screen, being a key tool in an administrator’s tool box, was found to have the capability of connecting to serial ports!

To connect to the serial port:

screen /dev/tty.PL2303-000013FD

Specifying baud rate:

screen /dev/tty.PL2303-000013FD 9600

Enabling CTS/RTS:

screen /dev/tty.PL2303-000013FD 9600,ctsrts

Terminate the session using screen command ^a,k


  • Your tty will likely differ. I was using a PL2303 based USB-Serial adapter within Mac OS X 10.7 (aka Lion)
  • A driver for this USB-Serial adapter were difficult to find, so I will link to it here
  • I downloaded the driver from here
Categories: Technical Miscellany

FreeBSD on HP Proliant DL360p G8 Servers

June 14, 2012 7 comments

The Problem

We received a number of the new HP Proliant DL360p G8 servers and aimed to give them a test run with multiple OS’. My goal was to install FreeBSD 8-STABLE (same as we’re testing on the Dell PowerEdge R620s).

Our provisioning platform utilizes a traditional PXE method with Linux and FreeBSD integrated. On my first attempt to PXE boot and install FreeBSD, the kernel panic’d when the network interface was brought up within sysinstall.

Turns out that the neither the BCM5719 nor BCM5720 ethernet controllers are fully supported in FreeBSD 8-STABLE as of this writing. However, the FreeBSD community is currently working on resolving this.

The Hardware

We were testing FreeBSD 8-STABLE (as of 21 May 2012) on the following configuration:

HP Proliant DL360p G8 w/ Smart Array i420 RAID Controller
Eight (8) 2.5″ 300GB SAS HDD

HP Proliant DL360p G8

The Resolution

As of this writing, the DL360p G8 ships only with a daughtercard based on the BCM5719. An Intel option is not yet available. So we ordered a PCIe NIC based on the Intel 82571 and removed the daughtercard from the motherboard then inserted the PCIe Intel NIC. We modified the BIOS settings to ensure the Intel NICs were bootable devices. This allowed us to PXE boot and build FreeBSD.

FreeBSD also supports the HP NC361T/Intel i350T2, both based on the Intel i350 controller. The downside with using a PCIe NIC is that a slot is removed as an expansion option.

Categories: FreeBSD

FreeBSD’s Package Index

June 1, 2012 1 comment

Interpreting the package INDEX

On some FreeBSD media, there is a package INDEX file which contains definitions for various FreeBSD and/or Ports packages. The following document describes the package INDEX file and its numerous nuances. This document was emailed to me by the author.

Author: Devin Teske
Date: 1 Jan 2006
Last modified: 24 Feb 2006


This file documents the file format of the /packages/INDEX file located on FreeBSD installation CD-ROMs and conveys what it is used for (and its importance).

The layout of this document is as follows:

  • Foreword
  • The INDEX File
    • The FreeBSD INDEX File Format
      • FreeBSD-5.2 and FreeBSD-4.10 or Lower
      • FreeBSD-5.3 and FreeBSD-4.11 or Higher
      • FreeBSD-6.0 or Higher
  • Field Definitions
  • Field Population
  • References


This document describes the format of the `/packages/INDEX’ file located on the FreeBSD installation CD-ROM. Depending on which FreeBSD release version you are working with, the format may vary. Documented below you will find 3 versions commonly used.

Common between each version, is that each line (delimited by the new-line character) corresponds to a single package (found in packages/All). It is possible to have additional fields beyond the last field (for custom purposes) as they will be ignored by sysinstall.

The INDEX File

The INDEX file (located on the FreeBSD installation CD-ROMs) is a file that is read by sysinstall (see sysinstall(8)) for the installation of ancillary packages (located in `/packages’). When sysinstall displays an interactive menu for the selection of these packages, it uses the INDEX file (located at `/packages/INDEX’) to display information such as the package name, the package description, and what categories to place it in.

If sysinstall is scripted, then the interactive menu may or may not be invoked (if not, then the categories/description fields may be omitted).

When sysinstall is in the process of installing the packages, it first makes sure that all the run-dependencies (listed in the INDEX file for that package) are installed. If a package that is listed in the `run-deps’ field is not installed, sysinstall installs it before installing the requested package. After installing any dependent packages (recursively), sysinstall then unpacks the requested package and reads its packing-list (the `+CONTENTS’ file within the package tarball). All package dependencies listed inside the package’s packing-list MUST be installed before-hand or else sysinstall will generate an error. Therefore, all package dependencies that appear in the packing list MUST be present in the `run-deps’ field of the INDEX file. There reverse is not true, however. A dependency may appear in the INDEX file and not in the package’s packing-list.

INDEX File Format

FreeBSD-5.2 and FreeBSD-4.10 or Lower


FreeBSD-5.3 and FreeBSD-4.11 or Higher


I have never seen the 11th, 12th, or 13th field populated. So their purpose remains unknown.

FreeBSD-6.0 or Higher


Field Definitions

Field Comments
package This is the name of the package. This should be the name of the file as it appears in packages/All without the .tgz suffix. This value is used for finding the package tarball and is also displayed in the left-hand column of the interactive package selection menu of sysinstall.
port-origin The package origin (as a qualified pathname). Basically, this is the origin of the package with a /usr/ports/ prefix. Even if you do not install the Ports Collection (which installs Makefiles and other information), this should be populated respectively.
install-prefix The base directory where the package will install it’s files to. For example, if the package installs files into /usr/local/bin and /usr/local/sbin then the install-prefix would be /usr/local. This is an informational value (the package’s packing-list takes precedence).
comment This is the one-line comment for the package. This should be the same as the contents of the +COMMENT file located within the package tarball. This value is displayed in the right-hand column of the interactive package selection menu of sysinstall.
desc-file When you install the Ports Collection the /usr/ports directory is populated with Makefiles and other information. This value should be the path to the description file for the package. This is only used when you install the FreeBSD Ports Collection.
maintainer The e-mail address of the package maintainer.
categories Within the /packages directory of the CD-ROM, you will find (besides the INDEX file) several directories. The actual package should always reside in theAll directory (as this is where sysinstall looks for it). However, finding the package you want/need can become quite cumbersome if you have to sift through every package in one directory. To ease the process of finding a specific package, you can populate this field with several categories (sub-directories) that the package can be found in.

When sysinstall’s interactive package selection menu is invoked (either by a script or simply interactively) it allows a user to browse several categories to find a specific package. This field dictates to sysinstall which categories (delimited by a space) the package is available in.

When you specify a category (sub-directory), the simplest (and most efficient) thing to do is, create a symbolic link in the category directory (in /packages) pointing to the actual package (in /packages/All).

build-deps These are the dependencies (names of packages delimited by a space) that this package requires to bebuilt. This is used if you install the FreeBSD Ports Collection.
run-deps These are the dependencies (names of packages delimited by a space) that this package requires to run. Any package listed here will be installed by sysinstall before the package is even attempted to be installed. See section 2 paragraph 3 for more information.
www-site Either the website URL of where the package can be obtained, the package maintainer, or the website URL of the item that the package installs.
unknown If a field has been marked `unknown’ in section 3, it is because I have never seen it populated and thus never used. These fields can be left empty without any recourse.
disc The disc that the package can be found on (in a multi-disc distribution of the FreeBSD installation). This is a new feature of FreeBSD-6.0 Other distributions (such as FreeBSD-4.8 and FreeBSD-4.11 do not list packages in the INDEX file unless it appears on the same CD-ROM).

Field Population

Below you will find various ways that you can use to populate the formats listed in section 3 given nothing more than a package tarball. NOTE: these commands must be run on a FreeBSD distribution (as Linux and other UNIX distributions do not have the `pkg_info’ command).
  • package: file_name without `.tgz’ suffix
  • port-path: echo /usr/ports/`pkg_info -qo file`
  • install-prefix: pkg_info -qp file | head -n1 | sed -e ‘s/^@cwd //’
  • comment: pkg_info -qI file
  • desc-file: echo /usr/ports/`pkg_info -qo file`/pkg-descr
  • maintainer: echo
  • categories: find . -type l -name FILE | sed -e ‘s/^\.\/\(.*\)\/[^\/]*$/\1/’ | tr ‘\n’ ‘ ‘
  • build-deps: pkg_info -qr file | sed -e ‘s/^@pkgdep //’ | tr ‘\n’ ‘ ‘
  • run-deps: pkg_info -qr file | sed -e ‘s/^@pkgdep //’ | tr ‘\n’ ‘ ‘
  • www-site: pkg_info -qd file | grep ‘^WWW: ‘ | sed -e ‘s/^WWW: //’
  • disc: the disc that the package resides on


The information in this document is the result of many hours of reverse-engineering and testing. Little or no sources on this topic have been found online. Even when the subject matter was found online, the amount of information on the topic was anemic.
Categories: FreeBSD