I finally got OpenBSD installed on my Soekris net4801. The problems I'd had was because I for some reason thought it was 9600 baud serial console, when in fact it is 19200 baud. Setting the speed wrong gives a lot of gibberish on the screen.
Here's the outline:
- Set up a OpenBSD PXE boot environment.
- Get a serial console to the Soekris.
- Install OpenBSD.
- Geek out!
OpenBSD PXE Environment
You need a server running dhcpd(8) and tftpd(8). I have my OpenBSD gateway on 172.16.0.1, and this is the relevant parts of my configuration in dhcpd.conf(5):
shared-network LAN {
option domain-name "zentience.org";
option domain-name-servers 172.16.0.1;
option routers 172.16.0.1;
option ntp-servers 172.16.0.1;
# For PXE booting clients. Will be ignored otherwise.
filename "pxeboot";
# Default.
subnet 172.16.0.0 netmask 255.255.255.0 {
range 172.16.0.32 172.16.0.254;
}
}
Edit IPs to fit your network setup. I also have static leases configured for all my other clients, but they're not relevant in this context.
Setting up tftpd(8) is very easy. Make sure you have inetd(8) running, then add this line to inetd.conf(5):
172.16.0.1:tftp dgram udp wait root /usr/libexec/tftpd tftpd -ls /tftpboot
Then ‘pkill -HUP inetd’. Of course you should change 172.16.0.1 to whatever is relevant in your network setup.
Create the /tftpboot directory and copy the bsd.rd and pxeboot files from the closest OpenBSD mirror into it. Then create a etc directory in /tftpboot and create the file /tftpboot/etc/boot.conf containing these three lines:
set tty com0 stty com0 19200 boot bsd.rd
That's it.
Get a Serial Console
I will describe how to do it on Mac OS X using a Keyspan USA-19HS USB→Serial adapter, if you're using something else details will certainly vary.
- Install Keyspan drivers.
- Connect cables, USB→Serial→Soekris, and connect the 1st Soekris network interface to the LAN.
- Open a Terminal.app and execute ‘
sudo cu -l /dev/tty.USA19H41P1.1 -s 19200’. The exact/dev/tty.*name may vary. - Power on the Soekris and type Control-P when prompted to enter monitor.
- In the Soekris monitor, enter the command ‘
boot f0’ to PXE boot.
Install OpenBSD
It is very easy, just follow the instructions. In my opinion OpenBSD have the best installer of any operating system I've tried, easy, simple, fast and easily customizable if you need to.
Of course you have no use for the x*.tgz packages on a headless system with only a serial console, but I am sure you can install it if you want to.
Geek Out!
So far I have geeked out on my NET4801 kernel configuration file and pared the kernel down to 1.9 MB instead of the normal 6.5 MB.
$ uname -ap
OpenBSD net.zentience.org 4.5 NET4801#1 i386 Geode(TM) Integrated Processor by National Semi ("Geode by NSC" 586-class)
$ ls -l /bsd
-rw-r--r-- 1 root wheel 2014242 Apr 4 18:50 /bsd
I've created a github repository for whatever I do with it.