UPDATING revision 147267
157416SmarkmUpdating Information for FreeBSD current users
257416Smarkm
357416SmarkmThis file is maintained and copyrighted by M. Warner Losh
457416Smarkm<imp@village.org>.  See end of file for further details.  For commonly
557416Smarkmdone items, please see the COMMON ITEMS: section later in the file.
657416Smarkm
757416SmarkmItems affecting the ports and packages system can be found in
857416Smarkm/usr/ports/UPDATING.  Please read that file before running
957416Smarkmportupgrade.
1057416Smarkm
1157416SmarkmNOTE TO PEOPLE WHO THINK THAT FreeBSD 6.x IS SLOW:
1257416Smarkm	FreeBSD 6.x has many debugging features turned on, in
1357416Smarkm	both the kernel and userland.  These features attempt to detect
1457416Smarkm	incorrect use of system primitives, and encourage loud failure
1557416Smarkm	through extra sanity checking and fail stop semantics.  They
1657416Smarkm	also substantially impact system performance.  If you want to
1757416Smarkm	do performance measurement, benchmarking, and optimization,
1857416Smarkm	you'll want to turn them off.  This includes various WITNESS-
1957416Smarkm	related kernel options, INVARIANTS, malloc debugging flags
2057416Smarkm	in userland, and various verbose features in the kernel.  Many
2157416Smarkm	developers choose to disable these features on build machines
2257416Smarkm	to maximize performance.
2357416Smarkm
2457416Smarkm20050610:
2557416Smarkm	Major changes to network interface API.  All drivers must be
2657416Smarkm	recompiled.  Drivers not in the base system will need to be
2757416Smarkm	updated to the new APIs.
2857416Smarkm
2957416Smarkm20050609:
3057416Smarkm	Changes were made to kinfo_proc in sys/user.h.  Please recompile
3157416Smarkm	userland, or commands like `fstat', `pkill', `ps', `top' and `w'
3257416Smarkm	will not behave correctly.
3357416Smarkm
3457416Smarkm	The API and ABI for hwpmc(4) have changed with the addition
3557416Smarkm	of sampling support.  Please recompile lib/libpmc(3) and
3657416Smarkm	usr.sbin/{pmcstat,pmccontrol}.
3757416Smarkm
3857416Smarkm20050606:
3957416Smarkm	The OpenBSD dhclient was imported in place of the ISC dhclient
4057416Smarkm	and the network interface configuration scripts were updated
4157416Smarkm	accordingly.  If you use DHCP to configure your interfaces, you
4257416Smarkm	must now run devd.  Also, DNS updating was lost so you will need
4357416Smarkm	to find a workaround if you use this feature.
4457416Smarkm
4557416Smarkm20050605:
4657416Smarkm	if_bridge was added to the tree. This has changed struct ifnet.
4757416Smarkm	Please recompile userland and all network related modules.
4857416Smarkm
4957416Smarkm20050603:
5057416Smarkm	The n_net of a struct netent was changed to an uint32_t, and
5157416Smarkm	1st argument of getnetbyaddr() was changed to an uint32_t, to
5257416Smarkm	conform to POSIX-2001.  These changes broke an ABI
5357416Smarkm	compatibility on 64 bit architecture.  With these changes,
5457416Smarkm	shlib major of libpcap was bumped.  You have to recompile
5557416Smarkm	userland programs that use getnetbyaddr(3), getnetbyname(3),
5657416Smarkm	getnetent(3) and/or libpcap on 64 bit architecture.
5757416Smarkm
5857416Smarkm20050528:
5957416Smarkm	Kernel parsing of extra options on '#!' first lines of shell
6057416Smarkm	scripts has changed.  Lines with multiple options likely will
6157416Smarkm	fail after this date.  For full details, please see
6257416Smarkm		http://people.freebsd.org/~gad/Updating-20050528.txt
6357416Smarkm
6457416Smarkm20050503:
6557416Smarkm	The packet filter (pf) code has been updated to OpenBSD 3.7
6657416Smarkm	Please note the changed anchor syntax and the fact that
6757416Smarkm	authpf(8) now needs a mounted fdescfs(5) to function.
6857416Smarkm
6957416Smarkm20050415:
7057416Smarkm	The NO_MIXED_MODE kernel option has been removed from the i386
7157416Smarkm	amd64 platforms as its use has been superceded by the new local
7257416Smarkm	APIC timer code.  Any kernel config files containing this option
7357416Smarkm	should be updated.
7457416Smarkm
7557416Smarkm20050227:
7657416Smarkm	The on-disk format of LC_CTYPE files was changed to be machine
7757416Smarkm	independent.  Please make sure NOT to use NO_CLEAN buildworld
7857416Smarkm	when crossing this point.
7957416Smarkm
8057416Smarkm20050225:
8157416Smarkm	The ifi_epoch member of struct if_data has been changed to
8257416Smarkm	contain the uptime at which the interface was created or the
8357416Smarkm	statistics zeroed rather then the wall clock time because
8457416Smarkm	wallclock time may go backwards.  This should have no impact
8557416Smarkm	unless an snmp implementation is using this value (I know of
8657416Smarkm	none at this point.)
8757416Smarkm
8857416Smarkm20050224:
8957416Smarkm	The acpi_perf and acpi_throttle drivers are now part of the
9057416Smarkm	acpi(4) main module.  They are no longer built separately.
9157416Smarkm
9257416Smarkm20050223:
9357416Smarkm	The layout of struct image_params has changed. You have to
9457416Smarkm	recompile all compatibility modules (linux, svr4, etc) for use
9557416Smarkm	with the new kernel.
9657416Smarkm
9757416Smarkm20050223:
9857416Smarkm	The p4tcc driver has been merged into cpufreq(4).  This makes
9957416Smarkm	"options CPU_ENABLE_TCC" obsolete.  Please load cpufreq.ko or
10057416Smarkm	compile in "device cpufreq" to restore this functionality.
10157416Smarkm
10257416Smarkm20050220:
10357416Smarkm	The responsibility of recomputing the file system summary of
10457416Smarkm	a SoftUpdates-enabled dirty volume has been transferred to the
10557416Smarkm	background fsck.  A rebuild of fsck(8) utility is recommended
10657416Smarkm	if you have updated the kernel.
10757416Smarkm
10857416Smarkm	To get the old behavior (recompute file system summary at mount
10957416Smarkm	time), you can set vfs.ffs.compute_summary_at_mount=1 before
11057416Smarkm	mounting the new volume.
11157416Smarkm
11257416Smarkm20050206:
11357416Smarkm	The cpufreq import is complete.  As part of this, the sysctls for
11457416Smarkm	acpi(4) throttling have been removed.  The power_profile script
11557416Smarkm	has been updated, so you can use performance/economy_cpu_freq in
11657416Smarkm	rc.conf(5) to set AC on/offline cpu frequencies.
11757416Smarkm
11857416Smarkm20050206:
11957416Smarkm	NG_VERSION has been increased. Recompiling kernel (or ng_socket.ko)
12057416Smarkm	requires recompiling libnetgraph and userland netgraph utilities.
12157416Smarkm
12257416Smarkm20050114:
12357416Smarkm	Support for abbreviated forms of a number of ipfw options is
12457416Smarkm	now deprecated.  Warnings are printed to stderr indicating the
12557416Smarkm	correct full form when a match occurs.  Some abbreviations may
12657416Smarkm	be supported at a later date based on user feedback.  To be
12757416Smarkm	considered for support, abbreviations must be in use prior to
12857416Smarkm	this commit and unlikely to be confused with current key words.
12957416Smarkm
13057416Smarkm20041221:
13157416Smarkm	By a popular demand, a lot of NOFOO options were renamed
13257416Smarkm	to NO_FOO (see bsd.compat.mk for a full list).  The old
13357416Smarkm	spellings are still supported, but will cause annoying
13457416Smarkm	warnings on stderr.  Make sure you upgrade properly (see
13557416Smarkm	the COMMON ITEMS: section later in this file).
13657416Smarkm
13757416Smarkm20041219:
13857416Smarkm	Auto-loading of ancillary wlan modules such as wlan_wep has
13957416Smarkm	been temporarily disabled; you need to statically configure
14057416Smarkm	the modules you need into your kernel or explicitly load them
14157416Smarkm	prior to use.  Specifically, if you intend to use WEP encryption
14257416Smarkm	with an 802.11 device load/configure wlan_wep; if you want to
14357416Smarkm	use WPA with the ath driver load/configure wlan_tkip, wlan_ccmp,
14457416Smarkm	and wlan_xauth as required.
14557416Smarkm
14657416Smarkm20041213:
14757416Smarkm	The behaviour of ppp(8) has changed slightly.  If lqr is enabled
14857416Smarkm	(``enable lqr''), older versions would revert to LCP ECHO mode on
14957416Smarkm	negotiation failure.  Now, ``enable echo'' is required for this
15057416Smarkm	behaviour.  The ppp version number has been bumped to 3.4.2 to
15157416Smarkm	reflect the change.
15257416Smarkm
15357416Smarkm20041201:
15457416Smarkm	The wlan support has been updated to split the crypto support
15557416Smarkm	into separate modules.  For static WEP you must configure the
15657416Smarkm	wlan_wep module in your system or build and install the module
15757416Smarkm	in place where it can be loaded (the kernel will auto-load
15857416Smarkm	the module when a wep key is configured).
15957416Smarkm
16057416Smarkm20041201:
16157416Smarkm	The ath driver has been updated to split the tx rate control
16257416Smarkm	algorithm into a separate module.  You need to include either
16357416Smarkm	ath_rate_onoe or ath_rate_amrr when configuring the kernel.
16457416Smarkm
16557416Smarkm20041116:
16657416Smarkm	Support for systems with an 80386 CPU has been removed.  Please
16757416Smarkm	use FreeBSD 5.x or earlier on systems with an 80386.
16857416Smarkm
16957416Smarkm20041110:
17057416Smarkm	We have had a hack which would mount the root filesystem
17157416Smarkm	R/W if the device were named 'md*'.  As part of the vnode
17257416Smarkm	work I'm doing I have had to remove this hack.  People
17357416Smarkm	building systems which use preloaded MD root filesystems
17457416Smarkm	may need to insert a "/sbin/mount -u -o rw /dev/md0 /" in
17557416Smarkm	their /etc/rc scripts.
17657416Smarkm
17757416Smarkm20041104:
17857416Smarkm	FreeBSD 5.3 shipped here.
17957416Smarkm
18057416Smarkm20041102:
18157416Smarkm	The size of struct tcpcb has changed again due to the removal
18257416Smarkm	of RFC1644 T/TCP.  You have to recompile userland programs that
18357416Smarkm	read kmem for tcp sockets directly (netstat, sockstat, etc.)
18457416Smarkm
18557416Smarkm20041022:
18657416Smarkm	The size of struct tcpcb has changed.  You have to recompile
18757416Smarkm	userland programs that read kmem for tcp sockets directly
18857416Smarkm	(netstat, sockstat, etc.)
18957416Smarkm
19057416Smarkm20041016:
19157416Smarkm	RELENG_5 branched here.  For older entries, please see updating
19257416Smarkm	in the RELENG_5 branch.
19357416Smarkm
19457416SmarkmCOMMON ITEMS:
19557416Smarkm
19657416Smarkm	General Notes
19757416Smarkm	-------------
19857416Smarkm	Avoid using make -j when upgrading.  From time to time in the
19957416Smarkm	past there have been problems using -j with buildworld and/or
20057416Smarkm	installworld.  This is especially true when upgrading between
20157416Smarkm	"distant" versions (eg one that cross a major release boundary
20257416Smarkm	or several minor releases, or when several months have passed
20357416Smarkm	on the -current branch).
20457416Smarkm
20557416Smarkm	Sometimes, obscure build problems are the result of environment
20657416Smarkm	poisoning.  This can happen because the make utility reads its
20757416Smarkm	environment when searching for values for global variables.
20857416Smarkm	To run your build attempts in an "environmental clean room",
20957416Smarkm	prefix all make commands with 'env -i '.  See the env(1) manual
21057416Smarkm	page for more details.
21157416Smarkm
21257416Smarkm	To build a kernel
21357416Smarkm	-----------------
21457416Smarkm	If you are updating from a prior version of FreeBSD (even one just
21557416Smarkm	a few days old), you should follow this procedure. With a
21657416Smarkm	/usr/obj tree with a fresh buildworld,
21757416Smarkm	make -DALWAYS_CHECK_MAKE buildkernel KERNCONF=YOUR_KERNEL_HERE
21857416Smarkm	make -DALWAYS_CHECK_MAKE installkernel KERNCONF=YOUR_KERNEL_HERE
21957416Smarkm
22057416Smarkm	To test a kernel once
22157416Smarkm	---------------------
22257416Smarkm	If you just want to boot a kernel once (because you are not sure
22357416Smarkm	if it works, or if you want to boot a known bad kernel to provide
22457416Smarkm	debugging information) run
22557416Smarkm	make installkernel KERNCONF=YOUR_KERNEL_HERE KODIR=/boot/testkernel
22657416Smarkm	nextboot -k testkernel
22757416Smarkm
22857416Smarkm	To just build a kernel when you know that it won't mess you up
22957416Smarkm	--------------------------------------------------------------
23057416Smarkm	This assumes you are already running a 5.X system.  Replace
23157416Smarkm	${arch} with the architecture of your machine (e.g. "i386",
23257416Smarkm	"alpha", "amd64", "ia64", "pc98", "sparc64", etc).
23357416Smarkm
23457416Smarkm	cd src/sys/${arch}/conf
23557416Smarkm	config KERNEL_NAME_HERE
23657416Smarkm	cd ../compile/KERNEL_NAME_HERE
23757416Smarkm	make depend
23857416Smarkm	make
23957416Smarkm	make install
24057416Smarkm
24157416Smarkm	If this fails, go to the "To build a kernel" section.
24257416Smarkm
24357416Smarkm	To rebuild everything and install it on the current system.
24457416Smarkm	-----------------------------------------------------------
24557416Smarkm	# Note: sometimes if you are running current you gotta do more than
24657416Smarkm	# is listed here if you are upgrading from a really old current.
24757416Smarkm
24857416Smarkm	<make sure you have good level 0 dumps>
24957416Smarkm	make buildworld
25057416Smarkm	make kernel KERNCONF=YOUR_KERNEL_HERE
25157416Smarkm							[1]
25257416Smarkm	<reboot in single user>				[3]
25357416Smarkm	mergemaster -p					[5]
25457416Smarkm	make installworld
25557416Smarkm	mergemaster					[4]
25657416Smarkm	<reboot>
25757416Smarkm
25857416Smarkm
25957416Smarkm	To cross-install current onto a separate partition
26057416Smarkm	--------------------------------------------------
26157416Smarkm	# In this approach we use a separate partition to hold
26257416Smarkm	# current's root, 'usr', and 'var' directories.   A partition
26357416Smarkm	# holding "/", "/usr" and "/var" should be about 2GB in
26457416Smarkm	# size.
26557416Smarkm
26657416Smarkm	<make sure you have good level 0 dumps>
26757416Smarkm	<boot into -stable>
26857416Smarkm	make buildworld
26957416Smarkm	make buildkernel KERNCONF=YOUR_KERNEL_HERE
27057416Smarkm	<maybe newfs current's root partition>
27157416Smarkm	<mount current's root partition on directory ${CURRENT_ROOT}>
27257416Smarkm	make installworld DESTDIR=${CURRENT_ROOT}
27357416Smarkm	cd src/etc; make distribution DESTDIR=${CURRENT_ROOT} # if newfs'd
27457416Smarkm	make installkernel KERNCONF=YOUR_KERNEL_HERE DESTDIR=${CURRENT_ROOT}
27557416Smarkm	cp /etc/fstab ${CURRENT_ROOT}/etc/fstab 		   # if newfs'd
27657416Smarkm	<edit ${CURRENT_ROOT}/etc/fstab to mount "/" from the correct partition>
27757416Smarkm	<reboot into current>
27857416Smarkm	<do a "native" rebuild/install as described in the previous section>
27957416Smarkm	<maybe install compatibility libraries from src/lib/compat>
28057416Smarkm 	<reboot>
28157416Smarkm
28257416Smarkm
28357416Smarkm	To upgrade in-place from 5.x-stable to current
28457416Smarkm	----------------------------------------------
28557416Smarkm	<make sure you have good level 0 dumps>
28657416Smarkm	make buildworld					[9]
28757416Smarkm	make kernel KERNCONF=YOUR_KERNEL_HERE		[8]
28857416Smarkm							[1]
28957416Smarkm	<reboot in single user>				[3]
29057416Smarkm	mergemaster -p					[5]
29157416Smarkm	make installworld
29257416Smarkm	mergemaster -i					[4]
29357416Smarkm	<reboot>
29457416Smarkm
29557416Smarkm	Make sure that you've read the UPDATING file to understand the
29657416Smarkm	tweaks to various things you need.  At this point in the life
29757416Smarkm	cycle of current, things change often and you are on your own
29857416Smarkm	to cope.  The defaults can also change, so please read ALL of
29957416Smarkm	the UPDATING entries.
30057416Smarkm
30157416Smarkm	Also, if you are tracking -current, you must be subscribed to
30257416Smarkm	freebsd-current@freebsd.org.  Make sure that before you update
30357416Smarkm	your sources that you have read and understood all the recent
30457416Smarkm	messages there.  If in doubt, please track -stable which has
30557416Smarkm	much fewer pitfalls.
30657416Smarkm
30757416Smarkm	[1] If you have third party modules, such as vmware, you
30857416Smarkm	should disable them at this point so they don't crash your
30957416Smarkm	system on reboot.
31057416Smarkm
31157416Smarkm	[3] From the bootblocks, boot -s, and then do
31257416Smarkm		fsck -p
31357416Smarkm		mount -u /
31457416Smarkm		mount -a
31557416Smarkm		cd src
31657416Smarkm		adjkerntz -i		# if CMOS is wall time
31757416Smarkm	Also, when doing a major release upgrade, it is required that
31857416Smarkm	you boot into single user mode to do the installworld.
31957416Smarkm
32057416Smarkm	[4] Note: This step is non-optional.  Failure to do this step
32157416Smarkm	can result in a significant reduction in the functionality of the
32257416Smarkm	system.  Attempting to do it by hand is not recommended and those
32357416Smarkm	that pursue this avenue should read this file carefully, as well
32457416Smarkm	as the archives of freebsd-current and freebsd-hackers mailing lists
32557416Smarkm	for potential gotchas.
32657416Smarkm
32757416Smarkm	[5] Usually this step is a noop.  However, from time to time
32857416Smarkm	you may need to do this if you get unknown user in the following
32957416Smarkm	step.  It never hurts to do it all the time.  You may need to
33057416Smarkm	install a new mergemaster (cd src/usr.sbin/mergemaster && make
33157416Smarkm	install) after the buildworld before this step if you last updated
33257416Smarkm	from current before 20020224 or from -stable before 20020408.
33357416Smarkm
33457416Smarkm	[8] In order to have a kernel that can run the 4.x binaries
33557416Smarkm	needed to do an installworld, you must include the COMPAT_FREEBSD4
33657416Smarkm	option in your kernel.  Failure to do so may leave you with a system
33757416Smarkm	that is hard to boot to recover.
33857416Smarkm
33957416Smarkm	Make sure that you merge any new devices from GENERIC since the
34057416Smarkm	last time you updated your kernel config file.
34157416Smarkm
34257416Smarkm	[9] When checking out sources, you must include the -P flag to have
34357416Smarkm	cvs prune empty directories.
34457416Smarkm
34557416Smarkm	If CPUTYPE is defined in your /etc/make.conf, make sure to use the
34657416Smarkm	"?=" instead of the "=" assignment operator, so that buildworld can
34757416Smarkm	override the CPUTYPE if it needs to.
34857416Smarkm
34957416Smarkm	MAKEOBJDIRPREFIX must be defined in an environment variable, and
35057416Smarkm	not on the command line, or in /etc/make.conf.  buildworld will
35157416Smarkm	warn if it is improperly defined.
35257416SmarkmFORMAT:
35357416Smarkm
35457416SmarkmThis file contains a list, in reverse chronological order, of major
35557416Smarkmbreakages in tracking -current.  Not all things will be listed here,
35657416Smarkmand it only starts on October 16, 2004.  Updating files can found in
35757416Smarkmprevious releases if your system is older than this.
35857416Smarkm
35957416SmarkmCopyright information:
36057416Smarkm
36157416SmarkmCopyright 1998-2005 M. Warner Losh.  All Rights Reserved.
36257416Smarkm
36357416SmarkmRedistribution, publication, translation and use, with or without
36457416Smarkmmodification, in full or in part, in any form or format of this
36557416Smarkmdocument are permitted without further permission from the author.
36657416Smarkm
36757416SmarkmTHIS DOCUMENT IS PROVIDED BY WARNER LOSH ``AS IS'' AND ANY EXPRESS OR
36857416SmarkmIMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
36957416SmarkmWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
37057416SmarkmDISCLAIMED.  IN NO EVENT SHALL WARNER LOSH BE LIABLE FOR ANY DIRECT,
37157416SmarkmINDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
37257416Smarkm(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
37357416SmarkmSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
37457416SmarkmHOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
37557416SmarkmSTRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
37657416SmarkmIN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37757416SmarkmPOSSIBILITY OF SUCH DAMAGE.
37857416Smarkm
37957416SmarkmIf you find this document useful, and you want to, you may buy the
38057416Smarkmauthor a beer.
38157416Smarkm
38257416SmarkmContact Warner Losh if you have any questions about your use of
38357416Smarkmthis document.
38457416Smarkm
38557416Smarkm$FreeBSD: head/UPDATING 147267 2005-06-10 19:59:26Z jkoshy $
38657416Smarkm