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