[4.0 -> 4.1] |
[4.1 -> 4.2] |
[4.2 -> 4.3] |
[4.3 -> 4.4] |
[4.4 -> 4.5] |
[4.5 -> 4.6] |
[4.6 -> 4.7] |
[4.7 -> 4.8] |
[4.8 -> 4.9] |
[4.9 -> 5.0] |
[5.0 -> 5.1] |
[5.1 -> 5.2] |
[5.2 -> 5.3] |
[FAQ Index]
Upgrade Guide: 5.3 to 5.4
Note: Upgrades are only supported from one release to the release
immediately following it.
Do not skip releases.
It is highly recommended that you read through and fully understand
this process before attempting it.
If you are doing it on a critical or physically remote machine, it is
recommended that you test this process on an identical, local system to
verify its success before attempting on a critical or remote computer.
Upgrading is a convenient way to bring your OpenBSD system up to the most
recent version.
However, the results are not intended to precisely match the results of
a wipe-and-reload installation.
Old library files in particular are not removed in the upgrade process,
as they may be required by older applications that may or may not be
upgraded at this time.
If you REALLY wish to get rid of all these old files, you are probably
better off reinstalling from scratch.
Table of Contents:
Before upgrading: things to think about and be aware of
This is not a complete list of the changes that took place
between 5.3 and 5.4, but rather some of the important things that will
impact a large number of users in the upgrade process.
For a more complete list of changes, see
plus54.html and the CVS change logs.
- Default KerberosV database directory has moved:
The default database directory for KerberosV has been moved from
/var/heimdal to /var/kerberosV which is more generic and
independent of the implementation.
Make sure you have a way to log into the machine without using Kerberos
before performing the upgrade.
Before upgrading, stop the Kerberos services and copy the database directory
to the new location:
/etc/rc.d/kadmind stop
/etc/rc.d/kpasswdd stop
/etc/rc.d/kdc stop
cp -Rp /var/heimdal /var/kerberosV
Then proceed with the upgrade as usual...
After upgrading, check that Kerberos services are working properly then
remove the old database directory:
rm -rf /var/heimdal
- fontconfig update:
Fontconfig in xenocara has been updated to version 2.10.91 and has
switched to a BSD make build system.
This new version of fontconfig deprecates the use of
~/.fonts.conf for local configuration. Make sure the users
who have created this file move it to its new location:
mkdir -p ~/.config/fontconfig
mv ~/.fonts.conf ~/.config/fontconfig/fonts.conf
- i386, amd64 com(4) port shuffled:
Device configuration lines for all four standard
isa(4)
serial ports have been added to the GENERIC kernel configuration on
these platforms.
As a result the numbering of
com(4)
devices may change on your system.
Serial ports provided by
puc(4)
or other multi-port serial cards will now start at com4, instead of com3.
If you are using any of these devices as serial console or in a console
server setup, please review the appropriate configuration files.
- rc.conf(8) pre-rc.d(8) backward compatibility removed:
rc.conf.local(8) now only supports rc.d(8) variables to control
daemons startup, and no longer supports "legacy" variables.
The following variables have been renamed to their _flags counterpart:
- amd=YES becomes amd_flags=
- inetd=YES becomes inetd_flags=
- portmap=YES becomes portmap_flags=
- rwhod=YES becomes rwhod_flags=
The lockd variable has been removed.
Similar functionality can be achieved by setting:
- lockd_flags=
- statd_flags=
The aucat_flags variable has been renamed to sndiod_flags.
- aucat_flags=NO becomes sndiod_flags=NO
Before upgrading, you need to check your rc.conf.local file for
the old variable names and change them to the new ones, or some services
that may be important for you (i.e., NFS) may not start on boot.
Note that these new variables have been supported for a few releases, so
you may wish to reboot and verify that your changes here work before
you do the rest of your upgrade.
- Intel DRM:
For 5.4, the
drm(4)
driver is now supported with many
Intel
video chips, using the Direct
Rendering Infrastructure.
X users should experience better results overall.
Console users may be somewhat surprised that their screen is no longer
the traditional 25 lines of 80 characters.
For the most part, this will not be a problem, and generally is an
improvement, but some people using old, low-resolution monitors may
have issues. If so, you can use
User Kernel Configuration (UKC)
to disable the
inteldrm(4)
driver.
- bgplg:
bgplg(8)
now looks for bgpd's read-only socket in /var/www/run/bgpd.rsock instead of
/var/www/logs/bgpd.rsock.
If using this, adjust the "socket...restricted" entry in
bgpd.conf(5).
- login.conf:
As required by POSIX, the
setrlimit(2)
system call now strictly enforces that current resource limits (-cur in
login.conf) are lower than maximum limits.
If /etc/login.conf has been modified to increase resource limits above the
default, ensure that there is an explicit "-max" limit higher than
the "-cur" limit.
If this has not been done, your limits will not take effect and you are
likely to see messages like "setting resource limit openfiles:
Invalid argument".
- Advanced notice: Big changes coming for 5.5!
OpenBSD 5.5 will be year 2038 ready, but this requires a change to a
64 bit time type.
This results in a "flag day" event, where old binaries will not run
on the new kernel, and the new binaries won't run on the old kernel,
and some file formats will be changing.
A remote, no-console process will be provided, but it will be a more
touchy update process than usual.
If you can possibly do the next update with a console, this is highly
recommended.
Failing that, it is suggested you practice remote upgrades on a similar
system with similar applications with a local console before remotely
upgrading critical systems.
The upgrade process
Upgrading by install kernel
If you have access to the system's console, the easiest and safest way
to upgrade is to boot from the install kernel by boot media or
bsd.rd and follow the upgrade steps,
which are very similar to the install process.
Afterwards, complete the upgrade by following the final
steps as detailed below.
One easy way to boot from the install kernel is to place the 5.4 version
version
of bsd.rd in the root of your boot drive, then instruct the boot loader
to boot using this new bsd.rd file.
On amd64 and i386, you do this by entering "boot bsd.rd" at the
initial boot> prompt.
Upgrading without install kernel
This is NOT the recommended process. Use the install kernel method
if at all possible!
Sometimes, one needs to do an upgrade of a machine when one can't easily
use the normal upgrade process.
The most common case is when the machine is in a remote location and you
don't have easy access to the system console.
One can usually do this by carefully following this process:
- Place install files in a "good" location.
Make sure you have sufficient space!
- Become root with ksh(1):
While using
sudo(8)
before each command is generally a good practice, the sudo(8) command
will be broken by the last steps, so you should be root before starting
this process.
Also, the use of the OpenBSD
ksh(1)
shell is assumed.
- Stop any appropriate applications:
During this process, all the userland applications will be replaced but
may not be runnable, and strange things may happen as a result.
If this is a concern to you, shut down any applications that may
be impacted.
There may be other applications which you wish to keep from running
immediately after the upgrade, stop and disable them as well.
- Disable package daemons and local shutdown commands:
The last steps in the upgrade process may result in various commands,
especially those which are dynamically linked, being broken.
In particular, this may prevent a normal shutdown of daemons listed
in pkg_scripts, or additional commands in /etc/rc.shutdown, which may
cause the machine to hang at shutdown.
Before you proceed with the upgrade, edit /etc/rc.conf.local and
comment-out any pkg_scripts lines.
Also inspect /etc/rc.shutdown and comment-out any local shutdown commands.
These can be reinstated post upgrade.
- Check the kernel:
Although most people can skip this step, if you had a modified kernel
in 5.3, it is likely you will need to modify the stock kernel of 5.4.
Especially when you are performing the upgrade process remotely, now is
the time to make sure the new kernel will work upon rebooting the machine.
If any changes must be made to the kernel, the safest thing to do is to
make those changes on a local 5.4 system.
This can be as simple as modifying a specific device using config(8),
or it can involve a recompilation if the option you need is not included
in the GENERIC kernel.
Please consult FAQ 5 - Building the system from source
before deciding to recompile your kernel.
- Install new kernel(s):
- If using a single processor kernel:
export RELEASEPATH=/usr/rel # where you put the files
cd ${RELEASEPATH}
rm /obsd ; ln /bsd /obsd && cp bsd /nbsd && mv /nbsd /bsd
cp bsd.rd bsd.mp /
(note: you will get a harmless error message if your platform doesn't
have a bsd.mp):
- If you are using the multiprocessor kernel:
export RELEASEPATH=/usr/rel # where you put the files
cd ${RELEASEPATH}
rm /obsd ; ln /bsd /obsd && cp bsd.mp /nbsd && mv /nbsd /bsd
cp bsd.rd /
cp bsd /bsd.sp
Note the extra steps for copying over the primary kernel: those are done
to ensure that there is always a valid copy of the kernel on the disk
that the system can boot from should there be a really badly timed power
outage or system crash.
- Save a copy of reboot(8), install new userland applications.
You are still running the old kernel, it is possible the new reboot
command will not run on the old kernel, so we will start by saving a
copy of the old reboot command.
Do NOT install etc54.tgz and xetc54.tgz now, because
that will overwrite your current configuration files!
Note that we are installing base54.tgz LAST, because it will include a new
tar(1)
utility, which may or may not run on the old kernel.
We reboot immediately, as the system is probably barely runnable after
the unpacking of all the new files.
cp /sbin/reboot /sbin/oreboot
tar -C / -xzphf xserv54.tgz
tar -C / -xzphf xfont54.tgz
tar -C / -xzphf xshare54.tgz
tar -C / -xzphf xbase54.tgz
tar -C / -xzphf game54.tgz
tar -C / -xzphf comp54.tgz
tar -C / -xzphf man54.tgz
tar -C / -xzphf base54.tgz # Install last!
/sbin/oreboot
Not all file sets will need to be installed for all applications,
however if you installed a file set originally, you should certainly
upgrade it with the new file set now.
Again, the files in /etc are handled separately below, so
etc54.tgz and xetc54.tgz are NOT unpacked here.
- After reboot completes, upgrade /dev.
The new
MAKEDEV
file was copied to /dev by the installation of
base54.tgz, so you simply need to do the following:
cd /dev
./MAKEDEV all
Final steps
Whether you upgrade by using an install kernel and doing a formal
"upgrade" process, or do a "in-place" binary upgrade, you need to do a
few final steps to complete the upgrade.
1. Merging changed files via sysmerge(8)
The
sysmerge(8)
utility will compare the files that are actually on your system with
those that would be installed in a fresh install, and assist you in
merging the changes into your system.
There are no assumptions made about
what is actually on your system, so you can use sysmerge(8) to move
between more arbitrary points in the
development process, such as from an earlier 5.3-current to
5.4-release or from one -current to a later one.
Sysmerge(8) compares the current files on your system with the files
that would have been installed with a new install, and what would have
been there from the last run of sysmerge.
Usually, it can figure out what to do to update your files, but if it
has difficulty, it will give you the option of keeping the old file,
installing the new file, or assisting you in the manual merging of the
old and new files, using
sdiff.
Please read the
sysmerge(8)
manual page before using it on your system.
You are also advised to read the
diff(1),
sdiff(1)
and even review
more(1)
manual pages before continuing.
A wide terminal window (i.e., significantly more than 80 characters), if
available, will make sdiff(1) easier to use.
Assuming the etc54.tgz and xetc54.tgz files exists in
your ${RELEASEPATH}, run it with:
sysmerge -s ${RELEASEPATH}/etc54.tgz -x ${RELEASEPATH}/xetc54.tgz
For the files sysmerge(8) can't resolve on its own, it will show you a
unified
diff(1),
run through your favorite $PAGER (i.e.,
more(1))
and ask you if you wish to:
Use 'd' to delete the temporary ./var/www/htdocs/index.html
Use 'i' to install the temporary ./var/www/htdocs/index.html
Use 'm' to merge the temporary and installed versions
Use 'v' to view the diff results again
Default is to leave the temporary file to deal with by hand
If you wish to retain your existing file, delete the temporary file, if
you wish to replace your existing file with the new version, install the
temporary file.
If you wish to merge the two together, choosing 'm' will put you into
sdiff(1),
where you can manually merge the file.
The default is to come back and deal with the file later, manually.
Sysmerge(8) saves all your replaced files into a temporary directory,
similar to /var/tmp/sysmerge.24959/backups, so if you accidentally
clobber something that was probably not such a good idea, you have a chance
to recover it. Note that
daily(8)
cleans old files from this directory, but it will survive a reboot.
2. Files to delete
A number of files should be deleted from your system.
Note that some of these may not exist on all systems; that's ok.
Copy and paste the following lines:
rm -rf /usr/share/locale/*.*
rm -rf /usr/share/locale/de_AT
rm -f /usr/include/spinlock.h
rm -f /usr/libdata/perl5/site_perl/*/spinlock.ph
rm -f /usr/share/man/man{9/{re,}lookup.9,/_Exit.3}
rm -f /usr/include/pcap-int.h
rm -f /usr/libdata/perl5/site_perl/*/pcap-int.ph
rm -f /etc/kerberosV/README
rm -f /usr/bin/{afslog,hxtool,kauth,kadmin,ksu,pagsh,kswitch}
rm -f /usr/lib/lib{heimntlm.*,heimntlm_p.*,hx509.*,hx509_p.*}
rm -f /usr/libdata/perl5/site_perl/*-openbsd/com_err.ph
rm -f /usr/libdata/perl5/site_perl/*-openbsd/kerberosV/{crmf_asn1,heimntlm-protos,heimntlm,hx509-private,hdb-private}.ph
rm -f /usr/libdata/perl5/site_perl/*-openbsd/kerberosV/{hx509-protos,hx509,hx509_err,kx509_asn1,ntlm_err,ocsp_asn1,pkcs10_asn1}.ph
rm -f /usr/libdata/perl5/site_perl/*-openbsd/kerberosV/{pkcs12_asn1,pkcs8_asn1,pkcs9_asn1,pkinit_asn1,gssapi/gssapi_spnego,spnego_asn1}.ph
rm -f /usr/libexec/{digest-service,kimpersonate,kdigest,kcm}
rm -f /usr/include/com_err.h
rm -f /usr/include/kerberosV/{crmf_asn1,hdb-private,heimntlm-protos,heimntlm,hx509-private}.h
rm -f /usr/include/kerberosV/{hx509-protos,hx509,hx509_err,kx509_asn1,ntlm_err,ocsp_asn1,pkcs10_asn1,pkcs12_asn1}.h
rm -f /usr/include/kerberosV/{pkcs8_asn1,pkcs9_asn1,pkinit_asn1,spnego_asn1,gssapi/gssapi_spnego}.h
rm -f /usr/sbin/kdigest
cd /usr/X11R6/include/xorg
rm -f mibstore.h synaptics.h xaa.h xaalocal.h
cd /usr/X11R6/lib/modules
rm -f extensions/lib{dbe,dri,dri2,extmod,record}.{la,so}
rm -f libxaa.{la,so}
3. Checking the kernel
Note: most people can skip this step!
If you followed the instructions for the upgrade process without install
kernel, you have already completed this step.
However, if you used the install kernel, and if you had a modified kernel
in 5.3, it is likely you will need to modify the stock kernel of 5.4.
This can be as simple as modifying a specific device using config(8),
or it can involve a recompilation if the option you need is not included
in the GENERIC kernel.
Please consult FAQ 5 - Building the system from source
before considering to recompile your kernel.
4. Upgrading packages
If you installed any packages on your system, you should upgrade them
after completing the upgrade of the base system.
Be aware, however, many packages will require further setup before
and/or after upgrading the package.
Check with the application's upgrade guide for details.
The following packages are known to have significant upgrade issues that
will impact a large number of users.
The fact that a package is not on this list doesn't mean it will have a
trivial upgrade.
You must do some homework on the applications YOU use.
- mail/roundcubemail:
Roundcube now uses PDO for database access. Be sure to follow the
update instructions in /usr/local/share/doc/pkg-readmes/roundcubemail*.
- sysutils/cfengine:
CFEngine has been updated to version 3.4; this is a major upgrade and
is not a drop-in replacement for CFEngine 2.
Existing users should see upstream's
upgrade documentation
for further information.
- net/nagios/nsca:
The NSCA update involves a change in packet format to allow longer messages.
The new server is backwards-compatible and accepts messages from either old
or new clients, but the new client is not compatible with the old server.
Therefore, the NSCA server should be updated before updating clients.
Note that it is strongly recommended that you switch to nsca-ng where
possible.
The package tools support in-place updating using pkg_add -u.
For instance, to update all your packages, make sure PKG_PATH is
pointing to the 5.4 packages directory on your CD or nearest FTP mirror,
and use something like
pkg_add -u
where the -u indicates update mode;
pkg_add will prompt you for input when it encounters
some ambiguity.
Read the
pkg_add(1)
manual page and the package management
chapter of the FAQ for more information.
[4.0 -> 4.1] |
[4.1 -> 4.2] |
[4.2 -> 4.3] |
[4.3 -> 4.4] |
[4.4 -> 4.5] |
[4.5 -> 4.6] |
[4.6 -> 4.7] |
[4.7 -> 4.8] |
[4.8 -> 4.9] |
[4.9 -> 5.0] |
[5.0 -> 5.1] |
[5.1 -> 5.2] |
[FAQ Index]
[5.2 -> 5.3] |
$OpenBSD: upgrade54.html,v 1.5 2014/03/31 01:47:54 nick Exp $