upgrade revision 1.4 1 1.4 ross $NetBSD: upgrade,v 1.4 1998/05/12 00:00:19 ross Exp $
2 1.2 perry
3 1.3 ross The upgrade to NetBSD _VER is a binary upgrade; it can be quite difficult
4 1.3 ross to advance to a later version by recompiling from source due primarily
5 1.4 ross to interdependencies in the various components.
6 1.1 oki
7 1.1 oki To do the upgrade, you must have the appropriate kernel-copy floppy
8 1.1 oki image on a disk, and the upgr12.fs floppy image on another. You must
9 1.1 oki also have at least the "base12" binary distribution set available,
10 1.1 oki so that you can upgrade with it, using one of the upgrade methods
11 1.1 oki described above. Finally, you must have sufficient disk space
12 1.1 oki available to install the new binaries. Since the old binaries are
13 1.1 oki being overwritten in place, you only need space for the new binaries,
14 1.1 oki which weren't previously on the system. If you have a few megabytes
15 1.1 oki free on each of your root and /usr partitions, you should have enough
16 1.1 oki space.
17 1.1 oki
18 1.1 oki Since upgrading involves replacing the boot blocks on your NetBSD
19 1.1 oki partition, the kernel, and most of the system binaries, it has the
20 1.1 oki potential to cause data loss. You are strongly advised to BACK UP ANY
21 1.1 oki IMPORTANT DATA ON YOUR DISK, whether on the NetBSD partition or on
22 1.1 oki another operating system's partition, before beginning the upgrade
23 1.1 oki process.
24 1.1 oki
25 1.1 oki To upgrade your system, follow the following instructions:
26 1.1 oki
27 1.1 oki Boot your machine using of the appropriate kernel-copy floppy.
28 1.1 oki
29 1.1 oki You will be prompted to insert a file system floppy. Remove
30 1.1 oki the kernel-copy floppy and insert the upgr12 floppy, then hit
31 1.1 oki any key to continue booting.
32 1.1 oki
33 1.1 oki While booting, you will probably see several warnings. You
34 1.1 oki should be warned that no swap space is present, and that
35 1.1 oki init(8) cannot find /etc/rc. Do not be alarmed, these are
36 1.1 oki completely normal. When you reach the prompt asking you for a
37 1.1 oki shell name, just hit return.
38 1.1 oki
39 1.1 oki You will be presented with some information about the upgrade
40 1.1 oki process and a warning message, and will be asked if you wish
41 1.1 oki to proceed with the upgrade process. If you answer
42 1.1 oki negatively, the upgrade process will stop, and your disk will
43 1.1 oki not be modified. If you answer affirmatively, the upgrade
44 1.1 oki process will begin, and your disk will be modified. You may
45 1.1 oki hit Control-C to stop the upgrade process at any time.
46 1.1 oki However, if you hit it at an inopportune moment, your system
47 1.1 oki may be left in an inconsistent (and possibly unusable) state.
48 1.1 oki
49 1.1 oki You will be asked if you wish to upgrade your file systems to
50 1.1 oki the new file system format. If you do, reply affirmatively.
51 1.1 oki If you don't have your file systems upgraded now, you should
52 1.1 oki probably do it manually after the install process is complete,
53 1.1 oki by using "fsck -c 2". Read the fsck(8) manual page for more
54 1.1 oki details. Note that this step is only important when upgrading
55 1.1 oki from a pre-NetBSD 1.0 release.
56 1.1 oki
57 1.1 oki The upgrade program will then check your root file system,
58 1.1 oki and, if you approved, will upgrade it to the new file system
59 1.1 oki format. It will then mount your root file system on /mnt.
60 1.1 oki
61 1.1 oki If your file systems are being upgraded, the upgrade script
62 1.1 oki will copy the new fsck(8) program to your hard disk and
63 1.1 oki upgrade your remaining file systems.
64 1.1 oki
65 1.1 oki The upgrade program will then automatically replace the boot
66 1.1 oki blocks on your disk with newer versions, and mount all of your
67 1.1 oki file systems under /mnt. (In other words, your root partition
68 1.1 oki will be mounted on /mnt, your /usr partition on /mnt/usr, etc.)
69 1.1 oki
70 1.1 oki If you don't already have the NetBSD distribution sets on your
71 1.1 oki disk, look in the installation section for information on how
72 1.1 oki to transfer them to your disk.
73 1.1 oki
74 1.1 oki If you have only one floppy drive, and don't have the disk
75 1.1 oki space to copy all of the distribution onto the hard drive, you
76 1.1 oki can do the following:
77 1.1 oki
78 1.1 oki Install a kernel on the hard drive as detailed a few
79 1.1 oki paragraphs below, then boot off the hard drive. Now
80 1.1 oki you can copy and install distribution sets
81 1.1 oki incrementally from your lone floppy drive.
82 1.1 oki
83 1.1 oki Once the distribution sets are transferred to your disk,
84 1.1 oki continue here. (Obviously, if the NetBSD distribution sets
85 1.1 oki are already on your disk, because you've transferred them
86 1.1 oki before starting the upgrade process, you don't need to
87 1.1 oki transfer them again now!)
88 1.1 oki
89 1.1 oki After the software has been transferred to the machine (or
90 1.1 oki mounted, in the case of upgrading via NFS), change into the
91 1.1 oki directory containing the "base12" distribution set. Once you
92 1.1 oki are there, run the "Set_tmp_dir" command, and hit return at
93 1.1 oki the prompt to select the default answer for the temporary
94 1.1 oki directory's path name. (It should be the path name of the
95 1.1 oki directory that you're in.)
96 1.1 oki
97 1.1 oki Run the command "Extract base12" to upgrade the base
98 1.1 oki distribution.
99 1.1 oki
100 1.1 oki Repeat the above two steps for all of the sets you wish to
101 1.1 oki upgrade. (For each, change into the directory containing the
102 1.1 oki set, run "Set_tmp_dir" and accept the default path name, then
103 1.1 oki run the "Extract <setname>" command.)
104 1.1 oki
105 1.1 oki If you were previously using the security distribution set,
106 1.1 oki you MUST upgrade to the new version, or you will not be able
107 1.1 oki to log in when the upgrade process is complete. Similarly, if
108 1.1 oki you were not previously using the security set, you must NOT
109 1.1 oki upgrade to the new version.
110 1.1 oki
111 1.1 oki When you are done upgrading all of the distribution sets you
112 1.1 oki wish to upgrade, issue the command "Cleanup". It will clean
113 1.1 oki up the installation, by remaking some system databases. When
114 1.1 oki it is complete, you should use "halt" to halt the system.
115 1.1 oki
116 1.1 oki When the system is halted, remove the "upgr12" floppy from
117 1.1 oki the floppy drive, and replace it with the NetBSD 1.2
118 1.1 oki kernel-copy floppy that you previously booted from. Reboot
119 1.1 oki with that floppy.
120 1.1 oki
121 1.1 oki Once again, you will be prompted to insert a file system
122 1.1 oki floppy. DO NOT replace the kernel-copy floppy, just hit any
123 1.1 oki key.
124 1.1 oki
125 1.1 oki Again, While booting, you may see several warnings. You may
126 1.1 oki be warned that no swap space is present, that init(8) cannot
127 1.1 oki find /etc/rc, and that one or more databases with names like
128 1.1 oki "pwd.db" cannot be found. Do not be alarmed, as, again, these
129 1.1 oki are completely normal. Hit return at the prompt asking you
130 1.1 oki for a shell name.
131 1.1 oki
132 1.1 oki You will be presented with a shell prompt, at which you should
133 1.1 oki enter the "copy_kernel" command. It will ask you what
134 1.1 oki partition to copy the kernel to, and you should reply with the
135 1.1 oki name of your root partition (e.g. sd0a or wd0a).
136 1.1 oki
137 1.1 oki You will be asked if you are sure that you want to copy the
138 1.1 oki kernel. Reply affirmatively, and it will check the file
139 1.1 oki system on your root partition, mount it, and copy the kernel.
140 1.1 oki Once the kernel is copied, you should use "halt" to halt the
141 1.1 oki system.
142 1.1 oki
143 1.1 oki Once the system is halted, remove the kernel-copy floppy from
144 1.1 oki the floppy disk drive, and hit any key to reboot.
145 1.1 oki
146 1.1 oki Your system has now been upgraded to NetBSD 1.2.
147 1.1 oki
148 1.1 oki After a new kernel has been copied to your hard disk, your
149 1.1 oki machine is a complete NetBSD 1.2 system. However, that
150 1.1 oki doesn't mean that you're finished with the upgrade process.
151 1.1 oki There are several things that you should do, or might have to
152 1.1 oki do, to insure that the system works properly.
153 1.1 oki
154 1.1 oki First, if you did not upgrade your file systems to the new
155 1.1 oki file system format during the upgrade process, and you are
156 1.1 oki upgrading from a pre-1.0 NetBSD, you may want to do so now,
157 1.1 oki with "fsck -c 2". If you are unsure about the process, it's
158 1.1 oki suggested that you read the fsck(8) manual page.
159 1.1 oki
160 1.1 oki Second, you will probably want to get the etc12 distribution,
161 1.1 oki extract it, and compare its contents with those in your /etc/
162 1.1 oki directory. You will probably want to replace some of your
163 1.1 oki system configuration files, or incorporate some of the changes
164 1.1 oki in the new versions into yours.
165 1.1 oki
166 1.1 oki Third, you will probably want to update the set of device
167 1.1 oki nodes you have in /dev. If you've changed the contents of
168 1.1 oki /dev by hand, you will need to be careful about this, but if
169 1.1 oki not, you can just cd into /dev, and run the command "sh
170 1.1 oki MAKEDEV all".
171 1.1 oki
172 1.1 oki Fourth, you must deal with certain changes in the formats of
173 1.1 oki some of the configuration files. The most notable change is
174 1.1 oki that the "options" given to many of the file systems in
175 1.1 oki /etc/fstab or by hand have changed, and some of the file
176 1.1 oki systems have changed names. *IMPORTANT*: ANY INSTANCES OF "ufs"
177 1.1 oki IN /etc/fstab MUST BE CHANGED TO "ffs". To find out what the
178 1.1 oki new options are, it's suggested that you read the manual page
179 1.1 oki for the file systems' mount commands, for example mount_nfs(8)
180 1.1 oki for NFS. (Note that the information for mounts of type "ffs",
181 1.1 oki i.e. Fast File Systems, are contained in the mount(8) man
182 1.1 oki page.)
183 1.1 oki
184 1.1 oki Finally, you will want to delete old binaries that were part
185 1.1 oki of the version of NetBSD that you upgraded from and have since
186 1.1 oki been removed from the NetBSD distribution. If you are
187 1.1 oki upgrading from a pre-1.0 NetBSD, you might also
188 1.1 oki want to recompile any locally-built binaries, to take
189 1.1 oki advantage of the shared libraries. (Note that any new
190 1.1 oki binaries that you build will be dynamically linked, and
191 1.1 oki therefore take advantage of the shared libraries, by default.
192 1.1 oki For information on how to make statically linked binaries,
193 1.1 oki see the cc(1) and ld(1) manual pages.)
194