OpenBSD 3.7 on WRAP revised

Posted by Jonathan

After discussing some issues with Thomas, we have now an improved solution for OpenBSD 3.7 on WRAP.

First, we combined the two memory-based filesystems on /var and /tmp into one and symlinked /tmp to /var/tmp.
Then we increased the mfs-filesystem to 16 MB (or even 32 MB) because the default 8 MB are nearly full after the default install.

So the /etc/fstab now looks like this (16MB):

/dev/wd0a / ffs ro 1 1
swap /var mfs rw,-P=/proto/var,-s=32768,noexec,nosuid,nodev 0 0
swap /dev mfs rw,-P=/proto/dev,-s=1200,-i=128,noexec,nosuid 0 0

Then there was the problem of keeping the logs, mail and other important stuff of /var over reboots. As /var is mounted on a memory-filesystem, its content is vanished if the machine reboots. On a new boot it is populated from /proto/var, a cpoy of the “real” /var after installing. My solution was calling rsync from /etc/rc.shutdown:

/usr/local/bin/rsync -vaz /var/ /proto/var/

This syncs the actual /var with /proto/var before shutdown or a reboot so that when /var is populated from /proto/var on a boot, everything is sync and current. No logs, mails or the content of /var/db is lost. rsync can be installed easily from a package.

pkg_add ftp://my/path/to/packages/i386/rsync-2.6.3.tgz

I had to complete first OpenBSD 3.7 CD on a local HTTP mirror. Worked fine. Do not wonder if the rsync call is reporting such errors:

rsync: mknod ”/proto/var/cron/tabs/.sock” failed: Invalid argument (22)
...
rsync: mknod ”/proto/var/empty/dev/log” failed: Invalid argument (22)
...
rsync error: some files could not be transferred (code 23) at /usr/obj/i386/rsync-2.6.3/rsync-2.6.3/main.c(702)

That means that rsync could not create the sockets for cron and bind. Nothing to worry about because as far as I can tell they are created on boot on /var and this is the only place where they are needed.

Another problem was that OpenBSD only detected 64 MB RAM instead of 128 MB. The solution is to update the Bios to at least 1.07. We installed 1.08 through xmodem upload. This was a hard fight for me because I could not get minicom to enter the Bios or tip starting the xmodem upload. With tip I was able to enter the Bios but I could not start an upload with lrzsz as tip was no longer reacting to the escape characters. I tried minicom but with minicom I could not enter the Bios. After OpenBSD booted, everything worked through minicom, but pushing “s” in order to enter the WRAP Bios resulted in no reaction. After some hours of fun with minicom/c-kermit/tip/cu/lrzsz Thomas finally got it.

The trick was to boot the WRAP first and then connect through minicom. Only so we were able to enter the Bios and upload the new 1.08 Bios with lrzsz from within minicom. We had always connected with minicom first and than booted the WRAP because you had to be fast in order to push “s” during memory counting. For more information on the Bios update see this page about Bios update on the very similar Soekris NET4801.

After this hurdle my WRAP uses 128 MB RAM under OpenBSD and can netboot with PXE.

Further Thomas has a new webpage dedicated to OpenBSD 3.7 and WRAP. There you can also find some information on how to control the LEDs.


UPDATE:

You can get the Bios from here: <a href=”http:// www.pcengines.ch/wbios108.zip”> www.pcengines.ch/wbios108.zip

UPDATE 2:

See my follow-up article for a small issue with double mounted filesystems.

Comments

Leave a response

  1. TCMMay 19, 2005 @ 03:07 PM
    Where did you find a BIOS update for WRAP?
  2. TCMMay 19, 2005 @ 03:09 PM
    Following up my last question, is that right that WRAP can PXE boot with an updated BIOS?!
  3. Jonathan WeissMay 19, 2005 @ 03:43 PM
    Yes, the WRAP can now do a netboot with PXE, although I did not test it. But on boot you can press a key to do a netboot and the README states that you can netboot with etherboot.org. The Bios upgrade can be obtained from pdornier@pcengines.ch. I will ask him to put it on the website or for permission to put it on mine.
  4. Jonathan WeissMay 19, 2005 @ 05:14 PM
    The Bios is available here: www.pcengines.ch/wbios108.zip