2002-07-22 18:02:07 +04:00
|
|
|
.\" $NetBSD: upgrade,v 1.18 2002/07/22 14:02:07 lukem Exp $
|
1999-01-13 10:30:01 +03:00
|
|
|
.\"
|
2002-06-29 14:54:14 +04:00
|
|
|
.\" Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
|
1999-01-13 10:30:01 +03:00
|
|
|
.\" 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.
|
|
|
|
.\"
|
2000-10-29 17:08:04 +03:00
|
|
|
.
|
|
|
|
.\" NOTE: This file is shared between the hp300 and the mvme68k
|
|
|
|
.
|
2000-10-10 16:55:15 +04:00
|
|
|
It is possible to easily upgrade your existing
|
|
|
|
.Nx*M
|
2002-05-05 01:36:57 +04:00
|
|
|
system using the upgrade program in the miniroot or by manually performing
|
|
|
|
the same steps as the miniroot upgrade program.
|
|
|
|
.
|
|
|
|
.Ss2 Upgrading using the miniroot
|
|
|
|
.
|
|
|
|
If you wish to upgrade
|
2000-10-29 17:08:04 +03:00
|
|
|
your system by this method, simply select the
|
|
|
|
.Sy upgrade
|
|
|
|
option once the miniroot has booted.
|
|
|
|
The upgrade program with then guide you through the procedure.
|
2002-07-22 18:02:07 +04:00
|
|
|
.if \n[hp300] \{\
|
2002-05-05 01:36:57 +04:00
|
|
|
While you can boot the miniroot using the same methods described above for
|
|
|
|
a fresh install of
|
|
|
|
.Nx*M
|
|
|
|
there are easier and less intrusive options since your disk is already
|
2002-06-29 14:54:14 +04:00
|
|
|
labeled and bootable.
|
|
|
|
The easiest is to dump the miniroot to your swap
|
2002-05-05 01:36:57 +04:00
|
|
|
partition and boot from that.
|
|
|
|
.(enum
|
|
|
|
Download the files you'll need to upgrade
|
|
|
|
.Pp
|
2002-07-11 08:52:48 +04:00
|
|
|
In particular, make sure you have on your locally mounted file systems
|
2002-05-05 01:36:57 +04:00
|
|
|
.Pa base.tgz
|
|
|
|
and
|
|
|
|
.Pa miniroot.fs.gz
|
|
|
|
.It
|
2002-06-29 14:54:14 +04:00
|
|
|
Boot your \*M into
|
2002-05-05 01:36:57 +04:00
|
|
|
.Sq "single-user mode" :
|
|
|
|
.Pp
|
2002-06-29 14:54:14 +04:00
|
|
|
Follow the instructions in the section above on
|
2002-05-05 01:36:57 +04:00
|
|
|
.Sx Chosing a kernel location
|
2002-06-29 14:54:14 +04:00
|
|
|
and type
|
2002-05-05 01:36:57 +04:00
|
|
|
.Li -s
|
|
|
|
at the prompt.
|
|
|
|
.It
|
|
|
|
Extract and install a new boot block:
|
|
|
|
.Pp
|
|
|
|
Make sure you install the bootstrap program distributed with this version of
|
|
|
|
.Nx*M .
|
|
|
|
.(disp
|
|
|
|
.No # Ic "tar -xpvzf base.tgz ./usr/mdec"
|
|
|
|
.No # Ic "disklabel -B -b ./usr/mdec/uboot.lif " Ar root-disk
|
|
|
|
.disp)
|
|
|
|
E.g.:
|
|
|
|
.Ar root-disk
|
|
|
|
could be
|
2002-06-29 14:54:14 +04:00
|
|
|
.Li sd0
|
|
|
|
or
|
2002-05-05 01:36:57 +04:00
|
|
|
.Li rd0 .
|
2002-06-29 14:54:14 +04:00
|
|
|
We'll assume
|
2002-05-05 01:36:57 +04:00
|
|
|
.Li rd0
|
|
|
|
for now.
|
|
|
|
.It
|
2002-07-11 08:52:48 +04:00
|
|
|
Install the miniroot file system:
|
2002-05-05 01:36:57 +04:00
|
|
|
.Pp
|
2002-06-29 14:54:14 +04:00
|
|
|
First make sure that your
|
2002-05-05 01:36:57 +04:00
|
|
|
.Sq Li "b"
|
|
|
|
partition has enough room for the uncompressed miniroot (otherwise it
|
|
|
|
might overwrite another partition or the end of the disk).
|
|
|
|
.(disp
|
|
|
|
.No # Ic "gunzip miniroot.fs.gz"
|
|
|
|
.No # Ic "dd if=miniroot.fs of=/dev/rd0b"
|
|
|
|
.disp)
|
|
|
|
.It
|
|
|
|
Boot the miniroot:
|
|
|
|
.Pp
|
2002-06-29 14:54:14 +04:00
|
|
|
Follow the instructions in the section above on
|
2002-05-05 01:36:57 +04:00
|
|
|
.Sx Chosing a kernel location
|
2002-06-29 14:54:14 +04:00
|
|
|
and type
|
2002-05-05 01:36:57 +04:00
|
|
|
.Li rd0b:netbsd
|
|
|
|
at the prompt.
|
|
|
|
.enum)
|
|
|
|
.Pp
|
2002-07-22 18:02:07 +04:00
|
|
|
.\} \" ! \n[hp300]
|
2000-10-29 17:08:04 +03:00
|
|
|
The upgrade program will:
|
2000-10-10 16:55:15 +04:00
|
|
|
.(enum
|
1999-01-13 10:30:01 +03:00
|
|
|
Enable the network based on your system's current
|
|
|
|
network configuration.
|
|
|
|
.It
|
2000-10-29 17:08:04 +03:00
|
|
|
Mount your existing file systems.
|
1999-01-13 10:30:01 +03:00
|
|
|
.It
|
|
|
|
Extract binary sets from the media of your choice.
|
|
|
|
.It
|
2000-10-29 17:08:04 +03:00
|
|
|
Fixup your system's existing
|
|
|
|
.Pa /etc/fstab ,
|
|
|
|
changing the occurrences of
|
|
|
|
.Sy ufs
|
|
|
|
to
|
|
|
|
.Sy ffs
|
|
|
|
and let you edit the resulting file.
|
1999-01-13 10:30:01 +03:00
|
|
|
.It
|
2000-10-29 17:08:04 +03:00
|
|
|
Make new device nodes in your root file system under
|
|
|
|
.Pa /dev .
|
1999-01-13 10:30:01 +03:00
|
|
|
.It
|
2000-10-29 17:08:04 +03:00
|
|
|
Don't forget to extract the
|
|
|
|
.Sy kern
|
|
|
|
set from the distribution.
|
2000-10-10 16:55:15 +04:00
|
|
|
.(Note
|
2000-10-29 17:08:04 +03:00
|
|
|
The existing kernel
|
|
|
|
.Em will not
|
|
|
|
be backed up; doing so would be pointless, since older kernels may not be
|
|
|
|
capable of running
|
|
|
|
.Nx \*V executables.
|
2000-10-10 16:55:15 +04:00
|
|
|
.Note)
|
1999-01-13 10:30:01 +03:00
|
|
|
.It
|
|
|
|
Install a new boot block.
|
|
|
|
.It
|
2000-10-29 17:08:04 +03:00
|
|
|
Check your file systems for integrity.
|
2002-05-05 01:36:57 +04:00
|
|
|
.It
|
|
|
|
You'll have to reboot your system manually
|
2000-10-10 16:55:15 +04:00
|
|
|
.enum)
|
2002-05-05 01:36:57 +04:00
|
|
|
.
|
|
|
|
.Ss2 Manual upgrade
|
|
|
|
.
|
1995-11-17 09:54:39 +03:00
|
|
|
While using the miniroot's upgrade program is the preferred method
|
|
|
|
of upgrading your system, it is possible to upgrade your system
|
2002-06-29 14:54:14 +04:00
|
|
|
manually.
|
|
|
|
To do this, follow the following procedure:
|
2000-10-10 16:55:15 +04:00
|
|
|
.(enum
|
2000-10-29 17:08:04 +03:00
|
|
|
Place
|
|
|
|
.Em at least
|
|
|
|
the
|
|
|
|
.Sy base
|
|
|
|
binary set in a file system
|
2002-06-29 14:54:14 +04:00
|
|
|
accessible to the target machine.
|
|
|
|
A local file system is preferred, since the NFS subsystem in the
|
2000-10-29 17:08:04 +03:00
|
|
|
.Nx \*V
|
1999-01-13 10:30:01 +03:00
|
|
|
kernel may be incompatible with your old binaries.
|
|
|
|
.It
|
2000-10-29 17:08:04 +03:00
|
|
|
Back up your pre-existing kernel and copy the \*V
|
|
|
|
kernel into your root partition
|
|
|
|
.Pq Pa / .
|
2002-07-22 18:02:07 +04:00
|
|
|
.ie \n[hp300] \{\
|
2002-05-05 01:36:57 +04:00
|
|
|
.It
|
|
|
|
Extract and install a new boot block:
|
|
|
|
.Pp
|
|
|
|
Make sure you install the bootstrap program distributed with this version of
|
|
|
|
.Nx*M .
|
|
|
|
.(disp
|
|
|
|
.No # Ic "tar -xpvzf base.tgz ./usr/mdec"
|
|
|
|
.No # Ic "disklabel -B -b ./usr/mdec/uboot.lif " Ar root-disk
|
|
|
|
.disp)
|
|
|
|
E.g.:
|
|
|
|
.Ar root-disk
|
|
|
|
could be
|
2002-06-29 14:54:14 +04:00
|
|
|
.Li sd0
|
|
|
|
or
|
2002-05-05 01:36:57 +04:00
|
|
|
.Li rd0 .
|
|
|
|
.\}
|
1999-01-13 10:30:01 +03:00
|
|
|
.It
|
2000-10-29 17:08:04 +03:00
|
|
|
Reboot with the \*V kernel into single-user mode.
|
1999-01-13 10:30:01 +03:00
|
|
|
.It
|
2000-10-29 17:08:04 +03:00
|
|
|
Check all file systems:
|
|
|
|
.Pp
|
|
|
|
.Dl # Ic "/sbin/fsck -pf"
|
1999-01-13 10:30:01 +03:00
|
|
|
.It
|
2000-10-29 17:08:04 +03:00
|
|
|
Mount all local file systems:
|
|
|
|
.Pp
|
|
|
|
.Dl # Ic "/sbin/mount -a -t nonfs"
|
|
|
|
.It
|
|
|
|
If you keep
|
|
|
|
.Pa /usr
|
|
|
|
or
|
|
|
|
.Pa /usr/share
|
|
|
|
on an NFS server, you will want to mount those file systems as well.
|
|
|
|
To do this, you will need to enable the network:
|
|
|
|
.Pp
|
|
|
|
.Dl # Ic "sh /etc/rc.d/network start"
|
1999-01-13 10:30:01 +03:00
|
|
|
.It
|
2000-10-29 17:08:04 +03:00
|
|
|
Make sure you are in the root file system
|
|
|
|
.Pq Pa /
|
|
|
|
and extract
|
|
|
|
the
|
|
|
|
.Sy base
|
|
|
|
binary set:
|
|
|
|
.Pp
|
|
|
|
.Dl # Ic "cd /"
|
2000-11-04 10:02:41 +03:00
|
|
|
.Dl # Ic "pax -zrvpe -f" Em /path/to/ Ns Ic base.tgz
|
2002-07-22 18:02:07 +04:00
|
|
|
.if \n[mvme68k] \{\
|
1999-01-13 10:30:01 +03:00
|
|
|
.It
|
|
|
|
Install a new boot block:
|
2000-10-29 17:08:04 +03:00
|
|
|
.Pp
|
|
|
|
.Dl # Ic "cd /usr/mdec"
|
|
|
|
.Dl # Ic "cp bootsd /.bootsd"
|
2000-11-02 04:37:46 +03:00
|
|
|
.Dl # Ic "./installboot /.bootsd bootxx \*<" Ar root-disk
|
2000-10-29 17:08:04 +03:00
|
|
|
.Pp
|
|
|
|
E.g.:
|
|
|
|
.Ar root-disk
|
|
|
|
could be
|
|
|
|
.Pa /dev/rsd0a .
|
|
|
|
.\}
|
1999-01-13 10:30:01 +03:00
|
|
|
.It
|
2000-10-29 17:08:04 +03:00
|
|
|
Sync the file systems:
|
|
|
|
.Pp
|
|
|
|
.Dl # Ic sync
|
1999-01-13 10:30:01 +03:00
|
|
|
.It
|
|
|
|
At this point you may extract any other binary sets
|
2000-10-29 17:08:04 +03:00
|
|
|
you may have placed on local file systems, or you may
|
1999-01-13 10:30:01 +03:00
|
|
|
wish to extract additional sets at a later time.
|
|
|
|
To extract these sets, use the following commands:
|
2000-10-29 17:08:04 +03:00
|
|
|
.Pp
|
|
|
|
.Dl # Ic "cd /"
|
2000-11-02 04:37:46 +03:00
|
|
|
.Dl # Ic "pax -zrvpe -f" Ar path_to_set
|
2000-10-10 16:55:15 +04:00
|
|
|
.enum)
|
|
|
|
.(Note
|
2000-10-29 17:08:04 +03:00
|
|
|
You
|
|
|
|
.Em should not
|
|
|
|
extract the
|
1999-01-13 10:30:01 +03:00
|
|
|
.Sy etc
|
2002-06-29 14:54:14 +04:00
|
|
|
set if upgrading.
|
|
|
|
Instead, you should extract that set into another
|
1999-01-13 10:30:01 +03:00
|
|
|
area and carefully merge the changes by hand.
|
2000-10-10 16:55:15 +04:00
|
|
|
.Note)
|