1999-01-26 02:34:20 +03:00
|
|
|
.\" $NetBSD: upgrade,v 1.14 1999/01/25 23:34:22 garbled Exp $
|
1999-01-13 10:30:01 +03:00
|
|
|
.\"
|
|
|
|
.\" 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
|
1998-05-09 07:49:30 +04:00
|
|
|
to advance to a later version by recompiling from source due primarily
|
1998-05-12 04:00:18 +04:00
|
|
|
to interdependencies in the various components.
|
1999-01-13 10:30:01 +03:00
|
|
|
.Pp
|
|
|
|
No automated upgrade procedure exists for upgrading to release \*V for the
|
|
|
|
NetBSD/mac68k architecture. The current procedure is essentially to perform
|
|
|
|
a new install from scratch. It is hoped that there will be a good upgrade
|
|
|
|
procedure for future releases. Please feel free to volunteer to help
|
1997-11-12 05:16:09 +03:00
|
|
|
replace these installation tools.
|
1999-01-13 10:30:01 +03:00
|
|
|
.Pp
|
|
|
|
The following steps outline the current upgrade procedure. These steps
|
|
|
|
should help ease the upgrade process. Please read these instructions
|
|
|
|
carefully and completely before proceeding.
|
|
|
|
.Bl -enum
|
|
|
|
.It
|
|
|
|
Since upgrading involves replacing 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. Although the upgrade should not
|
|
|
|
damage your filesystem(s) in any way, you never know what may happen.
|
|
|
|
.It
|
|
|
|
Download the distribution sets you want from the
|
|
|
|
.Pa mac68k/binary/sets
|
|
|
|
subdirectory of the
|
|
|
|
.Nx \*V
|
|
|
|
distribution. You will need the base
|
|
|
|
set and the kernel at a minimum. Be sure to download the files in
|
|
|
|
.Em binary
|
|
|
|
mode. If you will be upgrading from within NetBSD, make sure
|
|
|
|
that you place the distribution sets on a filesystem you will be able to
|
|
|
|
reach from single-user mode.
|
|
|
|
.It
|
|
|
|
Install the \*V kernel. You may either use the Installer utility
|
|
|
|
(included in the
|
|
|
|
.Pa installation/misc
|
|
|
|
subdirectory) or install from within
|
|
|
|
.Nx
|
|
|
|
(the latter is recommended for speed reasons). If you
|
|
|
|
choose the former, proceed as you normally would. If you choose to
|
|
|
|
install from within NetBSD, then boot (or shutdown) into single-user
|
|
|
|
mode and do the following:
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
cd /
|
|
|
|
tar -zxvpf /path/to/kern.tgz
|
|
|
|
.Ed
|
|
|
|
There is no need to backup your old kernel explicitly since it will be
|
|
|
|
incapable of running many of the newer binaries you are about to
|
|
|
|
install. (Unless, of course, you have a backup copy of your older
|
|
|
|
binaries and want to revert to them for some reason.) However, you
|
|
|
|
might want to keep a backup if you are upgrading from within
|
|
|
|
.Nx
|
|
|
|
just in case the newer kernel has trouble booting your machine.
|
|
|
|
.It
|
|
|
|
If you are installing using the Installer, skip to step 5. Otherwise,
|
|
|
|
reboot into
|
|
|
|
.Nx
|
|
|
|
in single-user mode. Run
|
|
|
|
.Ic fsck Fl f
|
|
|
|
and then mount all
|
|
|
|
local partitions read/write. Usually
|
|
|
|
.Ic mount Fl a t Ic nonfs
|
|
|
|
should do the
|
|
|
|
trick, but if you have several partitions on the same disk, take note of
|
|
|
|
the fact that a change in partition numbering may have moved a few of
|
|
|
|
your partitions around. You can do a
|
|
|
|
.Ic disklabel sd Ns Ar X
|
|
|
|
(where
|
|
|
|
.Ar X
|
|
|
|
is a
|
|
|
|
drive on which you have
|
|
|
|
.Nx
|
|
|
|
partitions) to see how the partitions are
|
|
|
|
currently layed out. It is likely that a partition has shifted into the
|
|
|
|
.Cm sd Ns Ar X Ns Cm d
|
|
|
|
or
|
|
|
|
.Cm sd Ns Ar X Ns Cm e
|
|
|
|
slots, slots that often were not available under
|
|
|
|
previous releases of NetBSD. If this is the case, you will need to
|
|
|
|
manually mount your root partition
|
|
|
|
.Pq via Sy mount Fl w Cm /
|
|
|
|
and edit your
|
|
|
|
.Pa /etc/fstab
|
|
|
|
file to reflect the new partition layout. Unless you are
|
|
|
|
familiar with
|
|
|
|
.Xr ex 1
|
|
|
|
or
|
|
|
|
.Xr ed 1 .
|
|
|
|
the easiest way to fix your
|
|
|
|
.Pa /etc/fstab
|
|
|
|
file
|
|
|
|
is probably to simply do a
|
|
|
|
.Ic cat \*> /etc/fstab
|
|
|
|
and type in the corrected file in its entirety.
|
|
|
|
.It
|
|
|
|
Install the distribution sets. Keep in mind that the
|
|
|
|
.Nx \*V
|
|
|
|
distribution takes up a considerably larger amount of disk space than
|
|
|
|
did the 1.2 or 1.2.1 distributions. If you are using the Installer,
|
|
|
|
proceed normally (remember that you will need to mount non-root
|
|
|
|
partitions by hand using the MiniShell before installing). If you are
|
|
|
|
installing from within NetBSD, do the following:
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
cd /
|
1999-01-26 02:34:20 +03:00
|
|
|
pax -zrvpe -f /path/to/base.tgz
|
1999-01-13 10:30:01 +03:00
|
|
|
.Ed
|
|
|
|
.Pp
|
1999-01-26 02:34:20 +03:00
|
|
|
Keep in mind that there is
|
1999-01-13 10:30:01 +03:00
|
|
|
no going back once you have installed the base set short of a complete
|
|
|
|
re-install of an earlier distribution. Continue with the appropriate
|
|
|
|
command line for each of the other sets you wish to install except for
|
|
|
|
the etc set. If you are in the Installer, open up the Minishell and do
|
|
|
|
the following:
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
cd /tmp
|
|
|
|
exit
|
|
|
|
.Ed
|
|
|
|
Ignore the warning message this will cause. Now, use the Installer to
|
|
|
|
install the
|
|
|
|
.Sy etc No set (it will install into
|
|
|
|
.Pa /tmp No instead of the
|
|
|
|
.Pa /etc No directory).
|
|
|
|
.Pp
|
|
|
|
If you are in NetBSD, do the following instead:
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
cd /tmp
|
1999-01-26 02:34:20 +03:00
|
|
|
tar -zrvpe -f /path/to/etc.tgz
|
1999-01-13 10:30:01 +03:00
|
|
|
.Ed
|
|
|
|
.It
|
|
|
|
If you are in the Installer, quit it and boot into
|
|
|
|
.Nx
|
|
|
|
in single-user
|
|
|
|
mode. From there,
|
|
|
|
.Ic cd No to the Pa /tmp/etc
|
|
|
|
directory and compare each file
|
|
|
|
there with your old files in
|
|
|
|
.Pa /etc .
|
|
|
|
You will probably want to replace
|
|
|
|
some of your system configuration files, or incorporate some of the
|
|
|
|
changes in the new versions into yours. You should take note of the
|
|
|
|
following when upgrading to the
|
|
|
|
.Nx \*V
|
|
|
|
etc.tgz set:
|
|
|
|
.Bl -bullet
|
|
|
|
.It
|
|
|
|
The first file to pay attention to is /etc/rc.conf. This file did not
|
|
|
|
exist under
|
|
|
|
.Nx 1.2 ,
|
|
|
|
but it is used to configure the rc scripts
|
|
|
|
under
|
|
|
|
.Nx \*V .
|
|
|
|
Edit the file to your preferences, making sure
|
|
|
|
that you change the line that says:
|
|
|
|
.Dl rc_configured=NO
|
|
|
|
to read:
|
|
|
|
.Dl rc_configured=YES
|
|
|
|
.Pp
|
|
|
|
This will enable all of the options you have configured in /etc/rc.conf.
|
|
|
|
.It
|
|
|
|
The next important item to take note of is the new networking
|
|
|
|
configuration files. If you currently have an /etc/hostname.xxN file
|
|
|
|
(fill in the xx with either ae or sn and the X with a number), you will
|
|
|
|
need to convert it into an ifconfig.xxN file before networking
|
|
|
|
automatically works. The format for the new file is simply the
|
|
|
|
arguments which you would give to ifconfig on the command line. The
|
|
|
|
following is an example of the minimal ifconfig.xxN file:
|
|
|
|
.Dl inet hostname.domain.dom netmask 0xffffff00
|
|
|
|
Read the ifconfig(8) man page for more details on arguments to ifconfig.
|
|
|
|
Be sure to set
|
|
|
|
.Dl auto_ifconfig=YES
|
|
|
|
in
|
|
|
|
.Pa /etc/rc.conf
|
|
|
|
to ensure that your network interfaces will be brought
|
|
|
|
up automatically on boot.
|
|
|
|
.It
|
|
|
|
Several of the options given to many of the file systems have changed,
|
|
|
|
and some of the file systems have changed names.
|
|
|
|
.Em \&It is imperative that
|
|
|
|
.Em you change any instances of
|
|
|
|
.Ic ufs Em in Pa /etc/fstab Em to
|
|
|
|
.Ic ffs .
|
|
|
|
To find out
|
|
|
|
more about different filesystem options, read the man page for the
|
|
|
|
associated mount command (e.g.
|
|
|
|
.Xr mount_mfs 8
|
|
|
|
for MFS filesystems; note:
|
|
|
|
FFS type filesystems are documented in the
|
|
|
|
.Xr mount 8
|
|
|
|
man page). If you
|
|
|
|
have not already done so, you may also need to correct
|
|
|
|
.Pa /etc/fstab
|
|
|
|
for a shift in the partition numbering scheme. See step 4 above for more
|
|
|
|
details.
|
|
|
|
.It
|
|
|
|
You will also probably want to upgrade your device nodes at this time
|
|
|
|
as well. Make sure you have installed the latest MAKEDEV script (it
|
|
|
|
should be included in the etc set) and perform the following commands:
|
|
|
|
.Dl cd /dev
|
|
|
|
.Dl sh MAKEDEV all
|
|
|
|
.El
|
|
|
|
.It
|
|
|
|
A number of binaries have changed their locations from
|
|
|
|
.Nx 1.2.1
|
|
|
|
to
|
|
|
|
.Nx \*V
|
|
|
|
(most of these have moved from
|
|
|
|
.Pa /sbin
|
|
|
|
to
|
|
|
|
.Pa /usr/sbin ) . No A few
|
|
|
|
binaries have been removed. It is probably best if you scan the
|
|
|
|
modification dates of the files in the
|
|
|
|
.Pa /sbin directory. If there are
|
|
|
|
files in the directory which have newer counterparts in the
|
|
|
|
.Pa /usr/sbin
|
|
|
|
directory, it is a very good idea to remove the older files (you will
|
|
|
|
probably run into difficulties later if you choose not to do this).
|
|
|
|
You should also check the
|
|
|
|
.Pa /sbin , /bin , /usr/bin/ No , and
|
|
|
|
.Pa /usr/sbin
|
|
|
|
directories for old binaries that are no longer part of the NetBSD
|
|
|
|
distribution and delete them as well. In general, all the files in a
|
|
|
|
particular distribution should have similar modification dates, so
|
|
|
|
looking at these is a good way of determining a file's age.
|
|
|
|
.It
|
|
|
|
Run
|
|
|
|
.Ic fsck Fl f
|
|
|
|
to make sure that your filesystem is still consistent. If
|
|
|
|
fsck reports any errors, fix them by answering
|
|
|
|
.Ic y
|
|
|
|
to its suggested
|
|
|
|
solutions
|
|
|
|
.(tag Em Note:
|
|
|
|
if there are a large number of errors, you may wish
|
|
|
|
to stop and run
|
|
|
|
.Ic fsck Fl fy
|
|
|
|
to automatically answer
|
|
|
|
.Ic yes
|
|
|
|
instead.
|
|
|
|
.tag)
|
|
|
|
.It
|
|
|
|
Exit from single-user mode and it should continue to boot into
|
|
|
|
multi-user mode.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
At this point you have successfully upgraded to
|
|
|
|
.Nx \*V .
|