UPDATING revision 147722
1Updating Information for FreeBSD current users
2
3This file is maintained and copyrighted by M. Warner Losh
4<imp@village.org>.  See end of file for further details.  For commonly
5done items, please see the COMMON ITEMS: section later in the file.
6
7Items affecting the ports and packages system can be found in
8/usr/ports/UPDATING.  Please read that file before running
9portupgrade.
10
11NOTE TO PEOPLE WHO THINK THAT FreeBSD 6.x IS SLOW:
12	FreeBSD 6.x has many debugging features turned on, in
13	both the kernel and userland.  These features attempt to detect
14	incorrect use of system primitives, and encourage loud failure
15	through extra sanity checking and fail stop semantics.  They
16	also substantially impact system performance.  If you want to
17	do performance measurement, benchmarking, and optimization,
18	you'll want to turn them off.  This includes various WITNESS-
19	related kernel options, INVARIANTS, malloc debugging flags
20	in userland, and various verbose features in the kernel.  Many
21	developers choose to disable these features on build machines
22	to maximize performance.
23
2420050629:
25	The pccard_ifconfig rc.conf variable has been removed and a new
26	variable, ifconfig_DEFAULT has been introduced.  Unlike
27	pccard_ifconfig, ifconfig_DEFAULT applies to ALL interfaces that
28	do not have ifconfig_ifn entries rather than just those in
29	removable_interfaces.
30
3120050616:
32	Some previous versions of PAM have permitted the use of
33	non-absolute paths in /etc/pam.conf or /etc/pam.d/* when referring
34	to third party PAM modules in /usr/local/lib.  A change has been
35	made to require the use of absolute paths in order to avoid
36	ambiguity and dependence on library path configuration, which may
37	affect existing configurations.
38
3920050610:
40	Major changes to network interface API.  All drivers must be
41	recompiled.  Drivers not in the base system will need to be
42	updated to the new APIs.
43
4420050609:
45	Changes were made to kinfo_proc in sys/user.h.  Please recompile
46	userland, or commands like `fstat', `pkill', `ps', `top' and `w'
47	will not behave correctly.
48
49	The API and ABI for hwpmc(4) have changed with the addition
50	of sampling support.  Please recompile lib/libpmc(3) and
51	usr.sbin/{pmcstat,pmccontrol}.
52
5320050606:
54	The OpenBSD dhclient was imported in place of the ISC dhclient
55	and the network interface configuration scripts were updated
56	accordingly.  If you use DHCP to configure your interfaces, you
57	must now run devd.  Also, DNS updating was lost so you will need
58	to find a workaround if you use this feature.
59
6020050605:
61	if_bridge was added to the tree. This has changed struct ifnet.
62	Please recompile userland and all network related modules.
63
6420050603:
65	The n_net of a struct netent was changed to an uint32_t, and
66	1st argument of getnetbyaddr() was changed to an uint32_t, to
67	conform to POSIX-2001.  These changes broke an ABI
68	compatibility on 64 bit architecture.  With these changes,
69	shlib major of libpcap was bumped.  You have to recompile
70	userland programs that use getnetbyaddr(3), getnetbyname(3),
71	getnetent(3) and/or libpcap on 64 bit architecture.
72
7320050528:
74	Kernel parsing of extra options on '#!' first lines of shell
75	scripts has changed.  Lines with multiple options likely will
76	fail after this date.  For full details, please see
77		http://people.freebsd.org/~gad/Updating-20050528.txt
78
7920050503:
80	The packet filter (pf) code has been updated to OpenBSD 3.7
81	Please note the changed anchor syntax and the fact that
82	authpf(8) now needs a mounted fdescfs(5) to function.
83
8420050415:
85	The NO_MIXED_MODE kernel option has been removed from the i386
86	amd64 platforms as its use has been superceded by the new local
87	APIC timer code.  Any kernel config files containing this option
88	should be updated.
89
9020050227:
91	The on-disk format of LC_CTYPE files was changed to be machine
92	independent.  Please make sure NOT to use NO_CLEAN buildworld
93	when crossing this point.
94
9520050225:
96	The ifi_epoch member of struct if_data has been changed to
97	contain the uptime at which the interface was created or the
98	statistics zeroed rather then the wall clock time because
99	wallclock time may go backwards.  This should have no impact
100	unless an snmp implementation is using this value (I know of
101	none at this point.)
102
10320050224:
104	The acpi_perf and acpi_throttle drivers are now part of the
105	acpi(4) main module.  They are no longer built separately.
106
10720050223:
108	The layout of struct image_params has changed. You have to
109	recompile all compatibility modules (linux, svr4, etc) for use
110	with the new kernel.
111
11220050223:
113	The p4tcc driver has been merged into cpufreq(4).  This makes
114	"options CPU_ENABLE_TCC" obsolete.  Please load cpufreq.ko or
115	compile in "device cpufreq" to restore this functionality.
116
11720050220:
118	The responsibility of recomputing the file system summary of
119	a SoftUpdates-enabled dirty volume has been transferred to the
120	background fsck.  A rebuild of fsck(8) utility is recommended
121	if you have updated the kernel.
122
123	To get the old behavior (recompute file system summary at mount
124	time), you can set vfs.ffs.compute_summary_at_mount=1 before
125	mounting the new volume.
126
12720050206:
128	The cpufreq import is complete.  As part of this, the sysctls for
129	acpi(4) throttling have been removed.  The power_profile script
130	has been updated, so you can use performance/economy_cpu_freq in
131	rc.conf(5) to set AC on/offline cpu frequencies.
132
13320050206:
134	NG_VERSION has been increased. Recompiling kernel (or ng_socket.ko)
135	requires recompiling libnetgraph and userland netgraph utilities.
136
13720050114:
138	Support for abbreviated forms of a number of ipfw options is
139	now deprecated.  Warnings are printed to stderr indicating the
140	correct full form when a match occurs.  Some abbreviations may
141	be supported at a later date based on user feedback.  To be
142	considered for support, abbreviations must be in use prior to
143	this commit and unlikely to be confused with current key words.
144
14520041221:
146	By a popular demand, a lot of NOFOO options were renamed
147	to NO_FOO (see bsd.compat.mk for a full list).  The old
148	spellings are still supported, but will cause annoying
149	warnings on stderr.  Make sure you upgrade properly (see
150	the COMMON ITEMS: section later in this file).
151
15220041219:
153	Auto-loading of ancillary wlan modules such as wlan_wep has
154	been temporarily disabled; you need to statically configure
155	the modules you need into your kernel or explicitly load them
156	prior to use.  Specifically, if you intend to use WEP encryption
157	with an 802.11 device load/configure wlan_wep; if you want to
158	use WPA with the ath driver load/configure wlan_tkip, wlan_ccmp,
159	and wlan_xauth as required.
160
16120041213:
162	The behaviour of ppp(8) has changed slightly.  If lqr is enabled
163	(``enable lqr''), older versions would revert to LCP ECHO mode on
164	negotiation failure.  Now, ``enable echo'' is required for this
165	behaviour.  The ppp version number has been bumped to 3.4.2 to
166	reflect the change.
167
16820041201:
169	The wlan support has been updated to split the crypto support
170	into separate modules.  For static WEP you must configure the
171	wlan_wep module in your system or build and install the module
172	in place where it can be loaded (the kernel will auto-load
173	the module when a wep key is configured).
174
17520041201:
176	The ath driver has been updated to split the tx rate control
177	algorithm into a separate module.  You need to include either
178	ath_rate_onoe or ath_rate_amrr when configuring the kernel.
179
18020041116:
181	Support for systems with an 80386 CPU has been removed.  Please
182	use FreeBSD 5.x or earlier on systems with an 80386.
183
18420041110:
185	We have had a hack which would mount the root filesystem
186	R/W if the device were named 'md*'.  As part of the vnode
187	work I'm doing I have had to remove this hack.  People
188	building systems which use preloaded MD root filesystems
189	may need to insert a "/sbin/mount -u -o rw /dev/md0 /" in
190	their /etc/rc scripts.
191
19220041104:
193	FreeBSD 5.3 shipped here.
194
19520041102:
196	The size of struct tcpcb has changed again due to the removal
197	of RFC1644 T/TCP.  You have to recompile userland programs that
198	read kmem for tcp sockets directly (netstat, sockstat, etc.)
199
20020041022:
201	The size of struct tcpcb has changed.  You have to recompile
202	userland programs that read kmem for tcp sockets directly
203	(netstat, sockstat, etc.)
204
20520041016:
206	RELENG_5 branched here.  For older entries, please see updating
207	in the RELENG_5 branch.
208
209COMMON ITEMS:
210
211	General Notes
212	-------------
213	Avoid using make -j when upgrading.  From time to time in the
214	past there have been problems using -j with buildworld and/or
215	installworld.  This is especially true when upgrading between
216	"distant" versions (eg one that cross a major release boundary
217	or several minor releases, or when several months have passed
218	on the -current branch).
219
220	Sometimes, obscure build problems are the result of environment
221	poisoning.  This can happen because the make utility reads its
222	environment when searching for values for global variables.
223	To run your build attempts in an "environmental clean room",
224	prefix all make commands with 'env -i '.  See the env(1) manual
225	page for more details.
226
227	To build a kernel
228	-----------------
229	If you are updating from a prior version of FreeBSD (even one just
230	a few days old), you should follow this procedure. With a
231	/usr/obj tree with a fresh buildworld,
232	make -DALWAYS_CHECK_MAKE buildkernel KERNCONF=YOUR_KERNEL_HERE
233	make -DALWAYS_CHECK_MAKE installkernel KERNCONF=YOUR_KERNEL_HERE
234
235	To test a kernel once
236	---------------------
237	If you just want to boot a kernel once (because you are not sure
238	if it works, or if you want to boot a known bad kernel to provide
239	debugging information) run
240	make installkernel KERNCONF=YOUR_KERNEL_HERE KODIR=/boot/testkernel
241	nextboot -k testkernel
242
243	To just build a kernel when you know that it won't mess you up
244	--------------------------------------------------------------
245	This assumes you are already running a 5.X system.  Replace
246	${arch} with the architecture of your machine (e.g. "i386",
247	"alpha", "amd64", "ia64", "pc98", "sparc64", etc).
248
249	cd src/sys/${arch}/conf
250	config KERNEL_NAME_HERE
251	cd ../compile/KERNEL_NAME_HERE
252	make depend
253	make
254	make install
255
256	If this fails, go to the "To build a kernel" section.
257
258	To rebuild everything and install it on the current system.
259	-----------------------------------------------------------
260	# Note: sometimes if you are running current you gotta do more than
261	# is listed here if you are upgrading from a really old current.
262
263	<make sure you have good level 0 dumps>
264	make buildworld
265	make kernel KERNCONF=YOUR_KERNEL_HERE
266							[1]
267	<reboot in single user>				[3]
268	mergemaster -p					[5]
269	make installworld
270	mergemaster					[4]
271	<reboot>
272
273
274	To cross-install current onto a separate partition
275	--------------------------------------------------
276	# In this approach we use a separate partition to hold
277	# current's root, 'usr', and 'var' directories.   A partition
278	# holding "/", "/usr" and "/var" should be about 2GB in
279	# size.
280
281	<make sure you have good level 0 dumps>
282	<boot into -stable>
283	make buildworld
284	make buildkernel KERNCONF=YOUR_KERNEL_HERE
285	<maybe newfs current's root partition>
286	<mount current's root partition on directory ${CURRENT_ROOT}>
287	make installworld DESTDIR=${CURRENT_ROOT}
288	cd src/etc; make distribution DESTDIR=${CURRENT_ROOT} # if newfs'd
289	make installkernel KERNCONF=YOUR_KERNEL_HERE DESTDIR=${CURRENT_ROOT}
290	cp /etc/fstab ${CURRENT_ROOT}/etc/fstab 		   # if newfs'd
291	<edit ${CURRENT_ROOT}/etc/fstab to mount "/" from the correct partition>
292	<reboot into current>
293	<do a "native" rebuild/install as described in the previous section>
294	<maybe install compatibility libraries from src/lib/compat>
295 	<reboot>
296
297
298	To upgrade in-place from 5.x-stable to current
299	----------------------------------------------
300	<make sure you have good level 0 dumps>
301	make buildworld					[9]
302	make kernel KERNCONF=YOUR_KERNEL_HERE		[8]
303							[1]
304	<reboot in single user>				[3]
305	mergemaster -p					[5]
306	make installworld
307	mergemaster -i					[4]
308	<reboot>
309
310	Make sure that you've read the UPDATING file to understand the
311	tweaks to various things you need.  At this point in the life
312	cycle of current, things change often and you are on your own
313	to cope.  The defaults can also change, so please read ALL of
314	the UPDATING entries.
315
316	Also, if you are tracking -current, you must be subscribed to
317	freebsd-current@freebsd.org.  Make sure that before you update
318	your sources that you have read and understood all the recent
319	messages there.  If in doubt, please track -stable which has
320	much fewer pitfalls.
321
322	[1] If you have third party modules, such as vmware, you
323	should disable them at this point so they don't crash your
324	system on reboot.
325
326	[3] From the bootblocks, boot -s, and then do
327		fsck -p
328		mount -u /
329		mount -a
330		cd src
331		adjkerntz -i		# if CMOS is wall time
332	Also, when doing a major release upgrade, it is required that
333	you boot into single user mode to do the installworld.
334
335	[4] Note: This step is non-optional.  Failure to do this step
336	can result in a significant reduction in the functionality of the
337	system.  Attempting to do it by hand is not recommended and those
338	that pursue this avenue should read this file carefully, as well
339	as the archives of freebsd-current and freebsd-hackers mailing lists
340	for potential gotchas.
341
342	[5] Usually this step is a noop.  However, from time to time
343	you may need to do this if you get unknown user in the following
344	step.  It never hurts to do it all the time.  You may need to
345	install a new mergemaster (cd src/usr.sbin/mergemaster && make
346	install) after the buildworld before this step if you last updated
347	from current before 20020224 or from -stable before 20020408.
348
349	[8] In order to have a kernel that can run the 4.x binaries
350	needed to do an installworld, you must include the COMPAT_FREEBSD4
351	option in your kernel.  Failure to do so may leave you with a system
352	that is hard to boot to recover.
353
354	Make sure that you merge any new devices from GENERIC since the
355	last time you updated your kernel config file.
356
357	[9] When checking out sources, you must include the -P flag to have
358	cvs prune empty directories.
359
360	If CPUTYPE is defined in your /etc/make.conf, make sure to use the
361	"?=" instead of the "=" assignment operator, so that buildworld can
362	override the CPUTYPE if it needs to.
363
364	MAKEOBJDIRPREFIX must be defined in an environment variable, and
365	not on the command line, or in /etc/make.conf.  buildworld will
366	warn if it is improperly defined.
367FORMAT:
368
369This file contains a list, in reverse chronological order, of major
370breakages in tracking -current.  Not all things will be listed here,
371and it only starts on October 16, 2004.  Updating files can found in
372previous releases if your system is older than this.
373
374Copyright information:
375
376Copyright 1998-2005 M. Warner Losh.  All Rights Reserved.
377
378Redistribution, publication, translation and use, with or without
379modification, in full or in part, in any form or format of this
380document are permitted without further permission from the author.
381
382THIS DOCUMENT IS PROVIDED BY WARNER LOSH ``AS IS'' AND ANY EXPRESS OR
383IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
384WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
385DISCLAIMED.  IN NO EVENT SHALL WARNER LOSH BE LIABLE FOR ANY DIRECT,
386INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
387(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
388SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
389HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
390STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
391IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
392POSSIBILITY OF SUCH DAMAGE.
393
394If you find this document useful, and you want to, you may buy the
395author a beer.
396
397Contact Warner Losh if you have any questions about your use of
398this document.
399
400$FreeBSD: head/UPDATING 147722 2005-07-01 15:12:09Z des $
401