1 .\" $NetBSD: upgrade,v 1.18 2002/07/22 14:02:07 lukem Exp $
3 .\" Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
16 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 .\" POSSIBILITY OF SUCH DAMAGE.
28 .\" NOTE: This file is shared between the hp300 and the mvme68k
30 It is possible to easily upgrade your existing
32 system using the upgrade program in the miniroot or by manually performing
33 the same steps as the miniroot upgrade program.
35 .Ss2 Upgrading using the miniroot
37 If you wish to upgrade
38 your system by this method, simply select the
40 option once the miniroot has booted.
41 The upgrade program with then guide you through the procedure.
43 While you can boot the miniroot using the same methods described above for
46 there are easier and less intrusive options since your disk is already
48 The easiest is to dump the miniroot to your swap
49 partition and boot from that.
51 Download the files you'll need to upgrade
53 In particular, make sure you have on your locally mounted file systems
59 .Sq "single-user mode" :
61 Follow the instructions in the section above on
62 .Sx Chosing a kernel location
67 Extract and install a new boot block:
69 Make sure you install the bootstrap program distributed with this version of
72 .No # Ic "tar -xpvzf base.tgz ./usr/mdec"
73 .No # Ic "disklabel -B -b ./usr/mdec/uboot.lif " Ar root-disk
85 Install the miniroot file system:
87 First make sure that your
89 partition has enough room for the uncompressed miniroot (otherwise it
90 might overwrite another partition or the end of the disk).
92 .No # Ic "gunzip miniroot.fs.gz"
93 .No # Ic "dd if=miniroot.fs of=/dev/rd0b"
98 Follow the instructions in the section above on
99 .Sx Chosing a kernel location
106 The upgrade program will:
108 Enable the network based on your system's current
109 network configuration.
111 Mount your existing file systems.
113 Extract binary sets from the media of your choice.
115 Fixup your system's existing
117 changing the occurrences of
121 and let you edit the resulting file.
123 Make new device nodes in your root file system under
126 Don't forget to extract the
128 set from the distribution.
132 be backed up; doing so would be pointless, since older kernels may not be
137 Install a new boot block.
139 Check your file systems for integrity.
141 You'll have to reboot your system manually
146 While using the miniroot's upgrade program is the preferred method
147 of upgrading your system, it is possible to upgrade your system
149 To do this, follow the following procedure:
155 binary set in a file system
156 accessible to the target machine.
157 A local file system is preferred, since the NFS subsystem in the
159 kernel may be incompatible with your old binaries.
161 Back up your pre-existing kernel and copy the \*V
162 kernel into your root partition
166 Extract and install a new boot block:
168 Make sure you install the bootstrap program distributed with this version of
171 .No # Ic "tar -xpvzf base.tgz ./usr/mdec"
172 .No # Ic "disklabel -B -b ./usr/mdec/uboot.lif " Ar root-disk
182 Reboot with the \*V kernel into single-user mode.
184 Check all file systems:
186 .Dl # Ic "/sbin/fsck -pf"
188 Mount all local file systems:
190 .Dl # Ic "/sbin/mount -a -t nonfs"
196 on an NFS server, you will want to mount those file systems as well.
197 To do this, you will need to enable the network:
199 .Dl # Ic "sh /etc/rc.d/network start"
201 Make sure you are in the root file system
209 .Dl # Ic "pax -zrvpe -f" Em /path/to/ Ns Ic base.tgz
212 Install a new boot block:
214 .Dl # Ic "cd /usr/mdec"
215 .Dl # Ic "cp bootsd /.bootsd"
216 .Dl # Ic "./installboot /.bootsd bootxx \*<" Ar root-disk
224 Sync the file systems:
228 At this point you may extract any other binary sets
229 you may have placed on local file systems, or you may
230 wish to extract additional sets at a later time.
231 To extract these sets, use the following commands:
234 .Dl # Ic "pax -zrvpe -f" Ar path_to_set
242 Instead, you should extract that set into another
243 area and carefully merge the changes by hand.