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