OpenBSD Configuration and Installation via Serial Port on Soekris
Introduction
You've just bought a Soekris board without thinking too much about it... don't worry, it works like a charm :-).
I'm going to explain how I was able to put OpenBSD on my Soekris with a CompactFlash drive.
Materials Used
For my installation, I needed:
- A DB9 Female/Female serial cable (also called NULL-MODEM)
- A USB to serial port cable (I no longer have serial ports on my machines)
- A network cable connected to interface 1 (the first one) of the Soekris for the PXE boot to work
- A Compact Flash card (Kingston Elite Pro 16GB 133X) (SanDisk is preferred for compatibility reasons)
- And finally, the Soekris 5501-70
Prerequisites
Before starting, certain things need to be set up. I won't explain how all the services below work, so I'll simply provide my configurations. However, I invite you to check out:
My DHCP and TFTP server has the IP address 192.168.10.107 here.
DHCP Server
Here's my DHCP configuration:
Don't forget to restart the DHCP server after making changes.
TFTP Server
For TFTP, go to /var/lib/tftpboot and do this:
Then edit the boot.conf file and insert these lines:
Don't forget to restart your TFTP server.
Soekris BIOS
Connection via Minicom
Launch minicom:
Then go to:
- Serial port configuration
- Baud rate/Parity/Bits
- Set it to 19200 8N1 (key combination c+a+q)
Save everything and exit to validate the configuration. Now you're connected.
Boot
Let's configure the Soekris BIOS. Use your com port to connect to it and press Ctrl+P at boot to enter the BIOS:
Once inside, set the date and time:
Now for some brief explanations about the boot process. Enter the BIOS again and use the show command to see the available options:
The BootDrive devices are indicated as follows:
- 80: hard disk (IDE or SATA)
- 81: compact flash
- F0: PXE
We'll boot from PXE to launch the OpenBSD installation:
OpenBSD Installation
Perform your installation as you normally would, except it would be good not to set up a swap partition to avoid stressing the Compact Flash.
Then, toward the end of the installation, don't forget to specify that you also want to use the com port to connect:
Then reboot, and once again we'll touch the BIOS one last time to specify the boot order:
There are subtleties described below due to the short lifespan of compact flash. We'll do everything possible to preserve it as much as possible.
Remove Access Information
Let's remove access information on the compact flash with the noatime option in fstab:
Add MFS Filesystems
Add MFS filesystems to your data that changes regularly:
MFS: Using a Filesystem in RAM
Watchdog
I strongly recommend enabling the watchdog:
Setting up a Watchdog
Updating OpenBSD
For updates, simply specify during installation that you want to upgrade the system. Then, after rebooting, download the etcXX.tgz file of the OpenBSD version you're upgrading to in /tmp and run this command:
You'll then see menus for merging your configurations.
FAQ
Why doesn't the OS boot on first attempt? I have to do a cold boot for it to work.
I had messages like these:
Forced to reset at the Monitor (BIOS) level, and therefore do a Cold boot for the OS to boot, what a joke...
To solve the problem, there are 2 solutions:
- Change your Flash card to a more compatible one (SanDisk for example, as indicated on the Soekris site)