UPDATING revision 146257
1177692SmarcelUpdating Information for FreeBSD current users
2177692Smarcel
3177692SmarcelThis file is maintained and copyrighted by M. Warner Losh
4177692Smarcel<imp@village.org>.  See end of file for further details.  For commonly
5177692Smarceldone items, please see the COMMON ITEMS: section later in the file.
6177692Smarcel
7177692SmarcelItems affecting the ports and packages system can be found in
8177692Smarcel/usr/ports/UPDATING.  Please read that file before running
9177692Smarcelportupgrade.
10177692Smarcel
11177692SmarcelNOTE TO PEOPLE WHO THINK THAT FreeBSD 6.x IS SLOW:
12177692Smarcel	FreeBSD 6.x has many debugging features turned on, in
13177692Smarcel	both the kernel and userland.  These features attempt to detect
14177692Smarcel	incorrect use of system primitives, and encourage loud failure
15177692Smarcel	through extra sanity checking and fail stop semantics.  They
16177692Smarcel	also substantially impact system performance.  If you want to
17177692Smarcel	do performance measurement, benchmarking, and optimization,
18177692Smarcel	you'll want to turn them off.  This includes various WITNESS-
19177692Smarcel	related kernel options, INVARIANTS, malloc debugging flags
20177692Smarcel	in userland, and various verbose features in the kernel.  Many
21177692Smarcel	developers choose to disable these features on build machines
22177692Smarcel	to maximize performance.
23177692Smarcel
24177692Smarcel20050503:
25177692Smarcel	The packet filter (pf) code has been updated to OpenBSD 3.7
26177692Smarcel	Please note the changed anchor syntax and the fact that
27177692Smarcel	authpf(8) now needs a mounted fdescfs(5) to function.
28177692Smarcel
29177692Smarcel20050415:
30177692Smarcel	The NO_MIXED_MODE kernel option has been removed from the i386
31177692Smarcel	amd64 platforms as its use has been superceded by the new local
32177692Smarcel	APIC timer code.  Any kernel config files containing this option
33177692Smarcel	should be updated.
34177692Smarcel
35177692Smarcel20050227:
36177692Smarcel	The on-disk format of LC_CTYPE files was changed to be machine
37177692Smarcel	independent.  Please make sure NOT to use NO_CLEAN buildworld
38177692Smarcel	when crossing this point.
39177692Smarcel
40177692Smarcel20050225:
41177692Smarcel	The ifi_epoch member of struct if_data has been changed to
42177692Smarcel	contain the uptime at which the interface was created or the
43219029Snetchild	statistics zeroed rather then the wall clock time because
44177692Smarcel	wallclock time may go backwards.  This should have no impact
45265910Sae	unless an snmp implementation is using this value (I know of
46177692Smarcel	none at this point.)
47177692Smarcel
48177692Smarcel20050224:
49177692Smarcel	The acpi_perf and acpi_throttle drivers are now part of the
50219029Snetchild	acpi(4) main module.  They are no longer built separately.
51219029Snetchild
52177692Smarcel20050223:
53218558Snyan	The layout of struct image_params has changed. You have to
54218558Snyan	recompile all compatibility modules (linux, svr4, etc) for use
55177692Smarcel	with the new kernel.
56177692Smarcel
57177692Smarcel20050223:
58177692Smarcel	The p4tcc driver has been merged into cpufreq(4).  This makes
59177692Smarcel	"options CPU_ENABLE_TCC" obsolete.  Please load cpufreq.ko or
60218558Snyan	compile in "device cpufreq" to restore this functionality.
61177692Smarcel
62177692Smarcel20050220:
63177692Smarcel	The responsibility of recomputing the file system summary of
64177692Smarcel	a SoftUpdates-enabled dirty volume has been transferred to the
65177692Smarcel	background fsck.  A rebuild of fsck(8) utility is recommended
66177692Smarcel	if you have updated the kernel.
67177692Smarcel
68177692Smarcel	To get the old behavior (recompute file system summary at mount
69177692Smarcel	time), you can set vfs.ffs.compute_summary_at_mount=1 before
70178180Smarcel	mounting the new volume.
71177692Smarcel
72177692Smarcel20050206:
73188429Simp	The cpufreq import is complete.  As part of this, the sysctls for
74178444Smarcel	acpi(4) throttling have been removed.  The power_profile script
75177692Smarcel	has been updated, so you can use performance/economy_cpu_freq in
76177692Smarcel	rc.conf(5) to set AC on/offline cpu frequencies.
77177692Smarcel
78188429Simp20050206:
79177692Smarcel	NG_VERSION has been increased. Recompiling kernel (or ng_socket.ko)
80177692Smarcel	requires recompiling libnetgraph and userland netgraph utilities.
81177692Smarcel
82184069Smarcel20050114:
83184069Smarcel	Support for abbreviated forms of a number of ipfw options is
84184069Smarcel	now deprecated.  Warnings are printed to stderr indicating the
85184069Smarcel	correct full form when a match occurs.  Some abbreviations may
86177692Smarcel	be supported at a later date based on user feedback.  To be
87207094Smarcel	considered for support, abbreviations must be in use prior to
88207094Smarcel	this commit and unlikely to be confused with current key words.
89177692Smarcel
90177692Smarcel20041221:
91177692Smarcel	By a popular demand, a lot of NOFOO options were renamed
92178180Smarcel	to NO_FOO (see bsd.compat.mk for a full list).  The old
93177692Smarcel	spellings are still supported, but will cause annoying
94177692Smarcel	warnings on stderr.  Make sure you upgrade properly (see
95178444Smarcel	the COMMON ITEMS: section later in this file).
96177692Smarcel
97177692Smarcel20041219:
98207094Smarcel	Auto-loading of ancillary wlan modules such as wlan_wep has
99177692Smarcel	been temporarily disabled; you need to statically configure
100177692Smarcel	the modules you need into your kernel or explicitly load them
101177692Smarcel	prior to use.  Specifically, if you intend to use WEP encryption
102184069Smarcel	with an 802.11 device load/configure wlan_wep; if you want to
103177692Smarcel	use WPA with the ath driver load/configure wlan_tkip, wlan_ccmp,
104177692Smarcel	and wlan_xauth as required.
105177692Smarcel
106177692Smarcel20041213:
107177692Smarcel	The behaviour of ppp(8) has changed slightly.  If lqr is enabled
108177692Smarcel	(``enable lqr''), older versions would revert to LCP ECHO mode on
109177692Smarcel	negotiation failure.  Now, ``enable echo'' is required for this
110177692Smarcel	behaviour.  The ppp version number has been bumped to 3.4.2 to
111177692Smarcel	reflect the change.
112177692Smarcel
113254015Smarcel20041201:
114254015Smarcel	The wlan support has been updated to split the crypto support
115218558Snyan	into separate modules.  For static WEP you must configure the
116177692Smarcel	wlan_wep module in your system or build and install the module
117177692Smarcel	in place where it can be loaded (the kernel will auto-load
118177692Smarcel	the module when a wep key is configured).
119177692Smarcel
120177692Smarcel20041201:
121177692Smarcel	The ath driver has been updated to split the tx rate control
122177692Smarcel	algorithm into a separate module.  You need to include either
123177692Smarcel	ath_rate_onoe or ath_rate_amrr when configuring the kernel.
124177692Smarcel
125177692Smarcel20041116:
126177692Smarcel	Support for systems with an 80386 CPU has been removed.  Please
127177692Smarcel	use FreeBSD 5.x or earlier on systems with an 80386.
128177692Smarcel
129177692Smarcel20041110:
130177692Smarcel	We have had a hack which would mount the root filesystem
131184069Smarcel	R/W if the device were named 'md*'.  As part of the vnode
132184069Smarcel	work I'm doing I have had to remove this hack.  People
133184069Smarcel	building systems which use preloaded MD root filesystems
134184069Smarcel	may need to insert a "/sbin/mount -u -o rw /dev/md0 /" in
135184069Smarcel	their /etc/rc scripts.
136177692Smarcel
137177692Smarcel20041104:
138177692Smarcel	FreeBSD 5.3 shipped here.
139177692Smarcel
140184069Smarcel20041102:
141184069Smarcel	The size of struct tcpcb has changed again due to the removal
142177692Smarcel	of RFC1644 T/TCP.  You have to recompile userland programs that
143177692Smarcel	read kmem for tcp sockets directly (netstat, sockstat, etc.)
144177692Smarcel
145177692Smarcel20041022:
146177692Smarcel	The size of struct tcpcb has changed.  You have to recompile
147218845Snyan	userland programs that read kmem for tcp sockets directly
148218845Snyan	(netstat, sockstat, etc.)
149218845Snyan
150218845Snyan20041016:
151218845Snyan	RELENG_5 branched here.  For older entries, please see updating
152218845Snyan	in the RELENG_5 branch.
153218845Snyan
154218845SnyanCOMMON ITEMS:
155218845Snyan
156218845Snyan	General Notes
157218845Snyan	-------------
158218845Snyan	Avoid using make -j when upgrading.  From time to time in the
159218845Snyan	past there have been problems using -j with buildworld and/or
160218845Snyan	installworld.  This is especially true when upgrading between
161177692Smarcel	"distant" versions (eg one that cross a major release boundary
162177692Smarcel	or several minor releases, or when several months have passed
163177692Smarcel	on the -current branch).
164177692Smarcel
165177692Smarcel	Sometimes, obscure build problems are the result of environment
166177692Smarcel	poisoning.  This can happen because the make utility reads its
167177692Smarcel	environment when searching for values for global variables.
168177692Smarcel	To run your build attempts in an "environmental clean room",
169177692Smarcel	prefix all make commands with 'env -i '.  See the env(1) manual
170177692Smarcel	page for more details.
171177692Smarcel
172177692Smarcel	To build a kernel
173177692Smarcel	-----------------
174177692Smarcel	If you are updating from a prior version of FreeBSD (even one just
175177692Smarcel	a few days old), you should follow this procedure. With a
176177692Smarcel	/usr/obj tree with a fresh buildworld,
177177692Smarcel	make -DALWAYS_CHECK_MAKE buildkernel KERNCONF=YOUR_KERNEL_HERE
178177692Smarcel	make -DALWAYS_CHECK_MAKE installkernel KERNCONF=YOUR_KERNEL_HERE
179265910Sae
180265910Sae	To just build a kernel when you know that it won't mess you up
181265910Sae	--------------------------------------------------------------
182265910Sae	This assumes you are already running a 5.X system.  Replace
183265910Sae	${arch} with the architecture of your machine (e.g. "i386",
184265910Sae	"alpha", "amd64", "ia64", "pc98", "sparc64", etc).
185265910Sae
186265910Sae	cd src/sys/${arch}/conf
187265910Sae	config KERNEL_NAME_HERE
188265910Sae	cd ../compile/KERNEL_NAME_HERE
189265910Sae	make depend
190265910Sae	make
191265910Sae	make install
192265910Sae
193265910Sae	If this fails, go to the "To build a kernel" section.
194265910Sae
195265910Sae	To rebuild everything and install it on the current system.
196265910Sae	-----------------------------------------------------------
197265910Sae	# Note: sometimes if you are running current you gotta do more than
198177692Smarcel	# is listed here if you are upgrading from a really old current.
199177692Smarcel
200177692Smarcel	<make sure you have good level 0 dumps>
201177692Smarcel	make buildworld
202265910Sae	make kernel KERNCONF=YOUR_KERNEL_HERE
203218845Snyan							[1]
204177692Smarcel	<reboot in single user>				[3]
205177692Smarcel	mergemaster -p					[5]
206177692Smarcel	make installworld
207177692Smarcel	mergemaster					[4]
208265910Sae	<reboot>
209177692Smarcel
210177692Smarcel
211177692Smarcel	To cross-install current onto a separate partition
212184069Smarcel	--------------------------------------------------
213184069Smarcel	# In this approach we use a separate partition to hold
214177692Smarcel	# current's root, 'usr', and 'var' directories.   A partition
215177692Smarcel	# holding "/", "/usr" and "/var" should be about 2GB in
216177692Smarcel	# size.
217177692Smarcel
218177692Smarcel	<make sure you have good level 0 dumps>
219177692Smarcel	<boot into -stable>
220177692Smarcel	make buildworld
221177692Smarcel	make buildkernel KERNCONF=YOUR_KERNEL_HERE
222177692Smarcel	<maybe newfs current's root partition>
223218845Snyan	<mount current's root partition on directory ${CURRENT_ROOT}>
224218845Snyan	make installworld DESTDIR=${CURRENT_ROOT}
225218845Snyan	cd src/etc; make distribution DESTDIR=${CURRENT_ROOT} # if newfs'd
226218845Snyan	make installkernel KERNCONF=YOUR_KERNEL_HERE DESTDIR=${CURRENT_ROOT}
227218845Snyan	cp /etc/fstab ${CURRENT_ROOT}/etc/fstab 		   # if newfs'd
228218845Snyan	<edit ${CURRENT_ROOT}/etc/fstab to mount "/" from the correct partition>
229218845Snyan	<reboot into current>
230218845Snyan	<do a "native" rebuild/install as described in the previous section>
231218845Snyan	<maybe install compatibility libraries from src/lib/compat>
232218845Snyan 	<reboot>
233177692Smarcel
234177692Smarcel
235177692Smarcel	To upgrade in-place from 5.x-stable to current
236178180Smarcel	----------------------------------------------
237178180Smarcel	<make sure you have good level 0 dumps>
238178180Smarcel	make buildworld					[9]
239218558Snyan	make kernel KERNCONF=YOUR_KERNEL_HERE		[8]
240178180Smarcel							[1]
241218558Snyan	<reboot in single user>				[3]
242218558Snyan	mergemaster -p					[5]
243218558Snyan	make installworld
244178180Smarcel	mergemaster -i					[4]
245218558Snyan	<reboot>
246218558Snyan
247218558Snyan	Make sure that you've read the UPDATING file to understand the
248218558Snyan	tweaks to various things you need.  At this point in the life
249178180Smarcel	cycle of current, things change often and you are on your own
250178180Smarcel	to cope.  The defaults can also change, so please read ALL of
251178180Smarcel	the UPDATING entries.
252178180Smarcel
253177692Smarcel	Also, if you are tracking -current, you must be subscribed to
254177692Smarcel	freebsd-current@freebsd.org.  Make sure that before you update
255177692Smarcel	your sources that you have read and understood all the recent
256177692Smarcel	messages there.  If in doubt, please track -stable which has
257177692Smarcel	much fewer pitfalls.
258177692Smarcel
259218845Snyan	[1] If you have third party modules, such as vmware, you
260177692Smarcel	should disable them at this point so they don't crash your
261177692Smarcel	system on reboot.
262177692Smarcel
263177692Smarcel	[3] From the bootblocks, boot -s, and then do
264222281Sae		fsck -p
265222281Sae		mount -u /
266177692Smarcel		mount -a
267177692Smarcel		cd src
268254015Smarcel		adjkerntz -i		# if CMOS is wall time
269177692Smarcel	Also, when doing a major release upgrade, it is required that
270177692Smarcel	you boot into single user mode to do the installworld.
271177692Smarcel
272177692Smarcel	[4] Note: This step is non-optional.  Failure to do this step
273177692Smarcel	can result in a significant reduction in the functionality of the
274177692Smarcel	system.  Attempting to do it by hand is not recommended and those
275177692Smarcel	that pursue this avenue should read this file carefully, as well
276177692Smarcel	as the archives of freebsd-current and freebsd-hackers mailing lists
277177692Smarcel	for potential gotchas.
278177692Smarcel
279177692Smarcel	[5] Usually this step is a noop.  However, from time to time
280177692Smarcel	you may need to do this if you get unknown user in the following
281188429Simp	step.  It never hurts to do it all the time.  You may need to
282178444Smarcel	install a new mergemaster (cd src/usr.sbin/mergemaster && make
283178444Smarcel	install) after the buildworld before this step if you last updated
284178444Smarcel	from current before 20020224 or from -stable before 20020408.
285178444Smarcel
286183420Smarcel	[8] In order to have a kernel that can run the 4.x binaries
287178444Smarcel	needed to do an installworld, you must include the COMPAT_FREEBSD4
288178444Smarcel	option in your kernel.  Failure to do so may leave you with a system
289178444Smarcel	that is hard to boot to recover.
290183420Smarcel
291183420Smarcel	Make sure that you merge any new devices from GENERIC since the
292189616Snyan	last time you updated your kernel config file.
293183420Smarcel
294183420Smarcel	[9] When checking out sources, you must include the -P flag to have
295183420Smarcel	cvs prune empty directories.
296183420Smarcel
297183420Smarcel	If CPUTYPE is defined in your /etc/make.conf, make sure to use the
298179755Smarcel	"?=" instead of the "=" assignment operator, so that buildworld can
299179755Smarcel	override the CPUTYPE if it needs to.
300183420Smarcel
301183420Smarcel	MAKEOBJDIRPREFIX must be defined in an environment variable, and
302179755Smarcel	not on the command line, or in /etc/make.conf.  buildworld will
303267156Sae	warn if it is improperly defined.
304267156SaeFORMAT:
305267156Sae
306184069SmarcelThis file contains a list, in reverse chronological order, of major
307184069Smarcelbreakages in tracking -current.  Not all things will be listed here,
308184069Smarceland it only starts on October 16, 2004.  Updating files can found in
309184069Smarcelprevious releases if your system is older than this.
310184069Smarcel
311184069SmarcelCopyright information:
312184069Smarcel
313179755SmarcelCopyright 1998-2005 M. Warner Losh.  All Rights Reserved.
314178444Smarcel
315178444SmarcelRedistribution, publication, translation and use, with or without
316178444Smarcelmodification, in full or in part, in any form or format of this
317177692Smarceldocument are permitted without further permission from the author.
318177692Smarcel
319177692SmarcelTHIS DOCUMENT IS PROVIDED BY WARNER LOSH ``AS IS'' AND ANY EXPRESS OR
320177692SmarcelIMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
321177692SmarcelWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
322177692SmarcelDISCLAIMED.  IN NO EVENT SHALL WARNER LOSH BE LIABLE FOR ANY DIRECT,
323184069SmarcelINDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
324184069Smarcel(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
325177692SmarcelSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
326177692SmarcelHOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
327177692SmarcelSTRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
328177692SmarcelIN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
329177692SmarcelPOSSIBILITY OF SUCH DAMAGE.
330177692Smarcel
331177692SmarcelIf you find this document useful, and you want to, you may buy the
332218845Snyanauthor a beer.
333177692Smarcel
334218845SnyanContact Warner Losh if you have any questions about your use of
335218845Snyanthis document.
336218845Snyan
337218845Snyan$FreeBSD: head/UPDATING 146257 2005-05-16 05:37:32Z imp $
338218845Snyan