xref: /freebsd/UPDATING (revision fc18f73daf880e9e9cddf69a07ac56398d985bb1)
157199806SWarner LoshUpdating Information for FreeBSD current users
253dfde79SWarner Losh
3e72fd46aSWarner LoshThis file is maintained and copyrighted by M. Warner Losh
49698f2c0SWarner Losh<imp@village.org>.  See end of file for further details.  For commonly
59698f2c0SWarner Loshdone items, please see the COMMON ITEMS: section later in the file.
6e72fd46aSWarner Losh
72c724730SWarner LoshItems affecting the ports and packages system can be found in
82c724730SWarner Losh/usr/ports/UPDATING.  Please read that file before running
94f638121SWarner Loshportupgrade.
102c724730SWarner Losh
1199b22782SKen SmithNOTE TO PEOPLE WHO THINK THAT FreeBSD 7.x IS SLOW:
1299b22782SKen Smith	FreeBSD 7.x has many debugging features turned on, in
1369f7bcf3SWarner Losh	both the kernel and userland.  These features attempt to detect
1469f7bcf3SWarner Losh	incorrect use of system primitives, and encourage loud failure
1569f7bcf3SWarner Losh	through extra sanity checking and fail stop semantics.  They
1669f7bcf3SWarner Losh	also substantially impact system performance.  If you want to
1769f7bcf3SWarner Losh	do performance measurement, benchmarking, and optimization,
1869f7bcf3SWarner Losh	you'll want to turn them off.  This includes various WITNESS-
1969f7bcf3SWarner Losh	related kernel options, INVARIANTS, malloc debugging flags
2069f7bcf3SWarner Losh	in userland, and various verbose features in the kernel.  Many
2169f7bcf3SWarner Losh	developers choose to disable these features on build machines
22a19f8ddaSDavid E. O'Brien	to maximize performance.
23c1f61aa9SDavid E. O'Brien
24dc422d87SYaroslav Tykhiy20060201:
25dc422d87SYaroslav Tykhiy	The kernel ABI to file system modules was changed on i386.
26dc422d87SYaroslav Tykhiy	Please make sure that your kernel and modules are in sync.
27dc422d87SYaroslav Tykhiy
28347daa0fSJulian Elischer20060118:
29347daa0fSJulian Elischer	This actually occured some time ago, but installing the kernel
30347daa0fSJulian Elischer	now also installs a bunch of symbol files for the kernel modules.
316aa6311fSPav Lucistnik	This increases the size of /boot/kernel to about 67Mbytes. You
32347daa0fSJulian Elischer	will need twice this if you will eventually back this up to kernel.old
33347daa0fSJulian Elischer	on your next install.
34347daa0fSJulian Elischer	If you have a shortage of room in your root partition, you should add
35347daa0fSJulian Elischer	-DINSTALL_NODEBUG to your make arguments or add INSTALL_NODEBUG="yes"
36347daa0fSJulian Elischer	to your /etc/make.conf.
37347daa0fSJulian Elischer
38cc61a0b1SJason Evans20060113:
39cc61a0b1SJason Evans	libc's malloc implementation has been replaced.  This change has the
40cc61a0b1SJason Evans	potential to uncover application bugs that previously went unnoticed.
41cc61a0b1SJason Evans	See the malloc(3) manual page for more details.
42cc61a0b1SJason Evans
437f4faad8SGleb Smirnoff20060112:
447f4faad8SGleb Smirnoff	The generic netgraph(4) cookie has been changed. If you upgrade
457f4faad8SGleb Smirnoff	kernel passing this point, you also need to upgrade userland
467f4faad8SGleb Smirnoff	and netgraph(4) utilities like ports/net/mpd or ports/net/mpd4.
477f4faad8SGleb Smirnoff
486bed9d9eSJohn Baldwin20060106:
4990482dafSJohn Baldwin	si(4)'s device files now contain the unit number.
5090482dafSJohn Baldwin	Uses of {cua,tty}A[0-9a-f] should be replaced by {cua,tty}A0[0-9a-f].
5190482dafSJohn Baldwin
5290482dafSJohn Baldwin20060106:
536bed9d9eSJohn Baldwin	The kernel ABI was mostly destroyed due to a change in the size
546bed9d9eSJohn Baldwin	of struct lock_object which is nested in other structures such
556bed9d9eSJohn Baldwin	as mutexes which are nested in all sorts of other structures.
566bed9d9eSJohn Baldwin	Make sure your kernel and modules are in sync.
576bed9d9eSJohn Baldwin
5852a16db3SAlexander Leidinger20051231:
5952a16db3SAlexander Leidinger	The page coloring algorithm in the VM subsystem was converted
6052a16db3SAlexander Leidinger	from tuning with kernel options to autotuning. Please remove
6152a16db3SAlexander Leidinger	any PQ_* option except PQ_NOOPT from your kernel config.
6252a16db3SAlexander Leidinger
636dba929aSSam Leffler20051211:
646dba929aSSam Leffler	The net80211-related tools in the tools/tools/ath directory
656dba929aSSam Leffler	have been moved to tools/tools/net80211 and renamed with a
666dba929aSSam Leffler	"wlan" prefix.  Scripts that use them should be adjusted
676dba929aSSam Leffler	accordingly.
686dba929aSSam Leffler
69a0cdeaecSDoug Barton20051202:
70a0cdeaecSDoug Barton	Scripts in the local_startup directories (as defined in
71a0cdeaecSDoug Barton	/etc/defaults/rc.conf) that have the new rc.d semantics will
72a0cdeaecSDoug Barton	now be run as part of the base system rcorder. If there are
73a0cdeaecSDoug Barton	errors or problems with one of these local scripts, it could
74a0cdeaecSDoug Barton	cause boot problems. If you encounter such problems, boot in
75a0cdeaecSDoug Barton	single user mode, remove that script from the */rc.d directory.
76a0cdeaecSDoug Barton	Please report the problem to the port's maintainer, and the
77a0cdeaecSDoug Barton	freebsd-ports@freebsd.org mailing list.
78a0cdeaecSDoug Barton
79b090e4ceSGleb Smirnoff20051129:
80a358ddbbSCraig Rodrigues	The nodev mount option was deprecated in RELENG_6 (where it
81a358ddbbSCraig Rodrigues	was a no-op), and is now unsupported.  If you have nodev or dev listed
82a358ddbbSCraig Rodrigues	in /etc/fstab, remove it, otherwise it will result in a mount error.
83a358ddbbSCraig Rodrigues
84a358ddbbSCraig Rodrigues20051129:
85b090e4ceSGleb Smirnoff	ABI between ipfw(4) and ipfw(8) has been changed. You need
86b090e4ceSGleb Smirnoff	to rebuild ipfw(8) when rebuilding kernel.
87b090e4ceSGleb Smirnoff
88d6b4b3b3SDavid E. O'Brien20051108:
89d6b4b3b3SDavid E. O'Brien	rp(4)'s device files now contain the unit number.
90d6b4b3b3SDavid E. O'Brien	Uses of {cua,tty}R[0-9a-f] should be replaced by {cua,tty}R0[0-9a-f].
91d6b4b3b3SDavid E. O'Brien
92a52364d5SYaroslav Tykhiy20051029:
93a52364d5SYaroslav Tykhiy	/etc/rc.d/ppp-user has been renamed to /etc/rc.d/ppp.
94a52364d5SYaroslav Tykhiy	Its /etc/rc.conf.d configuration file has been `ppp' from
95a52364d5SYaroslav Tykhiy	the beginning, and hence there is no need to touch it.
96a52364d5SYaroslav Tykhiy
97fc18f73dSYaroslav Tykhiy20051014:
98fc18f73dSYaroslav Tykhiy	Now most modules get their build-time options from the kernel
99fc18f73dSYaroslav Tykhiy	configuration file.  A few modules still have fixed options
100fc18f73dSYaroslav Tykhiy	due to their non-conformant implementation, but they will be
101fc18f73dSYaroslav Tykhiy	corrected eventually.  You may need to review the options of
102fc18f73dSYaroslav Tykhiy	the modules in use, explicitly specify the non-default options
103fc18f73dSYaroslav Tykhiy	in the kernel configuration file, and rebuild the kernel and
104fc18f73dSYaroslav Tykhiy	modules afterwards.
105fc18f73dSYaroslav Tykhiy
106114d09d8SGleb Smirnoff20051001:
107114d09d8SGleb Smirnoff	kern.polling.enable sysctl MIB is now deprecated. Use ifconfig(8)
108114d09d8SGleb Smirnoff	to turn polling(4) on your interfaces.
109114d09d8SGleb Smirnoff
110b6de9e91SMax Laier20050927:
111b6de9e91SMax Laier	The old bridge(4) implementation was retired.  The new
112b6de9e91SMax Laier	if_bridge(4) serves as a full functional replacement.
113b6de9e91SMax Laier
114bb518265SHajimu UMEMOTO20050722:
115bb518265SHajimu UMEMOTO	The ai_addrlen of a struct addrinfo was changed to a socklen_t
116bb518265SHajimu UMEMOTO	to conform to POSIX-2001.  This change broke an ABI
117bb518265SHajimu UMEMOTO	compatibility on 64 bit architecture.  You have to recompile
118bb518265SHajimu UMEMOTO	userland programs that use getaddrinfo(3) on 64 bit
119bb518265SHajimu UMEMOTO	architecture.
120bb518265SHajimu UMEMOTO
12199b22782SKen Smith20050711:
12299b22782SKen Smith	RELENG_6 branched here.
12399b22782SKen Smith
1247657f595SBrooks Davis20050629:
1257657f595SBrooks Davis	The pccard_ifconfig rc.conf variable has been removed and a new
1267657f595SBrooks Davis	variable, ifconfig_DEFAULT has been introduced.  Unlike
1277657f595SBrooks Davis	pccard_ifconfig, ifconfig_DEFAULT applies to ALL interfaces that
1287657f595SBrooks Davis	do not have ifconfig_ifn entries rather than just those in
1297657f595SBrooks Davis	removable_interfaces.
1307657f595SBrooks Davis
131d33db00cSDag-Erling Smørgrav20050616:
132d33db00cSDag-Erling Smørgrav	Some previous versions of PAM have permitted the use of
133d33db00cSDag-Erling Smørgrav	non-absolute paths in /etc/pam.conf or /etc/pam.d/* when referring
134d33db00cSDag-Erling Smørgrav	to third party PAM modules in /usr/local/lib.  A change has been
135d33db00cSDag-Erling Smørgrav	made to require the use of absolute paths in order to avoid
136d33db00cSDag-Erling Smørgrav	ambiguity and dependence on library path configuration, which may
137d33db00cSDag-Erling Smørgrav	affect existing configurations.
138d33db00cSDag-Erling Smørgrav
139ad0fdce5SBrooks Davis20050610:
140ad0fdce5SBrooks Davis	Major changes to network interface API.  All drivers must be
141ad0fdce5SBrooks Davis	recompiled.  Drivers not in the base system will need to be
142ad0fdce5SBrooks Davis	updated to the new APIs.
143ad0fdce5SBrooks Davis
144038164a1SGarance A Drosehn20050609:
145038164a1SGarance A Drosehn	Changes were made to kinfo_proc in sys/user.h.  Please recompile
146038164a1SGarance A Drosehn	userland, or commands like `fstat', `pkill', `ps', `top' and `w'
147038164a1SGarance A Drosehn	will not behave correctly.
148038164a1SGarance A Drosehn
14931f91694SJoseph Koshy	The API and ABI for hwpmc(4) have changed with the addition
15031f91694SJoseph Koshy	of sampling support.  Please recompile lib/libpmc(3) and
15131f91694SJoseph Koshy	usr.sbin/{pmcstat,pmccontrol}.
15231f91694SJoseph Koshy
153a8d23252SBrooks Davis20050606:
154a8d23252SBrooks Davis	The OpenBSD dhclient was imported in place of the ISC dhclient
155a8d23252SBrooks Davis	and the network interface configuration scripts were updated
156a8d23252SBrooks Davis	accordingly.  If you use DHCP to configure your interfaces, you
157a8d23252SBrooks Davis	must now run devd.  Also, DNS updating was lost so you will need
158a8d23252SBrooks Davis	to find a workaround if you use this feature.
159a8d23252SBrooks Davis
160dfa58a49SAndrew Thompson20050605:
161dfa58a49SAndrew Thompson	if_bridge was added to the tree. This has changed struct ifnet.
162dfa58a49SAndrew Thompson	Please recompile userland and all network related modules.
163dfa58a49SAndrew Thompson
1642554b2d1SHajimu UMEMOTO20050603:
1652554b2d1SHajimu UMEMOTO	The n_net of a struct netent was changed to an uint32_t, and
1662554b2d1SHajimu UMEMOTO	1st argument of getnetbyaddr() was changed to an uint32_t, to
1671d6a063bSHajimu UMEMOTO	conform to POSIX-2001.  These changes broke an ABI
1680fe9e21bSHajimu UMEMOTO	compatibility on 64 bit architecture.  With these changes,
1690fe9e21bSHajimu UMEMOTO	shlib major of libpcap was bumped.  You have to recompile
1700fe9e21bSHajimu UMEMOTO	userland programs that use getnetbyaddr(3), getnetbyname(3),
1710fe9e21bSHajimu UMEMOTO	getnetent(3) and/or libpcap on 64 bit architecture.
1722554b2d1SHajimu UMEMOTO
1730a4c2543SGarance A Drosehn20050528:
1740a4c2543SGarance A Drosehn	Kernel parsing of extra options on '#!' first lines of shell
1750a4c2543SGarance A Drosehn	scripts has changed.  Lines with multiple options likely will
1760a4c2543SGarance A Drosehn	fail after this date.  For full details, please see
1770a4c2543SGarance A Drosehn		http://people.freebsd.org/~gad/Updating-20050528.txt
1780a4c2543SGarance A Drosehn
1796441fe95SMax Laier20050503:
1806441fe95SMax Laier	The packet filter (pf) code has been updated to OpenBSD 3.7
1816441fe95SMax Laier	Please note the changed anchor syntax and the fact that
1826441fe95SMax Laier	authpf(8) now needs a mounted fdescfs(5) to function.
1836441fe95SMax Laier
184cfdb76e5SScott Long20050415:
185cfdb76e5SScott Long	The NO_MIXED_MODE kernel option has been removed from the i386
186cfdb76e5SScott Long	amd64 platforms as its use has been superceded by the new local
187cfdb76e5SScott Long	APIC timer code.  Any kernel config files containing this option
188cfdb76e5SScott Long	should be updated.
189cfdb76e5SScott Long
1904bb8b8beSRuslan Ermilov20050227:
1914bb8b8beSRuslan Ermilov	The on-disk format of LC_CTYPE files was changed to be machine
1924bb8b8beSRuslan Ermilov	independent.  Please make sure NOT to use NO_CLEAN buildworld
19365f1be68SGleb Smirnoff	when crossing this point. Crossing this point also requires
19465f1be68SGleb Smirnoff	recompile or reinstall of all locale depended packages.
1954bb8b8beSRuslan Ermilov
196bc9d2991SBrooks Davis20050225:
197bc9d2991SBrooks Davis	The ifi_epoch member of struct if_data has been changed to
198bc9d2991SBrooks Davis	contain the uptime at which the interface was created or the
199bc9d2991SBrooks Davis	statistics zeroed rather then the wall clock time because
200bc9d2991SBrooks Davis	wallclock time may go backwards.  This should have no impact
201bc9d2991SBrooks Davis	unless an snmp implementation is using this value (I know of
202bc9d2991SBrooks Davis	none at this point.)
203bc9d2991SBrooks Davis
204915a554bSNate Lawson20050224:
205915a554bSNate Lawson	The acpi_perf and acpi_throttle drivers are now part of the
206915a554bSNate Lawson	acpi(4) main module.  They are no longer built separately.
207915a554bSNate Lawson
20810d6bd76SNate Lawson20050223:
20990dc539bSMaxim Sobolev	The layout of struct image_params has changed. You have to
21090dc539bSMaxim Sobolev	recompile all compatibility modules (linux, svr4, etc) for use
21190dc539bSMaxim Sobolev	with the new kernel.
21290dc539bSMaxim Sobolev
21390dc539bSMaxim Sobolev20050223:
21410d6bd76SNate Lawson	The p4tcc driver has been merged into cpufreq(4).  This makes
21510d6bd76SNate Lawson	"options CPU_ENABLE_TCC" obsolete.  Please load cpufreq.ko or
21610d6bd76SNate Lawson	compile in "device cpufreq" to restore this functionality.
21710d6bd76SNate Lawson
218aea80a64SXin LI20050220:
219aea80a64SXin LI	The responsibility of recomputing the file system summary of
220aea80a64SXin LI	a SoftUpdates-enabled dirty volume has been transferred to the
221aea80a64SXin LI	background fsck.  A rebuild of fsck(8) utility is recommended
222aea80a64SXin LI	if you have updated the kernel.
223aea80a64SXin LI
224aea80a64SXin LI	To get the old behavior (recompute file system summary at mount
225aea80a64SXin LI	time), you can set vfs.ffs.compute_summary_at_mount=1 before
226aea80a64SXin LI	mounting the new volume.
227aea80a64SXin LI
228da71ab85SGleb Smirnoff20050206:
229398dd94cSNate Lawson	The cpufreq import is complete.  As part of this, the sysctls for
230915a554bSNate Lawson	acpi(4) throttling have been removed.  The power_profile script
231398dd94cSNate Lawson	has been updated, so you can use performance/economy_cpu_freq in
232915a554bSNate Lawson	rc.conf(5) to set AC on/offline cpu frequencies.
233398dd94cSNate Lawson
234398dd94cSNate Lawson20050206:
235da71ab85SGleb Smirnoff	NG_VERSION has been increased. Recompiling kernel (or ng_socket.ko)
236da71ab85SGleb Smirnoff	requires recompiling libnetgraph and userland netgraph utilities.
2375ddd0622SBrooks Davis
2385ddd0622SBrooks Davis20050114:
2395ddd0622SBrooks Davis	Support for abbreviated forms of a number of ipfw options is
2405ddd0622SBrooks Davis	now deprecated.  Warnings are printed to stderr indicating the
2415ddd0622SBrooks Davis	correct full form when a match occurs.  Some abbreviations may
2425ddd0622SBrooks Davis	be supported at a later date based on user feedback.  To be
2435ddd0622SBrooks Davis	considered for support, abbreviations must be in use prior to
2445ddd0622SBrooks Davis	this commit and unlikely to be confused with current key words.
2455ddd0622SBrooks Davis
246b521988eSRuslan Ermilov20041221:
247b521988eSRuslan Ermilov	By a popular demand, a lot of NOFOO options were renamed
248b521988eSRuslan Ermilov	to NO_FOO (see bsd.compat.mk for a full list).  The old
249b521988eSRuslan Ermilov	spellings are still supported, but will cause annoying
250b521988eSRuslan Ermilov	warnings on stderr.  Make sure you upgrade properly (see
251b521988eSRuslan Ermilov	the COMMON ITEMS: section later in this file).
252b521988eSRuslan Ermilov
25387c9e370SSam Leffler20041219:
25487c9e370SSam Leffler	Auto-loading of ancillary wlan modules such as wlan_wep has
25587c9e370SSam Leffler	been temporarily disabled; you need to statically configure
25687c9e370SSam Leffler	the modules you need into your kernel or explicitly load them
25787c9e370SSam Leffler	prior to use.  Specifically, if you intend to use WEP encryption
25887c9e370SSam Leffler	with an 802.11 device load/configure wlan_wep; if you want to
25987c9e370SSam Leffler	use WPA with the ath driver load/configure wlan_tkip, wlan_ccmp,
26087c9e370SSam Leffler	and wlan_xauth as required.
26187c9e370SSam Leffler
26271c1c49aSBrian Somers20041213:
26371c1c49aSBrian Somers	The behaviour of ppp(8) has changed slightly.  If lqr is enabled
26471c1c49aSBrian Somers	(``enable lqr''), older versions would revert to LCP ECHO mode on
26571c1c49aSBrian Somers	negotiation failure.  Now, ``enable echo'' is required for this
26671c1c49aSBrian Somers	behaviour.  The ppp version number has been bumped to 3.4.2 to
26771c1c49aSBrian Somers	reflect the change.
26871c1c49aSBrian Somers
26988046524SSam Leffler20041201:
27088046524SSam Leffler	The wlan support has been updated to split the crypto support
27188046524SSam Leffler	into separate modules.  For static WEP you must configure the
27288046524SSam Leffler	wlan_wep module in your system or build and install the module
27388046524SSam Leffler	in place where it can be loaded (the kernel will auto-load
27488046524SSam Leffler	the module when a wep key is configured).
27588046524SSam Leffler
27688046524SSam Leffler20041201:
27788046524SSam Leffler	The ath driver has been updated to split the tx rate control
27888046524SSam Leffler	algorithm into a separate module.  You need to include either
27988046524SSam Leffler	ath_rate_onoe or ath_rate_amrr when configuring the kernel.
28088046524SSam Leffler
28181adddf3SJohn Baldwin20041116:
28281adddf3SJohn Baldwin	Support for systems with an 80386 CPU has been removed.  Please
28381adddf3SJohn Baldwin	use FreeBSD 5.x or earlier on systems with an 80386.
28481adddf3SJohn Baldwin
28542ba1c57SPoul-Henning Kamp20041110:
28642ba1c57SPoul-Henning Kamp	We have had a hack which would mount the root filesystem
28742ba1c57SPoul-Henning Kamp	R/W if the device were named 'md*'.  As part of the vnode
28842ba1c57SPoul-Henning Kamp	work I'm doing I have had to remove this hack.  People
28942ba1c57SPoul-Henning Kamp	building systems which use preloaded MD root filesystems
29042ba1c57SPoul-Henning Kamp	may need to insert a "/sbin/mount -u -o rw /dev/md0 /" in
29142ba1c57SPoul-Henning Kamp	their /etc/rc scripts.
29242ba1c57SPoul-Henning Kamp
293dcb5d8f8SRuslan Ermilov20041104:
294dcb5d8f8SRuslan Ermilov	FreeBSD 5.3 shipped here.
295dcb5d8f8SRuslan Ermilov
296c94c54e4SAndre Oppermann20041102:
297c94c54e4SAndre Oppermann	The size of struct tcpcb has changed again due to the removal
298c94c54e4SAndre Oppermann	of RFC1644 T/TCP.  You have to recompile userland programs that
299c94c54e4SAndre Oppermann	read kmem for tcp sockets directly (netstat, sockstat, etc.)
300c94c54e4SAndre Oppermann
301cd109b0dSAndre Oppermann20041022:
302cd109b0dSAndre Oppermann	The size of struct tcpcb has changed.  You have to recompile
303cd109b0dSAndre Oppermann	userland programs that read kmem for tcp sockets directly
304cd109b0dSAndre Oppermann	(netstat, sockstat, etc.)
305cd109b0dSAndre Oppermann
306b2723608SWarner Losh20041016:
307b2723608SWarner Losh	RELENG_5 branched here.  For older entries, please see updating
308b2723608SWarner Losh	in the RELENG_5 branch.
30957199806SWarner Losh
310dc0dbf5cSWarner LoshCOMMON ITEMS:
311dc0dbf5cSWarner Losh
312a24eff53SWarner Losh	General Notes
313a24eff53SWarner Losh	-------------
314a24eff53SWarner Losh	Avoid using make -j when upgrading.  From time to time in the
315a24eff53SWarner Losh	past there have been problems using -j with buildworld and/or
316a24eff53SWarner Losh	installworld.  This is especially true when upgrading between
317a24eff53SWarner Losh	"distant" versions (eg one that cross a major release boundary
318a24eff53SWarner Losh	or several minor releases, or when several months have passed
319a24eff53SWarner Losh	on the -current branch).
320a24eff53SWarner Losh
3215780f3baSWarner Losh	Sometimes, obscure build problems are the result of environment
3225780f3baSWarner Losh	poisoning.  This can happen because the make utility reads its
3235780f3baSWarner Losh	environment when searching for values for global variables.
3245780f3baSWarner Losh	To run your build attempts in an "environmental clean room",
3255780f3baSWarner Losh	prefix all make commands with 'env -i '.  See the env(1) manual
3265780f3baSWarner Losh	page for more details.
3275780f3baSWarner Losh
328081ff8acSDoug Barton	When upgrading from one major version to another it is generally
329081ff8acSDoug Barton	best to upgrade to the latest code in the currently installed branch
330081ff8acSDoug Barton	first, then do an upgrade to the new branch. This is the best-tested
331081ff8acSDoug Barton	upgrade path, and has the highest probability of being successful.
332081ff8acSDoug Barton	Please try this approach before reporting problems with a major
333081ff8acSDoug Barton	version upgrade.
334081ff8acSDoug Barton
335dc0dbf5cSWarner Losh	To build a kernel
336dc0dbf5cSWarner Losh	-----------------
337ba01eb20SWarner Losh	If you are updating from a prior version of FreeBSD (even one just
3381cf0ef11SDavid E. O'Brien	a few days old), you should follow this procedure.  It is the most
3391cf0ef11SDavid E. O'Brien	failsafe as it uses a /usr/obj tree with a fresh mini-buildworld,
3401cf0ef11SDavid E. O'Brien
3411cf0ef11SDavid E. O'Brien	make kernel-toolchain
342282e0f01SRuslan Ermilov	make -DALWAYS_CHECK_MAKE buildkernel KERNCONF=YOUR_KERNEL_HERE
343282e0f01SRuslan Ermilov	make -DALWAYS_CHECK_MAKE installkernel KERNCONF=YOUR_KERNEL_HERE
344dc0dbf5cSWarner Losh
3452e937dd6SAlexander Leidinger	To test a kernel once
3462e937dd6SAlexander Leidinger	---------------------
3472e937dd6SAlexander Leidinger	If you just want to boot a kernel once (because you are not sure
3482e937dd6SAlexander Leidinger	if it works, or if you want to boot a known bad kernel to provide
3492e937dd6SAlexander Leidinger	debugging information) run
3502e937dd6SAlexander Leidinger	make installkernel KERNCONF=YOUR_KERNEL_HERE KODIR=/boot/testkernel
3512e937dd6SAlexander Leidinger	nextboot -k testkernel
3522e937dd6SAlexander Leidinger
353ba01eb20SWarner Losh	To just build a kernel when you know that it won't mess you up
354ba01eb20SWarner Losh	--------------------------------------------------------------
3550fbd2da9SKen Smith	This assumes you are already running a 5.X system.  Replace
3560fbd2da9SKen Smith	${arch} with the architecture of your machine (e.g. "i386",
3570fbd2da9SKen Smith	"alpha", "amd64", "ia64", "pc98", "sparc64", etc).
3580fbd2da9SKen Smith
3590fbd2da9SKen Smith	cd src/sys/${arch}/conf
36047d0d01fSWarner Losh	config KERNEL_NAME_HERE
3610fbd2da9SKen Smith	cd ../compile/KERNEL_NAME_HERE
362ba01eb20SWarner Losh	make depend
363ba01eb20SWarner Losh	make
364ba01eb20SWarner Losh	make install
365ba01eb20SWarner Losh
366ba01eb20SWarner Losh	If this fails, go to the "To build a kernel" section.
367ba01eb20SWarner Losh
368ba01eb20SWarner Losh	To rebuild everything and install it on the current system.
369ba01eb20SWarner Losh	-----------------------------------------------------------
37063cb445eSWarner Losh	# Note: sometimes if you are running current you gotta do more than
37163cb445eSWarner Losh	# is listed here if you are upgrading from a really old current.
37263cb445eSWarner Losh
373f643de42SWarner Losh	<make sure you have good level 0 dumps>
37463cb445eSWarner Losh	make buildworld
3756586253aSWarner Losh	make kernel KERNCONF=YOUR_KERNEL_HERE
37663cb445eSWarner Losh							[1]
37763cb445eSWarner Losh	<reboot in single user>				[3]
37863cb445eSWarner Losh	mergemaster -p					[5]
37963cb445eSWarner Losh	make installworld
380e2a36081SAlexander Leidinger	make delete-old
38163cb445eSWarner Losh	mergemaster					[4]
38263cb445eSWarner Losh	<reboot>
38363cb445eSWarner Losh
384759f0aefSWarner Losh
385f27b1fceSJoseph Koshy	To cross-install current onto a separate partition
386f27b1fceSJoseph Koshy	--------------------------------------------------
387f27b1fceSJoseph Koshy	# In this approach we use a separate partition to hold
388f27b1fceSJoseph Koshy	# current's root, 'usr', and 'var' directories.   A partition
389f27b1fceSJoseph Koshy	# holding "/", "/usr" and "/var" should be about 2GB in
390f27b1fceSJoseph Koshy	# size.
391f27b1fceSJoseph Koshy
392f27b1fceSJoseph Koshy	<make sure you have good level 0 dumps>
393f27b1fceSJoseph Koshy	<boot into -stable>
394f27b1fceSJoseph Koshy	make buildworld
3953ecf3bddSRuslan Ermilov	make buildkernel KERNCONF=YOUR_KERNEL_HERE
396f27b1fceSJoseph Koshy	<maybe newfs current's root partition>
397f27b1fceSJoseph Koshy	<mount current's root partition on directory ${CURRENT_ROOT}>
398f27b1fceSJoseph Koshy	make installworld DESTDIR=${CURRENT_ROOT}
3996586253aSWarner Losh	cd src/etc; make distribution DESTDIR=${CURRENT_ROOT} # if newfs'd
4003ecf3bddSRuslan Ermilov	make installkernel KERNCONF=YOUR_KERNEL_HERE DESTDIR=${CURRENT_ROOT}
401f27b1fceSJoseph Koshy	cp /etc/fstab ${CURRENT_ROOT}/etc/fstab 		   # if newfs'd
402f27b1fceSJoseph Koshy	<edit ${CURRENT_ROOT}/etc/fstab to mount "/" from the correct partition>
403f27b1fceSJoseph Koshy	<reboot into current>
404f27b1fceSJoseph Koshy	<do a "native" rebuild/install as described in the previous section>
4056586253aSWarner Losh	<maybe install compatibility libraries from src/lib/compat>
406f27b1fceSJoseph Koshy 	<reboot>
407f27b1fceSJoseph Koshy
408f27b1fceSJoseph Koshy
4098ce4cbbfSWarner Losh	To upgrade in-place from 5.x-stable to current
410f27b1fceSJoseph Koshy	----------------------------------------------
411f643de42SWarner Losh	<make sure you have good level 0 dumps>
41221c075eaSWarner Losh	make buildworld					[9]
413e5dc5f61SWarner Losh	make kernel KERNCONF=YOUR_KERNEL_HERE		[8]
414fc8c157fSWarner Losh							[1]
415fc8c157fSWarner Losh	<reboot in single user>				[3]
416835284beSWarner Losh	mergemaster -p					[5]
417ba26da8eSWarner Losh	make installworld
418e2a36081SAlexander Leidinger	make delete-old
419802fc49dSBrian Feldman	mergemaster -i					[4]
420ba26da8eSWarner Losh	<reboot>
421ba26da8eSWarner Losh
422fdb9f54dSWarner Losh	Make sure that you've read the UPDATING file to understand the
423fdb9f54dSWarner Losh	tweaks to various things you need.  At this point in the life
424fdb9f54dSWarner Losh	cycle of current, things change often and you are on your own
425fdb9f54dSWarner Losh	to cope.  The defaults can also change, so please read ALL of
426fdb9f54dSWarner Losh	the UPDATING entries.
427ba26da8eSWarner Losh
4281dece4a9SWarner Losh	Also, if you are tracking -current, you must be subscribed to
4291dece4a9SWarner Losh	freebsd-current@freebsd.org.  Make sure that before you update
4301dece4a9SWarner Losh	your sources that you have read and understood all the recent
4311dece4a9SWarner Losh	messages there.  If in doubt, please track -stable which has
4321dece4a9SWarner Losh	much fewer pitfalls.
4331dece4a9SWarner Losh
434134d2e86SWarner Losh	[1] If you have third party modules, such as vmware, you
435134d2e86SWarner Losh	should disable them at this point so they don't crash your
436134d2e86SWarner Losh	system on reboot.
437134d2e86SWarner Losh
438ee6e1fc3SWarner Losh	[3] From the bootblocks, boot -s, and then do
439ee6e1fc3SWarner Losh		fsck -p
440ee6e1fc3SWarner Losh		mount -u /
441ee6e1fc3SWarner Losh		mount -a
4426586253aSWarner Losh		cd src
44347d0d01fSWarner Losh		adjkerntz -i		# if CMOS is wall time
444f6a0ef01SWarner Losh	Also, when doing a major release upgrade, it is required that
445f6a0ef01SWarner Losh	you boot into single user mode to do the installworld.
446ee6e1fc3SWarner Losh
447a6cd4f9dSWarner Losh	[4] Note: This step is non-optional.  Failure to do this step
448a6cd4f9dSWarner Losh	can result in a significant reduction in the functionality of the
449a6cd4f9dSWarner Losh	system.  Attempting to do it by hand is not recommended and those
450a6cd4f9dSWarner Losh	that pursue this avenue should read this file carefully, as well
451a6cd4f9dSWarner Losh	as the archives of freebsd-current and freebsd-hackers mailing lists
452a6cd4f9dSWarner Losh	for potential gotchas.
453a6cd4f9dSWarner Losh
454835284beSWarner Losh	[5] Usually this step is a noop.  However, from time to time
455835284beSWarner Losh	you may need to do this if you get unknown user in the following
456835284beSWarner Losh	step.  It never hurts to do it all the time.  You may need to
457835284beSWarner Losh	install a new mergemaster (cd src/usr.sbin/mergemaster && make
458835284beSWarner Losh	install) after the buildworld before this step if you last updated
459835284beSWarner Losh	from current before 20020224 or from -stable before 20020408.
460835284beSWarner Losh
461c74fe6afSWarner Losh	[8] In order to have a kernel that can run the 4.x binaries
462c74fe6afSWarner Losh	needed to do an installworld, you must include the COMPAT_FREEBSD4
463c74fe6afSWarner Losh	option in your kernel.  Failure to do so may leave you with a system
46465f1be68SGleb Smirnoff	that is hard to boot to recover. A similar kernel option COMPAT_FREEBSD5
46565f1be68SGleb Smirnoff	is required to run the 5.x binaries on more recent kernels.
466c74fe6afSWarner Losh
467e5dc5f61SWarner Losh	Make sure that you merge any new devices from GENERIC since the
468e5dc5f61SWarner Losh	last time you updated your kernel config file.
469e5dc5f61SWarner Losh
47021c075eaSWarner Losh	[9] When checking out sources, you must include the -P flag to have
471e5dc5f61SWarner Losh	cvs prune empty directories.
472e5dc5f61SWarner Losh
473e5dc5f61SWarner Losh	If CPUTYPE is defined in your /etc/make.conf, make sure to use the
474e5dc5f61SWarner Losh	"?=" instead of the "=" assignment operator, so that buildworld can
475e5dc5f61SWarner Losh	override the CPUTYPE if it needs to.
476e5dc5f61SWarner Losh
477e5dc5f61SWarner Losh	MAKEOBJDIRPREFIX must be defined in an environment variable, and
478e5dc5f61SWarner Losh	not on the command line, or in /etc/make.conf.  buildworld will
479e5dc5f61SWarner Losh	warn if it is improperly defined.
480dc0dbf5cSWarner LoshFORMAT:
481dc0dbf5cSWarner Losh
482f699bbbbSMark OvensThis file contains a list, in reverse chronological order, of major
4831fc1a0dcSWarner Loshbreakages in tracking -current.  Not all things will be listed here,
4848ce4cbbfSWarner Loshand it only starts on October 16, 2004.  Updating files can found in
485f8ab1dd6SWarner Loshprevious releases if your system is older than this.
4861fc1a0dcSWarner Losh
487e72fd46aSWarner LoshCopyright information:
488e72fd46aSWarner Losh
4898ce4cbbfSWarner LoshCopyright 1998-2005 M. Warner Losh.  All Rights Reserved.
490e72fd46aSWarner Losh
491772730c7SWarner LoshRedistribution, publication, translation and use, with or without
492772730c7SWarner Loshmodification, in full or in part, in any form or format of this
4939698f2c0SWarner Loshdocument are permitted without further permission from the author.
494e72fd46aSWarner Losh
495e72fd46aSWarner LoshTHIS DOCUMENT IS PROVIDED BY WARNER LOSH ``AS IS'' AND ANY EXPRESS OR
496e72fd46aSWarner LoshIMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
497e72fd46aSWarner LoshWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
498e72fd46aSWarner LoshDISCLAIMED.  IN NO EVENT SHALL WARNER LOSH BE LIABLE FOR ANY DIRECT,
499e72fd46aSWarner LoshINDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
500e72fd46aSWarner Losh(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
501e72fd46aSWarner LoshSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
502e72fd46aSWarner LoshHOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
503e72fd46aSWarner LoshSTRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
504e72fd46aSWarner LoshIN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
505e72fd46aSWarner LoshPOSSIBILITY OF SUCH DAMAGE.
506e72fd46aSWarner Losh
507e72fd46aSWarner LoshIf you find this document useful, and you want to, you may buy the
508e72fd46aSWarner Loshauthor a beer.
509e72fd46aSWarner Losh
51022306abcSWarner LoshContact Warner Losh if you have any questions about your use of
511772730c7SWarner Loshthis document.
512772730c7SWarner Losh
51397d92980SPeter Wemm$FreeBSD$
514