The obvious downside of a system like the Soekris is the wimpy CPU. This really is only an issue during installation and during the initial system configuration. After that, the box is a real work horse.
Below are the steps I recently used to get my NET4801 running OpenBSD 4.2 -current. The difference here is that I use qemu to make use of the considerably faster CPU on my desktop to breeze through the install and initial configuration.
- Download install42.iso from your local mirror
- Plug in your CF card that you'll use in your Soekris. Take note of what device it gets assigned
- Start qemu, replacing /dev/sdb with whatever device your CF is:
qemu -hda /dev/sdb -cdrom install42.iso -boot d
- Install as usual. Configure your interface to use DHCP, as anything else won't work inside qemu. Set default console to com0 and set the speed to match your Soekris (9600)
- Finish installation. Halt. Stop qemu. Restart without the iso:
qemu -hda /dev/sdb
- Once booted, edit /etc/fstab so that / is mounted with noatime, read-only. My /etc/fstab looks like this:
/dev/wd0a / ffs ro,noatime 1 1
- Now put the volatile stuff into MFS so you won't wear out your CF too fast. Create an MFS directory for /var:
mkdir /mfs cp -rp /var /mfs/var
- Similarly for /dev:
mkdir /mfs/dev cp /dev/MAKEDEV /mfs/dev cd /mfs/dev ./MAKEDEV all
- Add the appropriate lines to /etc/fstab to ensure that /dev and /var get mounted as MFS at boot. Change values for -s and -i as you feel necessary. This works for me a on 1G CF:
swap /var mfs rw,-P=/mfs/var,-s=32768,noexec,nosuid 0 0 swap /dev mfs rw,-P=/mfs/dev,-s=8192,-i=128,noexec,nosuid 0 0
- Now symlink /tmp to /var/tmp so that temporary files can be written to:
rm -Rf /tmp ln -s /var/tmp /tmp
- Install rsync to handle synchronizing /var. This assumes you've set $PKG_PATH to your favorite local mirror:
pkg_add rsync
- Add a cronjob to periodically sync any changes to /var. I prefer a weekly job. Add something like the following to root's crontab:
1 0 */7 * * /usr/local/bin/rsync -az --delete /var/ /mfs/var/
- Finally, edit the shutdown script to sync any unsynchronized changes at shutdown time. Add the following to the end of /etc/rc.shutdown:
/usr/local/bin/rsync -vaz --delete /var/ /mfs/var/
Thats it. Halt your OpenBSD installation, stop qemu and install the CF in your Soekris. Any further configuration can be done by way of sshd or the serial console, but don't forget the / is mounted read-only, so don't forget to mount it read-write if you need to change something.
Enjoy.