UPDATING revision 153044
1210284SjmallettUpdating Information for FreeBSD current users
2215990Sjmallett
3215990SjmallettThis file is maintained and copyrighted by M. Warner Losh
4210284Sjmallett<imp@village.org>.  See end of file for further details.  For commonly
5210284Sjmallettdone items, please see the COMMON ITEMS: section later in the file.
6215990Sjmallett
7215990SjmallettItems affecting the ports and packages system can be found in
8215990Sjmallett/usr/ports/UPDATING.  Please read that file before running
9210284Sjmallettportupgrade.
10215990Sjmallett
11215990SjmallettNOTE TO PEOPLE WHO THINK THAT FreeBSD 7.x IS SLOW:
12210284Sjmallett	FreeBSD 7.x has many debugging features turned on, in
13215990Sjmallett	both the kernel and userland.  These features attempt to detect
14215990Sjmallett	incorrect use of system primitives, and encourage loud failure
15215990Sjmallett	through extra sanity checking and fail stop semantics.  They
16215990Sjmallett	also substantially impact system performance.  If you want to
17215990Sjmallett	do performance measurement, benchmarking, and optimization,
18215990Sjmallett	you'll want to turn them off.  This includes various WITNESS-
19215990Sjmallett	related kernel options, INVARIANTS, malloc debugging flags
20215990Sjmallett	in userland, and various verbose features in the kernel.  Many
21215990Sjmallett	developers choose to disable these features on build machines
22215990Sjmallett	to maximize performance.
23215990Sjmallett
24215990Sjmallett20051202:
25215990Sjmallett	Scripts in the local_startup directories (as defined in
26215990Sjmallett	/etc/defaults/rc.conf) that have the new rc.d semantics will
27215990Sjmallett	now be run as part of the base system rcorder. If there are
28215990Sjmallett	errors or problems with one of these local scripts, it could
29215990Sjmallett	cause boot problems. If you encounter such problems, boot in
30215990Sjmallett	single user mode, remove that script from the */rc.d directory.
31215990Sjmallett	Please report the problem to the port's maintainer, and the
32215990Sjmallett	freebsd-ports@freebsd.org mailing list.
33215990Sjmallett
34215990Sjmallett20051129:
35215990Sjmallett	The nodev mount option was deprecated in RELENG_6 (where it
36215990Sjmallett	was a no-op), and is now unsupported.  If you have nodev or dev listed
37215990Sjmallett	in /etc/fstab, remove it, otherwise it will result in a mount error.
38210284Sjmallett
39210284Sjmallett20051129:
40210284Sjmallett	ABI between ipfw(4) and ipfw(8) has been changed. You need
41210284Sjmallett	to rebuild ipfw(8) when rebuilding kernel.
42210284Sjmallett
43210284Sjmallett20051029:
44210284Sjmallett	/etc/rc.d/ppp-user has been renamed to /etc/rc.d/ppp.
45215990Sjmallett	Its /etc/rc.conf.d configuration file has been `ppp' from
46210284Sjmallett	the beginning, and hence there is no need to touch it.
47210284Sjmallett
48210284Sjmallett20051001:
49210284Sjmallett	kern.polling.enable sysctl MIB is now deprecated. Use ifconfig(8)
50210284Sjmallett	to turn polling(4) on your interfaces.
51210284Sjmallett
52210284Sjmallett20050927:
53210284Sjmallett	The old bridge(4) implementation was retired.  The new
54215990Sjmallett	if_bridge(4) serves as a full functional replacement.
55210284Sjmallett
56210284Sjmallett20050722:
57210284Sjmallett	The ai_addrlen of a struct addrinfo was changed to a socklen_t
58210284Sjmallett	to conform to POSIX-2001.  This change broke an ABI
59210284Sjmallett	compatibility on 64 bit architecture.  You have to recompile
60210284Sjmallett	userland programs that use getaddrinfo(3) on 64 bit
61210284Sjmallett	architecture.
62210284Sjmallett
63210284Sjmallett20050711:
64210284Sjmallett	RELENG_6 branched here.
65210284Sjmallett
66210284Sjmallett20050629:
67210284Sjmallett	The pccard_ifconfig rc.conf variable has been removed and a new
68210284Sjmallett	variable, ifconfig_DEFAULT has been introduced.  Unlike
69210284Sjmallett	pccard_ifconfig, ifconfig_DEFAULT applies to ALL interfaces that
70210284Sjmallett	do not have ifconfig_ifn entries rather than just those in
71210284Sjmallett	removable_interfaces.
72210284Sjmallett
73210284Sjmallett20050616:
74210284Sjmallett	Some previous versions of PAM have permitted the use of
75210284Sjmallett	non-absolute paths in /etc/pam.conf or /etc/pam.d/* when referring
76210284Sjmallett	to third party PAM modules in /usr/local/lib.  A change has been
77210284Sjmallett	made to require the use of absolute paths in order to avoid
78210284Sjmallett	ambiguity and dependence on library path configuration, which may
79210284Sjmallett	affect existing configurations.
80210284Sjmallett
81210284Sjmallett20050610:
82210284Sjmallett	Major changes to network interface API.  All drivers must be
83210284Sjmallett	recompiled.  Drivers not in the base system will need to be
84210284Sjmallett	updated to the new APIs.
85210284Sjmallett
86210284Sjmallett20050609:
87210284Sjmallett	Changes were made to kinfo_proc in sys/user.h.  Please recompile
88210284Sjmallett	userland, or commands like `fstat', `pkill', `ps', `top' and `w'
89210284Sjmallett	will not behave correctly.
90210284Sjmallett
91210284Sjmallett	The API and ABI for hwpmc(4) have changed with the addition
92210284Sjmallett	of sampling support.  Please recompile lib/libpmc(3) and
93210284Sjmallett	usr.sbin/{pmcstat,pmccontrol}.
94210284Sjmallett
95210284Sjmallett20050606:
96210284Sjmallett	The OpenBSD dhclient was imported in place of the ISC dhclient
97210284Sjmallett	and the network interface configuration scripts were updated
98210284Sjmallett	accordingly.  If you use DHCP to configure your interfaces, you
99210284Sjmallett	must now run devd.  Also, DNS updating was lost so you will need
100210284Sjmallett	to find a workaround if you use this feature.
101210284Sjmallett
102210284Sjmallett20050605:
103210284Sjmallett	if_bridge was added to the tree. This has changed struct ifnet.
104210284Sjmallett	Please recompile userland and all network related modules.
105210284Sjmallett
106210284Sjmallett20050603:
107210284Sjmallett	The n_net of a struct netent was changed to an uint32_t, and
108210284Sjmallett	1st argument of getnetbyaddr() was changed to an uint32_t, to
109210284Sjmallett	conform to POSIX-2001.  These changes broke an ABI
110210284Sjmallett	compatibility on 64 bit architecture.  With these changes,
111210284Sjmallett	shlib major of libpcap was bumped.  You have to recompile
112210284Sjmallett	userland programs that use getnetbyaddr(3), getnetbyname(3),
113210284Sjmallett	getnetent(3) and/or libpcap on 64 bit architecture.
114210284Sjmallett
115210284Sjmallett20050528:
116210284Sjmallett	Kernel parsing of extra options on '#!' first lines of shell
117210284Sjmallett	scripts has changed.  Lines with multiple options likely will
118210284Sjmallett	fail after this date.  For full details, please see
119210284Sjmallett		http://people.freebsd.org/~gad/Updating-20050528.txt
120210284Sjmallett
121210284Sjmallett20050503:
122210284Sjmallett	The packet filter (pf) code has been updated to OpenBSD 3.7
123210284Sjmallett	Please note the changed anchor syntax and the fact that
124210284Sjmallett	authpf(8) now needs a mounted fdescfs(5) to function.
125210284Sjmallett
126210284Sjmallett20050415:
127210284Sjmallett	The NO_MIXED_MODE kernel option has been removed from the i386
128210284Sjmallett	amd64 platforms as its use has been superceded by the new local
129210284Sjmallett	APIC timer code.  Any kernel config files containing this option
130210284Sjmallett	should be updated.
131210284Sjmallett
132210284Sjmallett20050227:
133210284Sjmallett	The on-disk format of LC_CTYPE files was changed to be machine
134210284Sjmallett	independent.  Please make sure NOT to use NO_CLEAN buildworld
135	when crossing this point.
136
13720050225:
138	The ifi_epoch member of struct if_data has been changed to
139	contain the uptime at which the interface was created or the
140	statistics zeroed rather then the wall clock time because
141	wallclock time may go backwards.  This should have no impact
142	unless an snmp implementation is using this value (I know of
143	none at this point.)
144
14520050224:
146	The acpi_perf and acpi_throttle drivers are now part of the
147	acpi(4) main module.  They are no longer built separately.
148
14920050223:
150	The layout of struct image_params has changed. You have to
151	recompile all compatibility modules (linux, svr4, etc) for use
152	with the new kernel.
153
15420050223:
155	The p4tcc driver has been merged into cpufreq(4).  This makes
156	"options CPU_ENABLE_TCC" obsolete.  Please load cpufreq.ko or
157	compile in "device cpufreq" to restore this functionality.
158
15920050220:
160	The responsibility of recomputing the file system summary of
161	a SoftUpdates-enabled dirty volume has been transferred to the
162	background fsck.  A rebuild of fsck(8) utility is recommended
163	if you have updated the kernel.
164
165	To get the old behavior (recompute file system summary at mount
166	time), you can set vfs.ffs.compute_summary_at_mount=1 before
167	mounting the new volume.
168
16920050206:
170	The cpufreq import is complete.  As part of this, the sysctls for
171	acpi(4) throttling have been removed.  The power_profile script
172	has been updated, so you can use performance/economy_cpu_freq in
173	rc.conf(5) to set AC on/offline cpu frequencies.
174
17520050206:
176	NG_VERSION has been increased. Recompiling kernel (or ng_socket.ko)
177	requires recompiling libnetgraph and userland netgraph utilities.
178
17920050114:
180	Support for abbreviated forms of a number of ipfw options is
181	now deprecated.  Warnings are printed to stderr indicating the
182	correct full form when a match occurs.  Some abbreviations may
183	be supported at a later date based on user feedback.  To be
184	considered for support, abbreviations must be in use prior to
185	this commit and unlikely to be confused with current key words.
186
18720041221:
188	By a popular demand, a lot of NOFOO options were renamed
189	to NO_FOO (see bsd.compat.mk for a full list).  The old
190	spellings are still supported, but will cause annoying
191	warnings on stderr.  Make sure you upgrade properly (see
192	the COMMON ITEMS: section later in this file).
193
19420041219:
195	Auto-loading of ancillary wlan modules such as wlan_wep has
196	been temporarily disabled; you need to statically configure
197	the modules you need into your kernel or explicitly load them
198	prior to use.  Specifically, if you intend to use WEP encryption
199	with an 802.11 device load/configure wlan_wep; if you want to
200	use WPA with the ath driver load/configure wlan_tkip, wlan_ccmp,
201	and wlan_xauth as required.
202
20320041213:
204	The behaviour of ppp(8) has changed slightly.  If lqr is enabled
205	(``enable lqr''), older versions would revert to LCP ECHO mode on
206	negotiation failure.  Now, ``enable echo'' is required for this
207	behaviour.  The ppp version number has been bumped to 3.4.2 to
208	reflect the change.
209
21020041201:
211	The wlan support has been updated to split the crypto support
212	into separate modules.  For static WEP you must configure the
213	wlan_wep module in your system or build and install the module
214	in place where it can be loaded (the kernel will auto-load
215	the module when a wep key is configured).
216
21720041201:
218	The ath driver has been updated to split the tx rate control
219	algorithm into a separate module.  You need to include either
220	ath_rate_onoe or ath_rate_amrr when configuring the kernel.
221
22220041116:
223	Support for systems with an 80386 CPU has been removed.  Please
224	use FreeBSD 5.x or earlier on systems with an 80386.
225
22620041110:
227	We have had a hack which would mount the root filesystem
228	R/W if the device were named 'md*'.  As part of the vnode
229	work I'm doing I have had to remove this hack.  People
230	building systems which use preloaded MD root filesystems
231	may need to insert a "/sbin/mount -u -o rw /dev/md0 /" in
232	their /etc/rc scripts.
233
23420041104:
235	FreeBSD 5.3 shipped here.
236
23720041102:
238	The size of struct tcpcb has changed again due to the removal
239	of RFC1644 T/TCP.  You have to recompile userland programs that
240	read kmem for tcp sockets directly (netstat, sockstat, etc.)
241
24220041022:
243	The size of struct tcpcb has changed.  You have to recompile
244	userland programs that read kmem for tcp sockets directly
245	(netstat, sockstat, etc.)
246
24720041016:
248	RELENG_5 branched here.  For older entries, please see updating
249	in the RELENG_5 branch.
250
251COMMON ITEMS:
252
253	General Notes
254	-------------
255	Avoid using make -j when upgrading.  From time to time in the
256	past there have been problems using -j with buildworld and/or
257	installworld.  This is especially true when upgrading between
258	"distant" versions (eg one that cross a major release boundary
259	or several minor releases, or when several months have passed
260	on the -current branch).
261
262	Sometimes, obscure build problems are the result of environment
263	poisoning.  This can happen because the make utility reads its
264	environment when searching for values for global variables.
265	To run your build attempts in an "environmental clean room",
266	prefix all make commands with 'env -i '.  See the env(1) manual
267	page for more details.
268
269	To build a kernel
270	-----------------
271	If you are updating from a prior version of FreeBSD (even one just
272	a few days old), you should follow this procedure.  It is the most
273	failsafe as it uses a /usr/obj tree with a fresh mini-buildworld,
274
275	make kernel-toolchain
276	make -DALWAYS_CHECK_MAKE buildkernel KERNCONF=YOUR_KERNEL_HERE
277	make -DALWAYS_CHECK_MAKE installkernel KERNCONF=YOUR_KERNEL_HERE
278
279	To test a kernel once
280	---------------------
281	If you just want to boot a kernel once (because you are not sure
282	if it works, or if you want to boot a known bad kernel to provide
283	debugging information) run
284	make installkernel KERNCONF=YOUR_KERNEL_HERE KODIR=/boot/testkernel
285	nextboot -k testkernel
286
287	To just build a kernel when you know that it won't mess you up
288	--------------------------------------------------------------
289	This assumes you are already running a 5.X system.  Replace
290	${arch} with the architecture of your machine (e.g. "i386",
291	"alpha", "amd64", "ia64", "pc98", "sparc64", etc).
292
293	cd src/sys/${arch}/conf
294	config KERNEL_NAME_HERE
295	cd ../compile/KERNEL_NAME_HERE
296	make depend
297	make
298	make install
299
300	If this fails, go to the "To build a kernel" section.
301
302	To rebuild everything and install it on the current system.
303	-----------------------------------------------------------
304	# Note: sometimes if you are running current you gotta do more than
305	# is listed here if you are upgrading from a really old current.
306
307	<make sure you have good level 0 dumps>
308	make buildworld
309	make kernel KERNCONF=YOUR_KERNEL_HERE
310							[1]
311	<reboot in single user>				[3]
312	mergemaster -p					[5]
313	make installworld
314	make delete-old
315	mergemaster					[4]
316	<reboot>
317
318
319	To cross-install current onto a separate partition
320	--------------------------------------------------
321	# In this approach we use a separate partition to hold
322	# current's root, 'usr', and 'var' directories.   A partition
323	# holding "/", "/usr" and "/var" should be about 2GB in
324	# size.
325
326	<make sure you have good level 0 dumps>
327	<boot into -stable>
328	make buildworld
329	make buildkernel KERNCONF=YOUR_KERNEL_HERE
330	<maybe newfs current's root partition>
331	<mount current's root partition on directory ${CURRENT_ROOT}>
332	make installworld DESTDIR=${CURRENT_ROOT}
333	cd src/etc; make distribution DESTDIR=${CURRENT_ROOT} # if newfs'd
334	make installkernel KERNCONF=YOUR_KERNEL_HERE DESTDIR=${CURRENT_ROOT}
335	cp /etc/fstab ${CURRENT_ROOT}/etc/fstab 		   # if newfs'd
336	<edit ${CURRENT_ROOT}/etc/fstab to mount "/" from the correct partition>
337	<reboot into current>
338	<do a "native" rebuild/install as described in the previous section>
339	<maybe install compatibility libraries from src/lib/compat>
340 	<reboot>
341
342
343	To upgrade in-place from 5.x-stable to current
344	----------------------------------------------
345	<make sure you have good level 0 dumps>
346	make buildworld					[9]
347	make kernel KERNCONF=YOUR_KERNEL_HERE		[8]
348							[1]
349	<reboot in single user>				[3]
350	mergemaster -p					[5]
351	make installworld
352	make delete-old
353	mergemaster -i					[4]
354	<reboot>
355
356	Make sure that you've read the UPDATING file to understand the
357	tweaks to various things you need.  At this point in the life
358	cycle of current, things change often and you are on your own
359	to cope.  The defaults can also change, so please read ALL of
360	the UPDATING entries.
361
362	Also, if you are tracking -current, you must be subscribed to
363	freebsd-current@freebsd.org.  Make sure that before you update
364	your sources that you have read and understood all the recent
365	messages there.  If in doubt, please track -stable which has
366	much fewer pitfalls.
367
368	[1] If you have third party modules, such as vmware, you
369	should disable them at this point so they don't crash your
370	system on reboot.
371
372	[3] From the bootblocks, boot -s, and then do
373		fsck -p
374		mount -u /
375		mount -a
376		cd src
377		adjkerntz -i		# if CMOS is wall time
378	Also, when doing a major release upgrade, it is required that
379	you boot into single user mode to do the installworld.
380
381	[4] Note: This step is non-optional.  Failure to do this step
382	can result in a significant reduction in the functionality of the
383	system.  Attempting to do it by hand is not recommended and those
384	that pursue this avenue should read this file carefully, as well
385	as the archives of freebsd-current and freebsd-hackers mailing lists
386	for potential gotchas.
387
388	[5] Usually this step is a noop.  However, from time to time
389	you may need to do this if you get unknown user in the following
390	step.  It never hurts to do it all the time.  You may need to
391	install a new mergemaster (cd src/usr.sbin/mergemaster && make
392	install) after the buildworld before this step if you last updated
393	from current before 20020224 or from -stable before 20020408.
394
395	[8] In order to have a kernel that can run the 4.x binaries
396	needed to do an installworld, you must include the COMPAT_FREEBSD4
397	option in your kernel.  Failure to do so may leave you with a system
398	that is hard to boot to recover.
399
400	Make sure that you merge any new devices from GENERIC since the
401	last time you updated your kernel config file.
402
403	[9] When checking out sources, you must include the -P flag to have
404	cvs prune empty directories.
405
406	If CPUTYPE is defined in your /etc/make.conf, make sure to use the
407	"?=" instead of the "=" assignment operator, so that buildworld can
408	override the CPUTYPE if it needs to.
409
410	MAKEOBJDIRPREFIX must be defined in an environment variable, and
411	not on the command line, or in /etc/make.conf.  buildworld will
412	warn if it is improperly defined.
413FORMAT:
414
415This file contains a list, in reverse chronological order, of major
416breakages in tracking -current.  Not all things will be listed here,
417and it only starts on October 16, 2004.  Updating files can found in
418previous releases if your system is older than this.
419
420Copyright information:
421
422Copyright 1998-2005 M. Warner Losh.  All Rights Reserved.
423
424Redistribution, publication, translation and use, with or without
425modification, in full or in part, in any form or format of this
426document are permitted without further permission from the author.
427
428THIS DOCUMENT IS PROVIDED BY WARNER LOSH ``AS IS'' AND ANY EXPRESS OR
429IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
430WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
431DISCLAIMED.  IN NO EVENT SHALL WARNER LOSH BE LIABLE FOR ANY DIRECT,
432INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
433(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
434SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
435HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
436STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
437IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
438POSSIBILITY OF SUCH DAMAGE.
439
440If you find this document useful, and you want to, you may buy the
441author a beer.
442
443Contact Warner Losh if you have any questions about your use of
444this document.
445
446$FreeBSD: head/UPDATING 153044 2005-12-03 07:51:07Z dougb $
447