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