summaryrefslogtreecommitdiff
path: root/distrib/notes/i386/upgrade
blob: 61df886333da65a9228e0d079b895edf63bf388a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
To do the upgrade, you must have the appropriate kernel-copy floppy
image on a disk, and the upgr20.fs floppy image on another.  You must
also have at least the "base20" binary distribution set available,
so that you can upgrade with it, using one of the upgrade methods
described above.  Finally, you must have sufficient disk space
available to install the new binaries.  Since the old binaries are
being overwritten in place, you only need space for the new binaries,
which weren't previously on the system.  If you have a few megabytes
free on each of your root and /usr partitions, you should have enough
space.

Since upgrading involves replacing the boot blocks on your OpenBSD
partition, the kernel, and most of the system binaries, it has the
potential to cause data loss.  You are strongly advised to BACK UP ANY
IMPORTANT DATA ON YOUR DISK, whether on the OpenBSD partition or on
another operating system's partition, before beginning the upgrade
process.

To upgrade your system, follow the following instructions:

	Boot your machine using of the appropriate kernel-copy floppy.
	When presented with the boot prompt (the prompt begins with
	"Boot" and ends with ":-"), hit return.

	You will be prompted to insert a file system floppy.  Remove
	the kernel-copy floppy and insert the upgr20 floppy, then hit
	any key to continue booting.

	While booting, you will probably see several warnings.  You
	should be warned that no swap space is present, and that
	init(8) cannot find /etc/rc.  Do not be alarmed, these are
	completely normal.  When you reach the prompt asking you for a
	shell name, just hit return.

	You will be presented with some information about the upgrade
	process and a warning message, and will be asked if you wish
	to proceed with the upgrade process.  If you answer
	negatively, the upgrade process will stop, and your disk will
	not be modified.  If you answer affirmatively, the upgrade
	process will begin, and your disk will be modified.  You may
	hit Control-C to stop the upgrade process at any time.
	However, if you hit it at an inopportune moment, your system
	may be left in an inconsistent (and possibly unusable) state.

	You will be asked if you wish to upgrade your file systems to
	the new file system format.  If you do, reply affirmatively.
	If you don't have your file systems upgraded now, you should
	probably do it manually after the install process is complete,
	by using "fsck -c 2". Read the fsck(8) manual page for more
	details. Note that this step is only important when upgrading
        from a pre-OpenBSD 1.0 release.

	The upgrade program will then check your root file system,
	and, if you approved, will upgrade it to the new file system
	format.  It will then mount your root file system on /mnt.

	If your file systems are being upgraded, the upgrade script
	will copy the new fsck(8) program to your hard disk and
	upgrade your remaining file systems.

	The upgrade program will then automatically replace the boot
	blocks on your disk with newer versions, and mount all of your
	file systems under /mnt.  (In other words, your root partition
	will be mounted on /mnt, your /usr partition on /mnt/usr, etc.)

	If you don't already have the OpenBSD distribution sets on your
	disk, look in the installation section for information on how
	to transfer them to your disk.

	If you have only one floppy drive, and don't have the disk
	space to copy all of the distribution onto the hard drive, you
	can do the following:

		Install a kernel on the hard drive as detailed a few
		paragraphs below, then boot off the hard drive.  Now
		you can copy and install distribution sets
		incrementally from your lone floppy drive.

	Once the distribution sets are transferred to your disk,
	continue here.  (Obviously, if the OpenBSD distribution sets
	are already on your disk, because you've transferred them
	before starting the upgrade process, you don't need to
	transfer them again now!)

	After the software has been transferred to the machine (or
	mounted, in the case of upgrading via NFS), change into the
	directory containing the "base20" distribution set.  Once you
	are there, run the "Set_tmp_dir" command, and hit return at
	the prompt to select the default answer for the temporary
	directory's path name.  (It should be the path name of the
	directory that you're in.)

	Run the command "Extract base20" to upgrade the base
	distribution.

	Repeat the above two steps for all of the sets you wish to
	upgrade.  (For each, change into the directory containing the
	set, run "Set_tmp_dir" and accept the default path name, then
	run the "Extract <setname>" command.)

	If you were previously using the security distribution set,
	you MUST upgrade to the new version, or you will not be able
	to log in when the upgrade process is complete.  Similarly, if
	you were not previously using the security set, you must NOT
	upgrade to the new version.

	When you are done upgrading all of the distribution sets you
	wish to upgrade, issue the command "Cleanup".  It will clean
	up the installation, by remaking some system databases.  When
	it is complete, you should use "halt" to halt the system.

	When the system is halted, remove the "upgr20" floppy from
	the floppy drive, and replace it with the OpenBSD 2.0
	kernel-copy floppy that you previously booted from. Reboot
	with that floppy.

	Once again, you will be prompted to insert a file system
	floppy.  DO NOT replace the kernel-copy floppy, just hit any
	key.

	Again, While booting, you may see several warnings.  You may
	be warned that no swap space is present, that init(8) cannot
	find /etc/rc, and that one or more databases with names like
	"pwd.db" cannot be found.  Do not be alarmed, as, again, these
	are completely normal.  Hit return at the prompt asking you
	for a shell name.

	You will be presented with a shell prompt, at which you should
	enter the "copy_kernel" command.  It will ask you what
	partition to copy the kernel to, and you should reply with the
	name of your root partition (e.g. sd0a or wd0a).

	You will be asked if you are sure that you want to copy the
	kernel.  Reply affirmatively, and it will check the file
	system on your root partition, mount it, and copy the kernel.
	Once the kernel is copied, you should use "halt" to halt the
	system.

	Once the system is halted, remove the kernel-copy floppy from
	the floppy disk drive, and hit any key to reboot.

Your system has now been upgraded to OpenBSD 2.0.

        After a new kernel has been copied to your hard disk, your
	machine is a complete OpenBSD 2.0 system.  However, that
	doesn't mean that you're finished with the upgrade process.
	There are several things that you should do, or might have to
	do, to insure that the system works properly.

	Second, you will probably want to get the etc20 distribution,
	extract it, and compare its contents with those in your /etc/
	directory.  You will probably want to replace some of your
	system configuration files, or incorporate some of the changes
	in the new versions into yours.

	Third, you will probably want to update the set of device
	nodes you have in /dev.  If you've changed the contents of
	/dev by hand, you will need to be careful about this, but if
	not, you can just cd into /dev, and run the command "sh
	MAKEDEV all".

	Fourth, you must deal with certain changes in the formats of
	some of the configuration files.  The most notable change is
	that the "options" given to many of the file systems in
	/etc/fstab or by hand have changed, and some of the file
	systems have changed names. *IMPORTANT*: ANY INSTANCES OF "ufs"
        IN /etc/fstab MUST BE CHANGED TO "ffs".  To find out what the
        new options are, it's suggested that you read the manual page
        for the file systems' mount commands, for example mount_nfs(8)
        for NFS.  (Note that the information for mounts of type "ffs",
	i.e. Fast File Systems, are contained in the mount(8) man
	page.)

	Finally, you will want to delete old binaries that were part
	of the version of OpenBSD that you upgraded from and have since
	been removed from the OpenBSD distribution.  If you are
        upgrading from a pre-1.0 OpenBSD, you might also
	want to recompile any locally-built binaries, to take
	advantage of the shared libraries.  (Note that any new
	binaries that you build will be dynamically linked, and
	therefore take advantage of the shared libraries, by default.
	For information on how to make statically linked binaries,
	see the cc(1) and ld(1) manual pages.)