119 lines
4.4 KiB
Plaintext
119 lines
4.4 KiB
Plaintext
.\" $NetBSD: upgrade,v 1.8 1999/01/25 23:34:22 garbled 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.
|
|
.\"
|
|
It is possible to easily upgrade your existing NetBSD/\*m system
|
|
using the upgrade program in the miniroot. If you wish to upgrade
|
|
your system by this method, simply select the `upgrade' option once
|
|
the miniroot has booted. The upgrade program with then guide you
|
|
through the procedure. The upgrade program will:
|
|
.Bl -bullet
|
|
.It
|
|
Enable the network based on your system's current
|
|
network configuration.
|
|
.It
|
|
Mount your existing filesystems.
|
|
.It
|
|
Extract binary sets from the media of your choice.
|
|
.It
|
|
Fixup your system's existing /etc/fstab, changing the
|
|
occurrences of `ufs' to `ffs' and let you edit the
|
|
resulting file.
|
|
.It
|
|
Make new device nodes in your root filesystem.
|
|
.It
|
|
Don't forget to extract the `kern' set from the distribution.
|
|
NOTE: the existing kernel WILL NOT be backed up; doing
|
|
so would be pointless, since older kernels may not be
|
|
capable of running NetBSD _VER executables.
|
|
.It
|
|
Install a new boot block.
|
|
.It
|
|
Check your filesystems for integrity.
|
|
.El
|
|
.Pp
|
|
While using the miniroot's upgrade program is the preferred method
|
|
of upgrading your system, it is possible to upgrade your system
|
|
manually. To do this, follow the following procedure:
|
|
.Bl -bullet
|
|
.It
|
|
Place _at least_ the `base' binary set in a filesystem
|
|
accessible to the target machine. A local filesystem
|
|
is preferred, since the NFS subsystem in the NetBSD _VER
|
|
kernel may be incompatible with your old binaries.
|
|
.It
|
|
Back up your pre-existing kernel and copy the _VER
|
|
kernel into your root partition.
|
|
.It
|
|
Reboot with the _VER kernel into single-user mode.
|
|
.It
|
|
Check all filesystems:
|
|
.Dl /sbin/fsck -pf
|
|
.It
|
|
Mount all local filesystems:
|
|
.Dl /sbin/mount -a -t nonfs
|
|
.It
|
|
If you keep /usr or /usr/share on an NFS server, you
|
|
will want to mount those filesystems as well. To do
|
|
this, you will need to enable the network:
|
|
.Dl sh /etc/netstart
|
|
.It
|
|
Run the update(8) daemon, to ensure that new programs
|
|
are actually stored on disk.
|
|
.Dl update
|
|
.It
|
|
Make sure you are in the root filesystem and extract
|
|
the `base' binary set:
|
|
.Bd -literal -offset indent
|
|
cd /
|
|
pax -zrvpe -f /path/to/base.tgz
|
|
.Ed
|
|
.It
|
|
Install a new boot block:
|
|
.D1 Ic cd /usr/mdec
|
|
.D1 Ic disklabel\ -B Ar root\ disk Em (e.g.\ sd0)
|
|
.It
|
|
Sync the filesystems:
|
|
.Dl sync
|
|
.It
|
|
At this point you may extract any other binary sets
|
|
you may have placed on local filesystems, or you may
|
|
wish to extract additional sets at a later time.
|
|
To extract these sets, use the following commands:
|
|
.D1 cd /
|
|
.D1 pax -zrvpe -f Ar path_to_set
|
|
.El
|
|
NOTE: you SHOULD NOT extract the
|
|
.Sy etc
|
|
set if upgrading. Instead, you should extract that set into another
|
|
area and carefully merge the changes by hand.
|