dnl $OpenBSD: upgrade,v 1.12 2013/02/09 19:51:00 miod Exp $
dnl Restore this line...
dnl OpenBSDUpgrade({:-bsd.rd-:})
dnl ... for the 5.5 release notes, where it can be assumed that the system
dnl being upgraded is not older than 5.3 and thus fully ELF.
dnl In the meantime, we'll stick to the variant below.
Warning! Upgrades to OpenBSD OSREV are currently only supported from the
immediately previous release.  The upgrade process will also work with older
releases, but might not execute some migration tasks that would be necessary
for a proper upgrade.

The best solution, whenever possible, is to backup your data and reinstall
from scratch. As a minimum, if the toolchain (the ``comp'' set) was installed,
you should remove all files within /usr/{:-include-:} before attempting to
upgrade.

To upgrade OpenBSD OSREV from a previous version, start with the general
instructions in the section "Installing OpenBSD".

IMPORTANT NOTE: if you intend to boot from bsd.rd, it is very likely that
  your boot blocks do not support ELF kernels. Before attempting to boot
  bsd.rd, upgrade the boot blocks by copying the provided ``SYS_UBOOT'' file
  to /usr/mdec/sdboot (or /usr/mdec/hdboot if your boot disk is an HP-IB disk),
  and run, as root:
	/sbin/disklabel -B sd0
  (replacing `sd0' with the name of your boot disk).
  You will then be able to boot bsd.rd.

Boot from bsd.rd.
When prompted, select the (U)pgrade option rather than the (I)nstall
option at the prompt in the install process.

You will be presented with a welcome message and asked if you really wish
to upgrade.

The upgrade script will ask you for the existing root partition, and
will use the existing filesystems defined in /etc/fstab to install the
new system in.  It will also use your existing network parameters.

From then, the upgrade procedure is very close to the installation
procedure described earlier in this document.  Note that the upgrade
procedure will not let you pick neither the ``etc{:--:}OSrev.tgz'' nor the
``xetc{:--:}OSrev.tgz'' sets, so as to preserve your files in `/etc' which
you are likely to have customized since a previous installation.

However, it is strongly advised that you unpack the etc{:--:}OSrev.tgz and
xetc{:--:}OSrev.tgz sets in a temporary directory and merge changes by hand, or
with the help of the sysmerge(8) helper script, since all components of
your system may not function correctly until your files in `/etc' are
updated.
