<?xml version="1.0" encoding="utf-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Fun with ones and zeros - openbsd</title>
<subtitle>Barry&#039;s notes on computer software and hardware</subtitle>
<link href="/blog/tags/openbsd"></link>
<updated>2026-04-17T13:42:07-07:00</updated>
<id>urn:uuid:70b6d2f5-9c91-3aa9-1e19-b9b0780b3982</id>
<entry>
<title>iPXE on OpenBSD</title>
<link href="/blog/entries/ipxe-openbsd"></link>
<id>urn:uuid:edbadb7b-dc08-0bb7-4590-2fdf43a38f66</id>
<updated>2011-10-01T17:46:00-07:00</updated>
<author><name>Barry Pederson</name>
<email>bp@barryp.org</email>
</author>
<content type="html">&lt;p&gt;I got a chance to try &lt;a href=&quot;/blog/entries/enhanced-pxe-booting-ipxe/&quot;&gt;Enhanced PXE booting with iPXE&lt;/a&gt; on an OpenBSD box and found a couple things that &lt;em&gt;don&#039;t&lt;/em&gt; work...&lt;/p&gt;
&lt;p&gt;Firstly the stock DHCP daemon does not support &lt;code&gt;if&lt;/code&gt; statements in the configuration, so this bit to keep iPXE from being told to load iPXE (a loop) didn&#039;t work&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if exists user-class and option user-class = &quot;iPXE&quot; {
    filename &quot;http://10.0.0.1/pxelinux.0&quot;;
    } 
else {
    filename &quot;undionly.kpxe&quot;;
    }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To get it to work I had to follow the alternate advice on the &lt;a href=&quot;http://ipxe.org/howto/chainloading&quot;&gt;chainloading&lt;/a&gt; documentation about &lt;strong&gt;Breaking the loop with an embedded script&lt;/strong&gt;.  &lt;/p&gt;
&lt;p&gt;However, recompiling &lt;code&gt;udnionly.kpxe&lt;/code&gt; on OpenBSD 4.9 failed, with the error:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;net/fcels.c: In function &#039;fc_els_prli_detect&#039;:
net/fcels.c:1108: internal compiler error: Segmentation fault: 11
Please submit a full bug report,
with preprocessed source if appropriate.
See &amp;lt;URL:http://gcc.gnu.org/bugs.html&amp;gt; for instructions.
gmake: *** [bin/fcels.o] Error 1&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(this was GCC 4.2.1).  FreeBSD 8.2 also has the same version of GCC and comes up with the same error.&lt;/p&gt;
&lt;p&gt;I ended up using an Ubuntu 10.04.3 box, which I believe was GCC 4.4.x, and that worked fine.&lt;/p&gt;</content>
</entry>
<entry>
<title>FreeBSD, OpenBSD, and 2007 Daylight Savings Time</title>
<link href="/blog/entries/freebsd-openbsd-and-2007-daylight-savings-time"></link>
<id>urn:uuid:2b7324a4-b716-375b-e738-e11d88cddf2a</id>
<updated>2007-03-02T11:37:41-08:00</updated>
<author><name>Barry Pederson</name>
<email>bp@barryp.org</email>
</author>
<content type="html">
&lt;p&gt;Just a followup to my &lt;a href=&quot;/blog/entries/2007-daylight-savings-time-changes-and-freebsd/&quot;&gt;earlier post&lt;/a&gt; on updating FreeBSD to handle the changes in Daylight Savings Time starting in 2007....
&lt;/p&gt;
&lt;p&gt;There are a couple mentions  &lt;a href=&quot;http://docs.freebsd.org/cgi/getmsg.cgi?fetch=232015+0+current/freebsd-stable&quot;&gt;[1]&lt;/a&gt;, &lt;a href=&quot;http://docs.freebsd.org/cgi/getmsg.cgi?fetch=243710+0+current/freebsd-stable&quot;&gt;[2]&lt;/a&gt; on the freebsd-stable mailing list that the &lt;code&gt;/etc/localtime&lt;/code&gt; file is binary compatible across various versions of FreeBSD.  &lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;This means you only have to get one good copy of &lt;code&gt;/etc/localtime&lt;/code&gt; for your timezone, either by pulling from a FreeBSD 6.2 or higher machine, or installing the &lt;code&gt;misc/zoneinfo&lt;/code&gt; port on one older machine and run &lt;code&gt;tzsetup&lt;/code&gt;.  Once you have that good version, you can copy it around to your other FreeBSD boxes, regardless of what version they&#039;re running.   &lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;This seems to also work between FreeBSD and OpenBSD (and perhaps Net and Dragonfly).   I had a single OpenBSD 3.7 machine I wanted to update, and it seems to work OK to use a &lt;code&gt;/etc/localtime&lt;/code&gt; pulled from a FreeBSD box.   On OpenBSD (3.7 at least), &lt;code&gt;/etc/localtime&lt;/code&gt; was a symlink to a file in &lt;code&gt;/usr/share/zoneinfo/&lt;/code&gt;.  I just removed the symlink and made a new one pointing to a new timezone file I stuck somewhere on the disk.   Checking for the correct DST dates in OpenBSD seems to be the same as with FreeBSD: 
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;zdump -v /etc/localtime | grep 2007
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Look for March 11th as the start date.
&lt;/p&gt;


</content>
</entry>
</feed>