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