DEV Community

Cover image for Configuring Wifi Firmware at Installation for OpenBSD
Joseph D. Marhee
Joseph D. Marhee

Posted on

Configuring Wifi Firmware at Installation for OpenBSD

If you are installing OpenBSD on a laptop, and when you find (or are aware already) that your Wifi network card does not have the required firmware available, it's a very quick fix to get the required package.

First, you'll need to drop into a shell, which you can do by hitting CTRL+C from the Installer at this point (or if you're booting for the first time, hit (S) at the prompt when beginning the installer).

If you have a wired connection available, you can plug in, and proceed to the # prompt, and run:

pkg_add -i http://firmware.openbsd.org/firmware/${VERSION}/${DRIVER}-firmware-${DRIVER_VERSION}.tgz
Enter fullscreen mode Exit fullscreen mode

So, in my case, the iwn-6000 firmware was unavailable, so I used the url: http://firmware.openbsd.org/firmware/6.8/iwn-firmware-5.11p1.tgz

You can, then, proceed, to configure the WiFi connection:

ifconfig iwn0 nwid ID wpakey PASSPHRASE
Enter fullscreen mode Exit fullscreen mode

If, like me, you did not have a wired connection available, I downloaded the above archive, and placed it on a USB drive. Once the USB drive is in the OpenBSD machine, you can get the device name:

sysctl hw.disknames
Enter fullscreen mode Exit fullscreen mode

and you'll see an output like:

hw.disknames=wd0:3af96a8b7d621ab2,cd0:,sd0: 
Enter fullscreen mode Exit fullscreen mode

and you can confirm the model/ID of your USB drive before proceeding like:

disklabel sd0 
Enter fullscreen mode Exit fullscreen mode

and get the partition ID containign the archive (i.e. /dev/sd0j) and then mount it:

mkdir -p /mnt/usb; mount /dev/rsd0j /mnt/usb
Enter fullscreen mode Exit fullscreen mode

If you receive an error that a block device is required, replace the USB path with /dev/sd0j.

Then, enter /mnt/usb, and you can install the archive:

pkg_add -i iwn-firmware-5.11p1.tgz
Enter fullscreen mode Exit fullscreen mode

and configure the connection:

ifconfig iwn0 nwid ID wpakey PASSPHRASE
Enter fullscreen mode Exit fullscreen mode

Once you confirm you can reach the network, you can resume the installation by running install.

Discussion (0)