A little bit of everything answered here. : OpenBSDUpgrade

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register

This document describes upgrading an OpenBSD machine

In this document we will discuss the process for upgrading or updating the Openbsd operating system.

Currently, my machine is running "OpenBSD 4.1 Generic" i386 version

I am going to attempt to update/upgrade it this evening to "OpenBSD current"

Here is a rough copy of the instructions to do so:

Example #1

here's generally how i upgrade when i'm not going between minor versions
(upgrades from 3.3 or earlier should be done via CD unless you are
prepared to work around binary compatibility issues)

1. first, go into /tmp and get the shitz:

cd /tmp
ftp ftp.usa.openbsd.org
anonymous
guest
prompt
cd /pub/OpenBSD/<version>/packages/i386
mget bsd *.tgz
quit

2. next, install the kernel and the userland

mv /bsd /bsd-<old_version>
mv ./bsd /bsd
tar xzvpf etc<version>.tgz
mv etc<version>.tgz etc<version>.tgz.old
cd /
for i in /tmp/*<version>.tgz; do
  tar xzvpf $i
done
cd /tmp

3. diff /etc

cd /tmp/etc
for i in *; do
diff -ur /etc/$i $i >>/tmp/ff

4. upgrade /etc
more /tmp/ff
<copy over stuff from /tmp/etc that has changed>

..at a minimum, you should..
rm -r /etc/afs/
rm -r /etc/mail/
rm -r /etc/mtree/
rm -r /etc/systrace/
cp -rp afs/ mail/ mtree/ systrace/ /etc/
cp -p changelist daily disktab ksh.kshrc man.conf moduli monthly netstart pf.os protocols rc rc.conf remote security services weekly /etc

take a look at the following files to find out if their are any changes that 
need to be manually copied over
cp -p bgpd.conf newsyslog.conf ospf6d.conf pf.conf sudoers sysctl.conf /etc

You should manually compare your current /etc/rc.local and the new one in 
/tmp/etc/rc.local  Make sure to move over all your custom changes from your 
existing rc.local file.

<upgrade other parts of /etc as needed>

5. reboot

once your machine is upgraded, you can update both your ports tree
and installed packages very easily:

1. upgrade installed packages

export PKG_PATH=ftp://ftp.usa.openbsd.org/pub/OpenBSD/<version>/packages/i386/
pkg_add -u -F update,alwaysupdate,updatedepends

2. update ports tree

If you do not have a ports tree, do this

cd /usr/
cvs -d anoncvs@anoncvs.openbsd.org:/cvs -q co ports

If you have a /usr/ports and it needs updated, do this
cd /usr/ports
cvs -d anoncvs@anoncvs.openbsd.org:/cvs -q up -Pd

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.2
Page was generated in 0.1811 seconds