UPDATING revision 156260
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 7.x IS SLOW:
12	FreeBSD 7.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
2420060303:
25	The TDFX_LINUX kernel option was retired and replaced by the
26	tdfx_linux device.  The latter can be loaded as a kernel module.
27	Loading it alone should suffice to get 3dfx support for Linux
28	apps because it will pull in tdfx.ko and linux.ko through its
29	dependencies.
30
3120060201:
32	The kernel ABI to file system modules was changed on i386.
33	Please make sure that your kernel and modules are in sync.
34	
3520060118:
36	This actually occured some time ago, but installing the kernel
37	now also installs a bunch of symbol files for the kernel modules.
38	This increases the size of /boot/kernel to about 67Mbytes. You
39	will need twice this if you will eventually back this up to kernel.old
40	on your next install.
41	If you have a shortage of room in your root partition, you should add
42	-DINSTALL_NODEBUG to your make arguments or add INSTALL_NODEBUG="yes"
43	to your /etc/make.conf.
44
4520060113:
46	libc's malloc implementation has been replaced.  This change has the
47	potential to uncover application bugs that previously went unnoticed.
48	See the malloc(3) manual page for more details.
49
5020060112:
51	The generic netgraph(4) cookie has been changed. If you upgrade
52	kernel passing this point, you also need to upgrade userland
53	and netgraph(4) utilities like ports/net/mpd or ports/net/mpd4.
54
5520060106:
56	si(4)'s device files now contain the unit number.
57	Uses of {cua,tty}A[0-9a-f] should be replaced by {cua,tty}A0[0-9a-f].
58
5920060106:
60	The kernel ABI was mostly destroyed due to a change in the size
61	of struct lock_object which is nested in other structures such
62	as mutexes which are nested in all sorts of other structures.
63	Make sure your kernel and modules are in sync.
64
6520051231:
66	The page coloring algorithm in the VM subsystem was converted
67	from tuning with kernel options to autotuning. Please remove
68	any PQ_* option except PQ_NOOPT from your kernel config.
69
7020051211:
71	The net80211-related tools in the tools/tools/ath directory
72	have been moved to tools/tools/net80211 and renamed with a
73	"wlan" prefix.  Scripts that use them should be adjusted
74	accordingly.
75
7620051202:
77	Scripts in the local_startup directories (as defined in
78	/etc/defaults/rc.conf) that have the new rc.d semantics will
79	now be run as part of the base system rcorder. If there are
80	errors or problems with one of these local scripts, it could
81	cause boot problems. If you encounter such problems, boot in
82	single user mode, remove that script from the */rc.d directory.
83	Please report the problem to the port's maintainer, and the
84	freebsd-ports@freebsd.org mailing list.
85
8620051129:
87	The nodev mount option was deprecated in RELENG_6 (where it
88	was a no-op), and is now unsupported.  If you have nodev or dev listed
89	in /etc/fstab, remove it, otherwise it will result in a mount error.
90
9120051129:
92	ABI between ipfw(4) and ipfw(8) has been changed. You need
93	to rebuild ipfw(8) when rebuilding kernel.
94
9520051108:
96	rp(4)'s device files now contain the unit number.
97	Uses of {cua,tty}R[0-9a-f] should be replaced by {cua,tty}R0[0-9a-f].
98
9920051029:
100	/etc/rc.d/ppp-user has been renamed to /etc/rc.d/ppp.
101	Its /etc/rc.conf.d configuration file has been `ppp' from
102	the beginning, and hence there is no need to touch it.
103
10420051014:
105	Now most modules get their build-time options from the kernel
106	configuration file.  A few modules still have fixed options
107	due to their non-conformant implementation, but they will be
108	corrected eventually.  You may need to review the options of
109	the modules in use, explicitly specify the non-default options
110	in the kernel configuration file, and rebuild the kernel and
111	modules afterwards.
112
11320051001:
114	kern.polling.enable sysctl MIB is now deprecated. Use ifconfig(8)
115	to turn polling(4) on your interfaces.
116
11720050927:
118	The old bridge(4) implementation was retired.  The new
119	if_bridge(4) serves as a full functional replacement.
120
12120050722:
122	The ai_addrlen of a struct addrinfo was changed to a socklen_t
123	to conform to POSIX-2001.  This change broke an ABI
124	compatibility on 64 bit architecture.  You have to recompile
125	userland programs that use getaddrinfo(3) on 64 bit
126	architecture.
127
12820050711:
129	RELENG_6 branched here.
130
13120050629:
132	The pccard_ifconfig rc.conf variable has been removed and a new
133	variable, ifconfig_DEFAULT has been introduced.  Unlike
134	pccard_ifconfig, ifconfig_DEFAULT applies to ALL interfaces that
135	do not have ifconfig_ifn entries rather than just those in
136	removable_interfaces.
137
13820050616:
139	Some previous versions of PAM have permitted the use of
140	non-absolute paths in /etc/pam.conf or /etc/pam.d/* when referring
141	to third party PAM modules in /usr/local/lib.  A change has been
142	made to require the use of absolute paths in order to avoid
143	ambiguity and dependence on library path configuration, which may
144	affect existing configurations.
145
14620050610:
147	Major changes to network interface API.  All drivers must be
148	recompiled.  Drivers not in the base system will need to be
149	updated to the new APIs.
150
15120050609:
152	Changes were made to kinfo_proc in sys/user.h.  Please recompile
153	userland, or commands like `fstat', `pkill', `ps', `top' and `w'
154	will not behave correctly.
155
156	The API and ABI for hwpmc(4) have changed with the addition
157	of sampling support.  Please recompile lib/libpmc(3) and
158	usr.sbin/{pmcstat,pmccontrol}.
159
16020050606:
161	The OpenBSD dhclient was imported in place of the ISC dhclient
162	and the network interface configuration scripts were updated
163	accordingly.  If you use DHCP to configure your interfaces, you
164	must now run devd.  Also, DNS updating was lost so you will need
165	to find a workaround if you use this feature.
166
16720050605:
168	if_bridge was added to the tree. This has changed struct ifnet.
169	Please recompile userland and all network related modules.
170
17120050603:
172	The n_net of a struct netent was changed to an uint32_t, and
173	1st argument of getnetbyaddr() was changed to an uint32_t, to
174	conform to POSIX-2001.  These changes broke an ABI
175	compatibility on 64 bit architecture.  With these changes,
176	shlib major of libpcap was bumped.  You have to recompile
177	userland programs that use getnetbyaddr(3), getnetbyname(3),
178	getnetent(3) and/or libpcap on 64 bit architecture.
179
18020050528:
181	Kernel parsing of extra options on '#!' first lines of shell
182	scripts has changed.  Lines with multiple options likely will
183	fail after this date.  For full details, please see
184		http://people.freebsd.org/~gad/Updating-20050528.txt
185
18620050503:
187	The packet filter (pf) code has been updated to OpenBSD 3.7
188	Please note the changed anchor syntax and the fact that
189	authpf(8) now needs a mounted fdescfs(5) to function.
190
19120050415:
192	The NO_MIXED_MODE kernel option has been removed from the i386
193	amd64 platforms as its use has been superceded by the new local
194	APIC timer code.  Any kernel config files containing this option
195	should be updated.
196
19720050227:
198	The on-disk format of LC_CTYPE files was changed to be machine
199	independent.  Please make sure NOT to use NO_CLEAN buildworld
200	when crossing this point. Crossing this point also requires
201	recompile or reinstall of all locale depended packages.
202
20320050225:
204	The ifi_epoch member of struct if_data has been changed to
205	contain the uptime at which the interface was created or the
206	statistics zeroed rather then the wall clock time because
207	wallclock time may go backwards.  This should have no impact
208	unless an snmp implementation is using this value (I know of
209	none at this point.)
210
21120050224:
212	The acpi_perf and acpi_throttle drivers are now part of the
213	acpi(4) main module.  They are no longer built separately.
214
21520050223:
216	The layout of struct image_params has changed. You have to
217	recompile all compatibility modules (linux, svr4, etc) for use
218	with the new kernel.
219
22020050223:
221	The p4tcc driver has been merged into cpufreq(4).  This makes
222	"options CPU_ENABLE_TCC" obsolete.  Please load cpufreq.ko or
223	compile in "device cpufreq" to restore this functionality.
224
22520050220:
226	The responsibility of recomputing the file system summary of
227	a SoftUpdates-enabled dirty volume has been transferred to the
228	background fsck.  A rebuild of fsck(8) utility is recommended
229	if you have updated the kernel.
230
231	To get the old behavior (recompute file system summary at mount
232	time), you can set vfs.ffs.compute_summary_at_mount=1 before
233	mounting the new volume.
234
23520050206:
236	The cpufreq import is complete.  As part of this, the sysctls for
237	acpi(4) throttling have been removed.  The power_profile script
238	has been updated, so you can use performance/economy_cpu_freq in
239	rc.conf(5) to set AC on/offline cpu frequencies.
240
24120050206:
242	NG_VERSION has been increased. Recompiling kernel (or ng_socket.ko)
243	requires recompiling libnetgraph and userland netgraph utilities.
244
24520050114:
246	Support for abbreviated forms of a number of ipfw options is
247	now deprecated.  Warnings are printed to stderr indicating the
248	correct full form when a match occurs.  Some abbreviations may
249	be supported at a later date based on user feedback.  To be
250	considered for support, abbreviations must be in use prior to
251	this commit and unlikely to be confused with current key words.
252
25320041221:
254	By a popular demand, a lot of NOFOO options were renamed
255	to NO_FOO (see bsd.compat.mk for a full list).  The old
256	spellings are still supported, but will cause annoying
257	warnings on stderr.  Make sure you upgrade properly (see
258	the COMMON ITEMS: section later in this file).
259
26020041219:
261	Auto-loading of ancillary wlan modules such as wlan_wep has
262	been temporarily disabled; you need to statically configure
263	the modules you need into your kernel or explicitly load them
264	prior to use.  Specifically, if you intend to use WEP encryption
265	with an 802.11 device load/configure wlan_wep; if you want to
266	use WPA with the ath driver load/configure wlan_tkip, wlan_ccmp,
267	and wlan_xauth as required.
268
26920041213:
270	The behaviour of ppp(8) has changed slightly.  If lqr is enabled
271	(``enable lqr''), older versions would revert to LCP ECHO mode on
272	negotiation failure.  Now, ``enable echo'' is required for this
273	behaviour.  The ppp version number has been bumped to 3.4.2 to
274	reflect the change.
275
27620041201:
277	The wlan support has been updated to split the crypto support
278	into separate modules.  For static WEP you must configure the
279	wlan_wep module in your system or build and install the module
280	in place where it can be loaded (the kernel will auto-load
281	the module when a wep key is configured).
282
28320041201:
284	The ath driver has been updated to split the tx rate control
285	algorithm into a separate module.  You need to include either
286	ath_rate_onoe or ath_rate_amrr when configuring the kernel.
287
28820041116:
289	Support for systems with an 80386 CPU has been removed.  Please
290	use FreeBSD 5.x or earlier on systems with an 80386.
291
29220041110:
293	We have had a hack which would mount the root filesystem
294	R/W if the device were named 'md*'.  As part of the vnode
295	work I'm doing I have had to remove this hack.  People
296	building systems which use preloaded MD root filesystems
297	may need to insert a "/sbin/mount -u -o rw /dev/md0 /" in
298	their /etc/rc scripts.
299
30020041104:
301	FreeBSD 5.3 shipped here.
302
30320041102:
304	The size of struct tcpcb has changed again due to the removal
305	of RFC1644 T/TCP.  You have to recompile userland programs that
306	read kmem for tcp sockets directly (netstat, sockstat, etc.)
307
30820041022:
309	The size of struct tcpcb has changed.  You have to recompile
310	userland programs that read kmem for tcp sockets directly
311	(netstat, sockstat, etc.)
312
31320041016:
314	RELENG_5 branched here.  For older entries, please see updating
315	in the RELENG_5 branch.
316
317COMMON ITEMS:
318
319	General Notes
320	-------------
321	Avoid using make -j when upgrading.  From time to time in the
322	past there have been problems using -j with buildworld and/or
323	installworld.  This is especially true when upgrading between
324	"distant" versions (eg one that cross a major release boundary
325	or several minor releases, or when several months have passed
326	on the -current branch).
327
328	Sometimes, obscure build problems are the result of environment
329	poisoning.  This can happen because the make utility reads its
330	environment when searching for values for global variables.
331	To run your build attempts in an "environmental clean room",
332	prefix all make commands with 'env -i '.  See the env(1) manual
333	page for more details.
334
335	When upgrading from one major version to another it is generally
336	best to upgrade to the latest code in the currently installed branch
337	first, then do an upgrade to the new branch. This is the best-tested
338	upgrade path, and has the highest probability of being successful.
339	Please try this approach before reporting problems with a major
340	version upgrade.
341
342	To build a kernel
343	-----------------
344	If you are updating from a prior version of FreeBSD (even one just
345	a few days old), you should follow this procedure.  It is the most
346	failsafe as it uses a /usr/obj tree with a fresh mini-buildworld,
347
348	make kernel-toolchain
349	make -DALWAYS_CHECK_MAKE buildkernel KERNCONF=YOUR_KERNEL_HERE
350	make -DALWAYS_CHECK_MAKE installkernel KERNCONF=YOUR_KERNEL_HERE
351
352	To test a kernel once
353	---------------------
354	If you just want to boot a kernel once (because you are not sure
355	if it works, or if you want to boot a known bad kernel to provide
356	debugging information) run
357	make installkernel KERNCONF=YOUR_KERNEL_HERE KODIR=/boot/testkernel
358	nextboot -k testkernel
359
360	To just build a kernel when you know that it won't mess you up
361	--------------------------------------------------------------
362	This assumes you are already running a 5.X system.  Replace
363	${arch} with the architecture of your machine (e.g. "i386",
364	"alpha", "amd64", "ia64", "pc98", "sparc64", etc).
365
366	cd src/sys/${arch}/conf
367	config KERNEL_NAME_HERE
368	cd ../compile/KERNEL_NAME_HERE
369	make depend
370	make
371	make install
372
373	If this fails, go to the "To build a kernel" section.
374
375	To rebuild everything and install it on the current system.
376	-----------------------------------------------------------
377	# Note: sometimes if you are running current you gotta do more than
378	# is listed here if you are upgrading from a really old current.
379
380	<make sure you have good level 0 dumps>
381	make buildworld
382	make kernel KERNCONF=YOUR_KERNEL_HERE
383							[1]
384	<reboot in single user>				[3]
385	mergemaster -p					[5]
386	make installworld
387	make delete-old
388	mergemaster					[4]
389	<reboot>
390
391
392	To cross-install current onto a separate partition
393	--------------------------------------------------
394	# In this approach we use a separate partition to hold
395	# current's root, 'usr', and 'var' directories.   A partition
396	# holding "/", "/usr" and "/var" should be about 2GB in
397	# size.
398
399	<make sure you have good level 0 dumps>
400	<boot into -stable>
401	make buildworld
402	make buildkernel KERNCONF=YOUR_KERNEL_HERE
403	<maybe newfs current's root partition>
404	<mount current's root partition on directory ${CURRENT_ROOT}>
405	make installworld DESTDIR=${CURRENT_ROOT}
406	cd src/etc; make distribution DESTDIR=${CURRENT_ROOT} # if newfs'd
407	make installkernel KERNCONF=YOUR_KERNEL_HERE DESTDIR=${CURRENT_ROOT}
408	cp /etc/fstab ${CURRENT_ROOT}/etc/fstab 		   # if newfs'd
409	<edit ${CURRENT_ROOT}/etc/fstab to mount "/" from the correct partition>
410	<reboot into current>
411	<do a "native" rebuild/install as described in the previous section>
412	<maybe install compatibility libraries from src/lib/compat>
413 	<reboot>
414
415
416	To upgrade in-place from 5.x-stable to current
417	----------------------------------------------
418	<make sure you have good level 0 dumps>
419	make buildworld					[9]
420	make kernel KERNCONF=YOUR_KERNEL_HERE		[8]
421							[1]
422	<reboot in single user>				[3]
423	mergemaster -p					[5]
424	make installworld
425	make delete-old
426	mergemaster -i					[4]
427	<reboot>
428
429	Make sure that you've read the UPDATING file to understand the
430	tweaks to various things you need.  At this point in the life
431	cycle of current, things change often and you are on your own
432	to cope.  The defaults can also change, so please read ALL of
433	the UPDATING entries.
434
435	Also, if you are tracking -current, you must be subscribed to
436	freebsd-current@freebsd.org.  Make sure that before you update
437	your sources that you have read and understood all the recent
438	messages there.  If in doubt, please track -stable which has
439	much fewer pitfalls.
440
441	[1] If you have third party modules, such as vmware, you
442	should disable them at this point so they don't crash your
443	system on reboot.
444
445	[3] From the bootblocks, boot -s, and then do
446		fsck -p
447		mount -u /
448		mount -a
449		cd src
450		adjkerntz -i		# if CMOS is wall time
451	Also, when doing a major release upgrade, it is required that
452	you boot into single user mode to do the installworld.
453
454	[4] Note: This step is non-optional.  Failure to do this step
455	can result in a significant reduction in the functionality of the
456	system.  Attempting to do it by hand is not recommended and those
457	that pursue this avenue should read this file carefully, as well
458	as the archives of freebsd-current and freebsd-hackers mailing lists
459	for potential gotchas.
460
461	[5] Usually this step is a noop.  However, from time to time
462	you may need to do this if you get unknown user in the following
463	step.  It never hurts to do it all the time.  You may need to
464	install a new mergemaster (cd src/usr.sbin/mergemaster && make
465	install) after the buildworld before this step if you last updated
466	from current before 20020224 or from -stable before 20020408.
467
468	[8] In order to have a kernel that can run the 4.x binaries
469	needed to do an installworld, you must include the COMPAT_FREEBSD4
470	option in your kernel.  Failure to do so may leave you with a system
471	that is hard to boot to recover. A similar kernel option COMPAT_FREEBSD5
472	is required to run the 5.x binaries on more recent kernels.
473
474	Make sure that you merge any new devices from GENERIC since the
475	last time you updated your kernel config file.
476
477	[9] When checking out sources, you must include the -P flag to have
478	cvs prune empty directories.
479
480	If CPUTYPE is defined in your /etc/make.conf, make sure to use the
481	"?=" instead of the "=" assignment operator, so that buildworld can
482	override the CPUTYPE if it needs to.
483
484	MAKEOBJDIRPREFIX must be defined in an environment variable, and
485	not on the command line, or in /etc/make.conf.  buildworld will
486	warn if it is improperly defined.
487FORMAT:
488
489This file contains a list, in reverse chronological order, of major
490breakages in tracking -current.  Not all things will be listed here,
491and it only starts on October 16, 2004.  Updating files can found in
492previous releases if your system is older than this.
493
494Copyright information:
495
496Copyright 1998-2005 M. Warner Losh.  All Rights Reserved.
497
498Redistribution, publication, translation and use, with or without
499modification, in full or in part, in any form or format of this
500document are permitted without further permission from the author.
501
502THIS DOCUMENT IS PROVIDED BY WARNER LOSH ``AS IS'' AND ANY EXPRESS OR
503IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
504WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
505DISCLAIMED.  IN NO EVENT SHALL WARNER LOSH BE LIABLE FOR ANY DIRECT,
506INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
507(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
508SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
509HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
510STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
511IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
512POSSIBILITY OF SUCH DAMAGE.
513
514If you find this document useful, and you want to, you may buy the
515author a beer.
516
517Contact Warner Losh if you have any questions about your use of
518this document.
519
520$FreeBSD: head/UPDATING 156260 2006-03-03 21:37:38Z yar $
521