Install your Soekris (or any other machine) with OpenBSD using OpenBSD

To install OpenBSD on your Soekris machine, (or any other machine) take these steps to create an OpenBSD installation server. This instruction help you setup a DHCP, TFTP and HTTP server required for a network installation of OpenBSD.

This setup creates an autonomous install server, that can be disconnected from the internet. During the setup this machine is connected to the internet to install all required software.

First; install an OpenBSD machine. This may either be virtual or physical. Just install the default set of software and make sure it's connected to the internet. (It does not matter if you are using DHCP or a static IP configuration.)

This instruction is based on OpenBSD 4.5, but will likely work for future releases.

Install a DHCP server.

# export PKG_PATH=
# pkg_add isc-dhcp-server
isc-dhcp-server-3.1.1: complete

Configure the DHCP server. This step is very dependent of your network configuration, so don't just copy paste everything, but try to understand (using man pages) what's configured.
My /etc/dhcpd.conf looks like this now:

option  domain-name "";
option  domain-name-servers;

subnet netmask {
        host pxe-client {
                hardware ethernet 02:03:04:05:06:07;
                filename "pxeboot";

Be aware; the "hardware ethernet" address mentioned above is not correct. It needs to be set to what the MAC address is of the machine you would like to install.

Make sure it start by modifying /etc/rc.conf.local, like this:

# echo "dhcpd_flags=" >> /etc/rc.conf.local

Enable the TFTP server in /etc/inetd.conf: (It's installed by default on an OpenBSD installation!)

tftp            dgram   udp     wait    root    /usr/libexec/tftpd      tftpd -s /tftpboot

Create some directories and restart inetd:
# pkill -HUP inetd

Now get the kernel that is being used when booting over the network and retreive the PXE boot code.

# cd /tftpboot
# ftp
100% |*******************************************************************************|  5461 KB    00:06
Successfully retrieved file.
# echo "set tty com0
stty com0 19200
boot bsd.rd" > etc/boot.conf
# ftp
100% |*******************************************************************************| 53276       00:00   
Successfully retrieved file.

Enable a HTTP server.

# echo "httpd_flags=" >> /etc/rc.conf.local

Now get all required software sets you'd like to offer.

# ftp
100% |*******************************************************************************|   266       00:00   
Successfully retrieved file.
# cat index.txt | grep -v '.iso' | tee index.txt | while read file ; do
>  ftp"$file"         
> done
100% |********************************************************************************|   106 KB    00:00   
100% |********************************************************************************| 22356       00:00   
100% |********************************************************************************|  1022       00:00   
100% |********************************************************************************| 46941 KB    00:27   
100% |********************************************************************************|  6539 KB    00:02   
100% |********************************************************************************|  6558 KB    00:03   
100% |********************************************************************************|  5461 KB    00:02   
100% |********************************************************************************| 44724       00:00   
100% |********************************************************************************|  2048       00:00   
100% |********************************************************************************| 87874 KB    00:59   
100% |********************************************************************************|   501 KB    00:00   
100% |********************************************************************************|  1440 KB    00:00   
100% |********************************************************************************|  1440 KB    00:00   
100% |********************************************************************************|  1440 KB    00:00   
100% |********************************************************************************|  2555 KB    00:00   
100% |********************************************************************************|  8032 KB    00:03   
100% |********************************************************************************|  2866 KB    00:02   
100% |********************************************************************************| 53276       00:00   
100% |********************************************************************************|  9761 KB    00:07   
100% |********************************************************************************| 75214       00:01   
100% |********************************************************************************| 34745 KB    00:26   
100% |********************************************************************************| 19478 KB    00:11   
100% |********************************************************************************|  2698 KB    00:06   

Now that everything is ready, reconfigure your network to use a static IP which is usable in the network you are planning this installation server.

NOTA BENE: you have enabled a DHCP server, if your network already uses a DHCP server, clients might get an IP address from your DHCP server, which is likely incorrect and/or conflicting with the exiting DHCP server. Normally you'd like to use one DHCP server per network.

# echo "inet" > /etc/hostname.em0
# echo "lookup file" > /etc/resolv.conf
# reboot

Now in the freshly installed client, modify/create /etc/boot.conf with this content:

set tty com0
stty com0 19200

The Soekris uses these setting to be able to access the serial console.

Okay, after your install server has been rebooted, go and boot an uninstalled client.

For soekris users; connect your console cable, see the machine boot.

You will see that it's first getting the pxeboot code, then the kernel (bsd). When the kernel has booted, select your bootservers IP address to install software from and enter "/" at the server directory question.


Nice setup. It is easy to

Nice setup. It is easy to follow and really gives good results. - Bath Planet

Microot Microwave specializes

Microot Microwave specializes in the design and manufacture of broadband rf microwave components since 2003. Our extensive product line includes power divider, directional coupler, low noise amplifier, Hybrid coupler, frequency source and more.

About Consultancy Articles Contact

References Red Hat Certified Architect By Robert de Bock Robert de Bock
Curriculum Vitae By Fred Clausen +31 6 14 39 58 72
By Nelson Manning [email protected]