9.3. Finding the System Hardware

Written by Tom Rhodes.

Before venturing into kernel configuration, it would be wise to get an inventory of the machine's hardware. In cases where FreeBSD is not the primary operating system, the inventory list can be created by viewing the current operating system configuration. For example, Microsoft®'s Device Manager contains information about installed devices.


Some versions of Microsoft® Windows® have a System icon which will display a screen where Device Manager may be accessed.

If another operating system does not exist on the machine, the administrator must find this information out manually. One method is using dmesg(8) and man(1). Most device drivers on FreeBSD have a manual page, listing supported hardware. During the boot probe, found hardware will be listed. For example, the following lines indicate that the psm(4) driver found a mouse:

psm0: <PS/2 Mouse> irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: [ITHREAD] psm0: model Generic PS/2 mouse, device ID 0

This driver will need to be included in the custom kernel configuration file or loaded using loader.conf(5).

On occasion, the data from dmesg will only show system messages instead of the boot probe output. In these situations, the output may be obtained by reading /var/run/dmesg.boot.

Another method for finding hardware is to use pciconf(8) which provides more verbose output. For example:

ath0@pci0:3:0:0: class=0x020000 card=0x058a1014 chip=0x1014168c rev=0x01 hdr=0x00 vendor = 'Atheros Communications Inc.' device = 'AR5212 Atheros AR5212 802.11abg wireless' class = network subclass = ethernet

This output, obtained by using pciconf -lv, shows that the ath driver located a wireless Ethernet device. Type man ath to read ath(4).

The -k flag, when passed to man(1) can be used to provide useful information. For example, to display a list of manual pages which contain the specified word:

# man -k Atheros
ath(4) - Atheros IEEE 802.11 wireless network driver ath_hal(4) - Atheros Hardware Access Layer (HAL)

Armed with a hardware inventory list, the process of building a custom kernel should appear less daunting.

All FreeBSD documents are available for download at http://ftp.FreeBSD.org/pub/FreeBSD/doc/

Questions that are not answered by the documentation may be sent to <freebsd-questions@FreeBSD.org>.

Send questions about this document to <freebsd-doc@FreeBSD.org>.