NetBSD/distrib/notes/x68k/upgrade

229 lines
9.3 KiB
Plaintext

.\" $NetBSD: upgrade,v 1.9 1999/04/15 15:18:21 minoura Exp $
.\"
.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the NetBSD
.\" Foundation, Inc. and its contributors.
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
.\" contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.
The upgrade to
.Nx \*V
is a binary upgrade; it can be quite difficult
to advance to a later version by recompiling from source due primarily
to interdependencies in the various components.
.Pp
To do the upgrade, you must have the bootable install floppy
.Pa boot.fs ,
or,
.Pa loadbsd.x
utility and
.Pa netbsd.INSTALL
file which can be found in
.Pa installation/misc in your Human68k disk.
You must also have at least the
.Sy base No and Sy kern
binary distribution sets available, so that you can upgrade with it,
using one of the upgrade methods described below. Finally, you must
have sufficient disk space available to install the new binaries.
Since the old binaries are being overwritten in place, you only need
space for the new binaries, which weren't previously on the system.
If you have a few megabytes free on each of your root and
.Pa /usr
partitions, you should have enough space.
.Pp
Since upgrading involves replacing the boot blocks on your
.Nx
partition, the kernel, and most of the system binaries, it has the
potential to cause data loss. You are strongly advised to
.Em back up any important data on your disk ,
whether on the
.Nx
partition or on
another operating system's partition, before beginning the upgrade
process.
.Pp
To upgrade your system, follow the following instructions:
.Bl -enum
.It
Boot your machine using of the boot.fs floppy, or boot with
.Pa loadbsd.x
utility.
.It
You will be presented with a welcome message and a prompt
asking whether you are going to "install" NetBSD or "upgrade"
an exisiting system. Select "upgrade" to start.
.It
You will be presented with some information about the upgrade
process and a warning message, and will be asked if you wish
to proceed with the upgrade process. If you answer
negatively, the upgrade process will stop, and your disk will
not be modified. If you answer affirmatively, the upgrade
process will begin, and your disk will be modified. You may
hit Control-C to stop the upgrade process at any time.
However, if you hit it at an inopportune moment, your system
may be left in an inconsistent (and possibly unusable) state.
.It
You will be asked if you wish to upgrade your file systems to
the new file system format. If you do, reply affirmatively.
If you don't have your file systems upgraded now, you should
probably do it manually after the install process is complete,
by using "fsck -c 2". Read the fsck(8) manual page for more
details. Note that this step is only important when upgrading
from a pre-NetBSD 1.0 release.
.It
The upgrade program will then check your root file system,
and, if you approved, will upgrade it to the new file system
format. It will then mount your root file system on /mnt.
.It
If your file systems are being upgraded, the upgrade script
will copy the new fsck(8) program to your hard disk and
upgrade your remaining file systems.
.It
The upgrade program will then automatically replace the boot
blocks on your disk with newer versions, and mount all of your
file systems under /mnt. (In other words, your root partition
will be mounted on /mnt, your /usr partition on /mnt/usr, etc.)
.It
If you don't already have the
.Nx
distribution sets on your
disk, look in the installation section for information on how
to transfer them to your disk.
.It
If you don't have the disk space to copy all of the
distribution onto the hard drive, you can
install a kernel on the hard drive as detailed a few
paragraphs below, then boot off the hard drive. Now
you can copy and install distribution sets
incrementally from your lone floppy drive.
.Pp
Once the distribution sets are transferred to your disk,
continue here. (Obviously, if the
.Nx
distribution sets
are already on your disk, because you've transferred them
before starting the upgrade process, you don't need to
transfer them again now!)
.It
After the software has been transferred to the machine (or
mounted, in the case of upgrading via NFS or CD-ROM), change
into the directory containing the "base.tgz" distribution set.
Once you are there, run the "Set_tmp_dir" command, and hit
return at the prompt to select the default answer for the
temporary directory's path name. (It should be the path name
of the directory that you're in.)
.It
Run the command "Extract kern" to upgrade the kernel.
.It
Run the command "Extract base" to upgrade the base
distribution.
.It
Repeat the above two steps for all of the sets you wish to
upgrade. (For each, change into the directory containing the
set, run "Set_tmp_dir" and accept the default path name, then
run the "Extract <setname>" command.)
.It
If you were previously using the security distribution set, you
.Em must
upgrade to the new version, or you will not be able
to log in when the upgrade process is complete. Similarly, if
you were not previously using the security set, you must
.Em not
upgrade to the new version.
.It
When you are done upgrading all of the distribution sets you
wish to upgrade, issue the command "Cleanup". It will clean
up the installation, by remaking some system databases. When
it is complete, all you have to do is to reboot(8) your system.
.El
.Pp
.Em Your system has now been upgraded to
.Nx \*V .
.Pp
After a new kernel has been copied to your hard disk, your
machine is a complete NetBSD \*V system. However, that
doesn't mean that you're finished with the upgrade process.
There are several things that you should do, or might have to
do, to insure that the system works properly.
.Pp
First, if you did not upgrade your file systems to the new
file system format during the upgrade process, and you are
upgrading from a pre-1.0 NetBSD, you may want to do so now,
with "fsck -c 2". If you are unsure about the process, it's
suggested that you read the fsck(8) manual page.
.Pp
Second, you will probably want to get the etc distribution,
extract it, and compare its contents with those in your /etc/
directory. You will probably want to replace some of your
system configuration files, or incorporate some of the changes
in the new versions into yours.
.Pp
Third, you will probably want to update the set of device
nodes you have in /dev. If you've changed the contents of
/dev by hand, you will need to be careful about this, but if
not, you can just cd into /dev, and run the command "sh
MAKEDEV all".
.Pp
Fourth, you must deal with certain changes in the formats of
some of the configuration files. The most notable change is
that the "options" given to many of the file systems in
/etc/fstab or by hand have changed, and some of the file
systems have changed names.
*IMPORTANT*: ANY INSTANCES OF "ufs"
IN /etc/fstab MUST BE CHANGED TO "ffs".
.Em Important: any instances of
.Sy ufs
.Em in
.Pa /etc/fstab
.Em must be changed to
.Sy ffs .
To find out what the
new options are, it's suggested that you read the manual page
for the file systems' mount commands, for example
.Xr mount_nfs 8
for NFS.
.(Note
The information for mounts of type
.Em ffs ,
i.e. Fast File System, is contained in the
.Xr mount 8
man page.
.Note)
.Pp
Finally, you will want to delete old binaries that were part
of the version of NetBSD that you upgraded from and have since
been removed from the NetBSD distribution. If you are
upgrading from a pre-1.0 NetBSD, you might also
want to recompile any locally-built binaries, to take
advantage of the shared libraries. (Note that any new
binaries that you build will be dynamically linked, and
therefore take advantage of the shared libraries, by default.
For information on how to make statically linked binaries,
see the cc(1) and ld(1) manual pages.)