March 29th, 2003, 14:55
WARNING: This process is very simple, and will work in most all cases ... HOWEVER, if you are not very familiar with your current configuration, this process is not recomended. I would not say this is for advanced users ... but you should have a pretty good idea whats going on ... obviously there is also better syntax (shortcuts) in some of my example commands, however I have used commands that I feel will best document what exactly we are attempting to do.

WARNING2: This means you! Towards the end of this upgrade process, you will have to edit /etc and /var almost on your own ... if you are not comfortable with this, don't do it.

OK! Firstly - this is just like the title says, this is a quick and dirty upgrade to the most recent snapshot of OpenBSD while not having access to the local machine, and without having to compile the entire cvs tree. At the time of this writing, I will be upgrading OpenBSD 3.2 to OpenBSD 3.3.

create a workdir in your homedir.
$ cd /home/[UNAME]
$ mkdir workdir
$ cd workdir

Lets get the files we need.
$ ftp
$ open
ftp> prompt <-- toggles prompting on/off (we want it off).
ftp> mget /pub/OpenBSD/snapshots/i386/*

OK - So we should now have all the files in the most recent snapshots in a workdir now.
We'd like to now replace the current kernel with the most recent downloaded kernel, and ensure its owned by root, and group wheel. But before we do this, we should backup the current. sooo ... (just su first if you don't have sudo setup correctly)

$ sudo mv /bsd /bsd.backup
$ sudo mv /home/[UNAME]/workdir/bsd /bsd
$ sudo chown root.wheel /bsd

We do NOT want to completely overwrite all of our /etc or /var directories. SO - rename etc33.tgz to etc33.tar.gz.

$ cd /home/[UNAME]/workdir
$ mv etc33.tgz etc33.tar.gz

Alright. now to extract all the binaries we had downloaded in our workdir, with the exception of etc33.tar.gz (Again, use su first if you don't have sudo setup correctly). This will extract directly to the place in which they should be.

$ cd /home/[UNAME]/workdir
$ for i in *.tgz; do sudo tar -xzpf $i -C /; done

OK - Now for the configuring, this is a little messy. Most people will tell you to use mergemaster here. I personally, do not care for modifying my /etc blindly - so we'll do it by hand... First create a newroot dir inside of out workdir, so we can seperate the contents of etc33.tar.gz from the rest of the workdir.

$ cd /home[UNAME]/workdir
$ mkdir newroot
$ tar -xzf etc33.tar.gz -C newroot

NOW, this is a quite a hack .. but it gives you a good idea what has changed as far as default configuration is concerned between 3.2 and 3.3. This is a quick quick quick quick script that will seperate the differences in the new configuration files, and dump them into a text file in your /home/[UNAME] - so we can later go through FILE by FILE and make the nescisary adjustments by hand. You should be root to do this.

$ cd /home/[UNAME]/workdir/newroot/etc
$ echo "" > /home//[UNAME]/diff.txt <-- ensure we are starting with a clean file.
$ su
# for i in *; do echo "!!!!! FILE $i !!!!!" >> /home/[UNAME]/diff.txt; diff $i /etc/$i | egrep "^diff|^<" >> /home/[UNAME]/diff.txt; done

OK - so, first thing you may see is that you might get a line or two of ..
diff: /etc/spamd.conf: No such file or directory
These are just files that are new, that don't currently exist in your /etc. So - lets move each of those files by hand into /etc

# mv spamd.conf /etc

now for the fun stuff. Open up /home/[UNAME]/diff.txt with your favorite text editor. and you will see this file looks much like this ...

!!!!! FILE afs !!!!!
diff afs/afsd.conf /etc/afs/afsd.conf
< # OpenBSD: afsd.conf, v 1.5 2002/12/16 02:09:06 millert Exp $
< # the maximum connections arla will have to all servers
!!!!! FILE amd !!!!!
!!!!! FILE authpf !!!!!
etc. etc. etc.

What we're looking at is the file by file changes of whats new. Each file/directory is identified by "!!!!! FILE blah.conf !!!!!" and if there are individual files that have changes underneath a directory, they will be identified by "diff blahdir/blah.conf /etc/blahdir/blah.conf". If a file is listed, and no changes appear directly underneath it - it can be assumed that you may just ignore it, and move onto the next. Keep in mind, there will be differences that may not need to be applied. This is all your call on what you do and don't adjust. It's fairly safe to say - if you have never seen such a thing before, you should apply these changes to the file in /etc. Messy huh? But, you get a good grip on whats new. This method works very well for those that want to keep a good eye on their config files, and whats new ... This is not a very entertaining task for those of us that have MANY MANY MANY adjustments in our /etc.

OK - Moving onto /home/[UNAME]/workdir/newroot/var

For myself - I was able to mv this entire folder overtop of the original without headache. This is NOT recomended for all situations - you pretty much have to take a look throughout and determine whether these files are going to affect your current setup or not. This will vary from server to server.

OK - Moving onto /home/[UNAME]/workdir/newroot/root

Same thing applies here - look at the files, check out the differences, and apply them if you feel they are appropriote (they most always are ... so dont be lazy!)

# reboot

REBOOT!!! (Did I mention you're done)
welcome to 3.3 (or whatever snapshot you have upgraded to) In the case of 3.3 - go write a new pf.conf with altq ... install a mail server and setup spamd ... Feel safe, systrace and propolice are things of beauty!

credit: The guys over at have a very similar process in which I referenced while documenting my experience.
thank you: Thank you Theo and the rest of the devel team ... this release looks great.


March 29th, 2003, 15:04
Sorry - I shoulda noted this ... the snapshots have not been changed for a few days, and 3.3 pre-orders are going on, the codehalt has occured .. so what you download from the snapshots, is 3.3 final. I shoulda posted this into the howto's maybe ... ah well...

Silly Pengiun!! Linux is for kids!

March 31st, 2003, 18:56
Sorry - I shoulda noted this ... the snapshots have not been changed for a few days, and 3.3 pre-orders are going on, the codehalt has occured .. so what you download from the snapshots, is 3.3 final.

This isn't necessarily true - the last snapshot you see there might not be what is on 3.3, unless Theo or other developer says so. In this instance, what was there before 3/29 is most definitely not 3.3-base since 3.3 base includes sendmail 8.12.9, which was just added on the 29th.

Kind of messed me up since on Friday i cvs'd and made release sets of OPENBSD_3_3_BASE but now even _BASE has been changed to include newer sendmail.