UPDATING revision 146988
1193323SedUpdating Information for FreeBSD current users
2193323Sed
3193323SedThis file is maintained and copyrighted by M. Warner Losh
4193323Sed<imp@village.org>.  See end of file for further details.  For commonly
5193323Seddone items, please see the COMMON ITEMS: section later in the file.
6193323Sed
7193323SedItems affecting the ports and packages system can be found in
8193323Sed/usr/ports/UPDATING.  Please read that file before running
9193323Sedportupgrade.
10193323Sed
11193323SedNOTE TO PEOPLE WHO THINK THAT FreeBSD 6.x IS SLOW:
12193323Sed	FreeBSD 6.x has many debugging features turned on, in
13193323Sed	both the kernel and userland.  These features attempt to detect
14193323Sed	incorrect use of system primitives, and encourage loud failure
15193323Sed	through extra sanity checking and fail stop semantics.  They
16193323Sed	also substantially impact system performance.  If you want to
17193323Sed	do performance measurement, benchmarking, and optimization,
18193323Sed	you'll want to turn them off.  This includes various WITNESS-
19193323Sed	related kernel options, INVARIANTS, malloc debugging flags
20249423Sdim	in userland, and various verbose features in the kernel.  Many
21249423Sdim	developers choose to disable these features on build machines
22218893Sdim	to maximize performance.
23198090Srdivacky
24249423Sdim20050605:
25193323Sed	if_bridge was added to the tree. This has changed struct ifnet.
26193323Sed	Please recompile userland and all network related modules.
27193323Sed
28193323Sed20050603:
29193323Sed	The n_net of a struct netent was changed to an uint32_t, and
30193323Sed	1st argument of getnetbyaddr() was changed to an uint32_t, to
31193323Sed	conform to POSIX-2001.  These changes broke an ABI
32193323Sed	compatibility on 64 bit architecture.  With these changes,
33193323Sed	shlib major of libpcap was bumped.  You have to recompile
34193323Sed	userland programs that use getnetbyaddr(3), getnetbyname(3),
35193323Sed	getnetent(3) and/or libpcap on 64 bit architecture.
36193323Sed
37205218Srdivacky20050528:
38193323Sed	Kernel parsing of extra options on '#!' first lines of shell
39221345Sdim	scripts has changed.  Lines with multiple options likely will
40193323Sed	fail after this date.  For full details, please see
41193323Sed		http://people.freebsd.org/~gad/Updating-20050528.txt
42193323Sed
43193323Sed20050503:
44193323Sed	The packet filter (pf) code has been updated to OpenBSD 3.7
45193323Sed	Please note the changed anchor syntax and the fact that
46193323Sed	authpf(8) now needs a mounted fdescfs(5) to function.
47193323Sed
48193323Sed20050415:
49193323Sed	The NO_MIXED_MODE kernel option has been removed from the i386
50193323Sed	amd64 platforms as its use has been superceded by the new local
51193323Sed	APIC timer code.  Any kernel config files containing this option
52193323Sed	should be updated.
53193323Sed
54234353Sdim20050227:
55193323Sed	The on-disk format of LC_CTYPE files was changed to be machine
56193323Sed	independent.  Please make sure NOT to use NO_CLEAN buildworld
57193323Sed	when crossing this point.
58193323Sed
59193323Sed20050225:
60193323Sed	The ifi_epoch member of struct if_data has been changed to
61193323Sed	contain the uptime at which the interface was created or the
62193323Sed	statistics zeroed rather then the wall clock time because
63193323Sed	wallclock time may go backwards.  This should have no impact
64193323Sed	unless an snmp implementation is using this value (I know of
65193323Sed	none at this point.)
66193323Sed
67193323Sed20050224:
68193323Sed	The acpi_perf and acpi_throttle drivers are now part of the
69193323Sed	acpi(4) main module.  They are no longer built separately.
70193323Sed
71201360Srdivacky20050223:
72201360Srdivacky	The layout of struct image_params has changed. You have to
73201360Srdivacky	recompile all compatibility modules (linux, svr4, etc) for use
74201360Srdivacky	with the new kernel.
75201360Srdivacky
76193323Sed20050223:
77193323Sed	The p4tcc driver has been merged into cpufreq(4).  This makes
78193323Sed	"options CPU_ENABLE_TCC" obsolete.  Please load cpufreq.ko or
79193323Sed	compile in "device cpufreq" to restore this functionality.
80193574Sed
81193323Sed20050220:
82193323Sed	The responsibility of recomputing the file system summary of
83193323Sed	a SoftUpdates-enabled dirty volume has been transferred to the
84193323Sed	background fsck.  A rebuild of fsck(8) utility is recommended
85193323Sed	if you have updated the kernel.
86193323Sed
87193323Sed	To get the old behavior (recompute file system summary at mount
88194178Sed	time), you can set vfs.ffs.compute_summary_at_mount=1 before
89193323Sed	mounting the new volume.
90193574Sed
91193574Sed20050206:
92193574Sed	The cpufreq import is complete.  As part of this, the sysctls for
93193574Sed	acpi(4) throttling have been removed.  The power_profile script
94193323Sed	has been updated, so you can use performance/economy_cpu_freq in
95193323Sed	rc.conf(5) to set AC on/offline cpu frequencies.
96193323Sed
97193323Sed20050206:
98193323Sed	NG_VERSION has been increased. Recompiling kernel (or ng_socket.ko)
99193323Sed	requires recompiling libnetgraph and userland netgraph utilities.
100193323Sed
101193323Sed20050114:
102194178Sed	Support for abbreviated forms of a number of ipfw options is
103193323Sed	now deprecated.  Warnings are printed to stderr indicating the
104193574Sed	correct full form when a match occurs.  Some abbreviations may
105193574Sed	be supported at a later date based on user feedback.  To be
106193574Sed	considered for support, abbreviations must be in use prior to
107193574Sed	this commit and unlikely to be confused with current key words.
108193323Sed
109193323Sed20041221:
110193323Sed	By a popular demand, a lot of NOFOO options were renamed
111193323Sed	to NO_FOO (see bsd.compat.mk for a full list).  The old
112193323Sed	spellings are still supported, but will cause annoying
113193323Sed	warnings on stderr.  Make sure you upgrade properly (see
114193323Sed	the COMMON ITEMS: section later in this file).
115193323Sed
116193323Sed20041219:
117193323Sed	Auto-loading of ancillary wlan modules such as wlan_wep has
118193574Sed	been temporarily disabled; you need to statically configure
119193574Sed	the modules you need into your kernel or explicitly load them
120193574Sed	prior to use.  Specifically, if you intend to use WEP encryption
121193574Sed	with an 802.11 device load/configure wlan_wep; if you want to
122193574Sed	use WPA with the ath driver load/configure wlan_tkip, wlan_ccmp,
123193574Sed	and wlan_xauth as required.
124193574Sed
125193574Sed20041213:
126193323Sed	The behaviour of ppp(8) has changed slightly.  If lqr is enabled
127193323Sed	(``enable lqr''), older versions would revert to LCP ECHO mode on
128193323Sed	negotiation failure.  Now, ``enable echo'' is required for this
129193323Sed	behaviour.  The ppp version number has been bumped to 3.4.2 to
130193323Sed	reflect the change.
131193323Sed
132193323Sed20041201:
133193323Sed	The wlan support has been updated to split the crypto support
134193323Sed	into separate modules.  For static WEP you must configure the
135193323Sed	wlan_wep module in your system or build and install the module
136193574Sed	in place where it can be loaded (the kernel will auto-load
137193574Sed	the module when a wep key is configured).
138193574Sed
139193574Sed20041201:
140193574Sed	The ath driver has been updated to split the tx rate control
141193574Sed	algorithm into a separate module.  You need to include either
142193574Sed	ath_rate_onoe or ath_rate_amrr when configuring the kernel.
143193574Sed
144193323Sed20041116:
145193323Sed	Support for systems with an 80386 CPU has been removed.  Please
146193323Sed	use FreeBSD 5.x or earlier on systems with an 80386.
147193323Sed
148193323Sed20041110:
149203954Srdivacky	We have had a hack which would mount the root filesystem
150193323Sed	R/W if the device were named 'md*'.  As part of the vnode
151193323Sed	work I'm doing I have had to remove this hack.  People
152193323Sed	building systems which use preloaded MD root filesystems
153198090Srdivacky	may need to insert a "/sbin/mount -u -o rw /dev/md0 /" in
154198090Srdivacky	their /etc/rc scripts.
155198090Srdivacky
156198090Srdivacky20041104:
157193323Sed	FreeBSD 5.3 shipped here.
158198090Srdivacky
159198090Srdivacky20041102:
160198090Srdivacky	The size of struct tcpcb has changed again due to the removal
161198090Srdivacky	of RFC1644 T/TCP.  You have to recompile userland programs that
162198090Srdivacky	read kmem for tcp sockets directly (netstat, sockstat, etc.)
163198090Srdivacky
164198090Srdivacky20041022:
165198090Srdivacky	The size of struct tcpcb has changed.  You have to recompile
166193323Sed	userland programs that read kmem for tcp sockets directly
167198090Srdivacky	(netstat, sockstat, etc.)
168193323Sed
169198090Srdivacky20041016:
170198090Srdivacky	RELENG_5 branched here.  For older entries, please see updating
171198090Srdivacky	in the RELENG_5 branch.
172193323Sed
173193323SedCOMMON ITEMS:
174193323Sed
175193323Sed	General Notes
176207618Srdivacky	-------------
177193323Sed	Avoid using make -j when upgrading.  From time to time in the
178193574Sed	past there have been problems using -j with buildworld and/or
179193323Sed	installworld.  This is especially true when upgrading between
180207618Srdivacky	"distant" versions (eg one that cross a major release boundary
181193323Sed	or several minor releases, or when several months have passed
182193323Sed	on the -current branch).
183207618Srdivacky
184207618Srdivacky	Sometimes, obscure build problems are the result of environment
185207618Srdivacky	poisoning.  This can happen because the make utility reads its
186207618Srdivacky	environment when searching for values for global variables.
187207618Srdivacky	To run your build attempts in an "environmental clean room",
188207618Srdivacky	prefix all make commands with 'env -i '.  See the env(1) manual
189207618Srdivacky	page for more details.
190193323Sed
191193323Sed	To build a kernel
192193323Sed	-----------------
193193323Sed	If you are updating from a prior version of FreeBSD (even one just
194194178Sed	a few days old), you should follow this procedure. With a
195193574Sed	/usr/obj tree with a fresh buildworld,
196193323Sed	make -DALWAYS_CHECK_MAKE buildkernel KERNCONF=YOUR_KERNEL_HERE
197193323Sed	make -DALWAYS_CHECK_MAKE installkernel KERNCONF=YOUR_KERNEL_HERE
198193323Sed
199193574Sed	To test a kernel once
200193323Sed	---------------------
201193323Sed	If you just want to boot a kernel once (because you are not sure
202193323Sed	if it works, or if you want to boot a known bad kernel to provide
203193323Sed	debugging information) run
204193323Sed	make installkernel KERNCONF=YOUR_KERNEL_HERE KODIR=/boot/testkernel
205193323Sed	nextboot -k testkernel
206193323Sed
207193323Sed	To just build a kernel when you know that it won't mess you up
208193323Sed	--------------------------------------------------------------
209193323Sed	This assumes you are already running a 5.X system.  Replace
210249423Sdim	${arch} with the architecture of your machine (e.g. "i386",
211193574Sed	"alpha", "amd64", "ia64", "pc98", "sparc64", etc).
212193323Sed
213193323Sed	cd src/sys/${arch}/conf
214193323Sed	config KERNEL_NAME_HERE
215193323Sed	cd ../compile/KERNEL_NAME_HERE
216193323Sed	make depend
217193323Sed	make
218194178Sed	make install
219193323Sed
220193323Sed	If this fails, go to the "To build a kernel" section.
221193323Sed
222193323Sed	To rebuild everything and install it on the current system.
223193323Sed	-----------------------------------------------------------
224193323Sed	# Note: sometimes if you are running current you gotta do more than
225193323Sed	# is listed here if you are upgrading from a really old current.
226193323Sed
227193323Sed	<make sure you have good level 0 dumps>
228193323Sed	make buildworld
229193323Sed	make kernel KERNCONF=YOUR_KERNEL_HERE
230193323Sed							[1]
231193323Sed	<reboot in single user>				[3]
232193323Sed	mergemaster -p					[5]
233193323Sed	make installworld
234193323Sed	mergemaster					[4]
235193323Sed	<reboot>
236193323Sed
237193323Sed
238193323Sed	To cross-install current onto a separate partition
239193323Sed	--------------------------------------------------
240193323Sed	# In this approach we use a separate partition to hold
241193323Sed	# current's root, 'usr', and 'var' directories.   A partition
242193323Sed	# holding "/", "/usr" and "/var" should be about 2GB in
243193323Sed	# size.
244193323Sed
245193323Sed	<make sure you have good level 0 dumps>
246193323Sed	<boot into -stable>
247193323Sed	make buildworld
248193323Sed	make buildkernel KERNCONF=YOUR_KERNEL_HERE
249193323Sed	<maybe newfs current's root partition>
250193323Sed	<mount current's root partition on directory ${CURRENT_ROOT}>
251205218Srdivacky	make installworld DESTDIR=${CURRENT_ROOT}
252193323Sed	cd src/etc; make distribution DESTDIR=${CURRENT_ROOT} # if newfs'd
253193323Sed	make installkernel KERNCONF=YOUR_KERNEL_HERE DESTDIR=${CURRENT_ROOT}
254193323Sed	cp /etc/fstab ${CURRENT_ROOT}/etc/fstab 		   # if newfs'd
255193323Sed	<edit ${CURRENT_ROOT}/etc/fstab to mount "/" from the correct partition>
256193323Sed	<reboot into current>
257193323Sed	<do a "native" rebuild/install as described in the previous section>
258193323Sed	<maybe install compatibility libraries from src/lib/compat>
259193323Sed 	<reboot>
260193323Sed
261193323Sed
262193323Sed	To upgrade in-place from 5.x-stable to current
263193323Sed	----------------------------------------------
264193323Sed	<make sure you have good level 0 dumps>
265193323Sed	make buildworld					[9]
266193323Sed	make kernel KERNCONF=YOUR_KERNEL_HERE		[8]
267193323Sed							[1]
268193323Sed	<reboot in single user>				[3]
269193323Sed	mergemaster -p					[5]
270193323Sed	make installworld
271193323Sed	mergemaster -i					[4]
272193323Sed	<reboot>
273198090Srdivacky
274198090Srdivacky	Make sure that you've read the UPDATING file to understand the
275198090Srdivacky	tweaks to various things you need.  At this point in the life
276198090Srdivacky	cycle of current, things change often and you are on your own
277198090Srdivacky	to cope.  The defaults can also change, so please read ALL of
278193323Sed	the UPDATING entries.
279193323Sed
280193323Sed	Also, if you are tracking -current, you must be subscribed to
281193323Sed	freebsd-current@freebsd.org.  Make sure that before you update
282193323Sed	your sources that you have read and understood all the recent
283193323Sed	messages there.  If in doubt, please track -stable which has
284193323Sed	much fewer pitfalls.
285193323Sed
286193323Sed	[1] If you have third party modules, such as vmware, you
287193323Sed	should disable them at this point so they don't crash your
288193323Sed	system on reboot.
289193323Sed
290193323Sed	[3] From the bootblocks, boot -s, and then do
291193323Sed		fsck -p
292193323Sed		mount -u /
293193323Sed		mount -a
294193323Sed		cd src
295193323Sed		adjkerntz -i		# if CMOS is wall time
296198090Srdivacky	Also, when doing a major release upgrade, it is required that
297198090Srdivacky	you boot into single user mode to do the installworld.
298198090Srdivacky
299198090Srdivacky	[4] Note: This step is non-optional.  Failure to do this step
300198090Srdivacky	can result in a significant reduction in the functionality of the
301198090Srdivacky	system.  Attempting to do it by hand is not recommended and those
302198090Srdivacky	that pursue this avenue should read this file carefully, as well
303193323Sed	as the archives of freebsd-current and freebsd-hackers mailing lists
304193323Sed	for potential gotchas.
305193323Sed
306193323Sed	[5] Usually this step is a noop.  However, from time to time
307193323Sed	you may need to do this if you get unknown user in the following
308193323Sed	step.  It never hurts to do it all the time.  You may need to
309193323Sed	install a new mergemaster (cd src/usr.sbin/mergemaster && make
310193323Sed	install) after the buildworld before this step if you last updated
311193323Sed	from current before 20020224 or from -stable before 20020408.
312193323Sed
313193323Sed	[8] In order to have a kernel that can run the 4.x binaries
314193323Sed	needed to do an installworld, you must include the COMPAT_FREEBSD4
315193323Sed	option in your kernel.  Failure to do so may leave you with a system
316193323Sed	that is hard to boot to recover.
317193323Sed
318193323Sed	Make sure that you merge any new devices from GENERIC since the
319193323Sed	last time you updated your kernel config file.
320193323Sed
321193323Sed	[9] When checking out sources, you must include the -P flag to have
322193323Sed	cvs prune empty directories.
323193323Sed
324193323Sed	If CPUTYPE is defined in your /etc/make.conf, make sure to use the
325205218Srdivacky	"?=" instead of the "=" assignment operator, so that buildworld can
326205218Srdivacky	override the CPUTYPE if it needs to.
327193323Sed
328205218Srdivacky	MAKEOBJDIRPREFIX must be defined in an environment variable, and
329193323Sed	not on the command line, or in /etc/make.conf.  buildworld will
330193323Sed	warn if it is improperly defined.
331193323SedFORMAT:
332193323Sed
333207618SrdivackyThis file contains a list, in reverse chronological order, of major
334207618Srdivackybreakages in tracking -current.  Not all things will be listed here,
335207618Srdivackyand it only starts on October 16, 2004.  Updating files can found in
336207618Srdivackyprevious releases if your system is older than this.
337193323Sed
338193323SedCopyright information:
339193323Sed
340193323SedCopyright 1998-2005 M. Warner Losh.  All Rights Reserved.
341193323Sed
342Redistribution, publication, translation and use, with or without
343modification, in full or in part, in any form or format of this
344document are permitted without further permission from the author.
345
346THIS DOCUMENT IS PROVIDED BY WARNER LOSH ``AS IS'' AND ANY EXPRESS OR
347IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
348WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
349DISCLAIMED.  IN NO EVENT SHALL WARNER LOSH BE LIABLE FOR ANY DIRECT,
350INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
351(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
352SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
353HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
354STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
355IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
356POSSIBILITY OF SUCH DAMAGE.
357
358If you find this document useful, and you want to, you may buy the
359author a beer.
360
361Contact Warner Losh if you have any questions about your use of
362this document.
363
364$FreeBSD: head/UPDATING 146988 2005-06-05 03:38:03Z thompsa $
365