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. It is the most 241 failsafe as it uses a /usr/obj tree with a fresh mini-buildworld, 242 243 make kernel-toolchain 244 make -DALWAYS_CHECK_MAKE buildkernel KERNCONF=YOUR_KERNEL_HERE 245 make -DALWAYS_CHECK_MAKE installkernel KERNCONF=YOUR_KERNEL_HERE 246 247 To test a kernel once 248 --------------------- 249 If you just want to boot a kernel once (because you are not sure 250 if it works, or if you want to boot a known bad kernel to provide 251 debugging information) run 252 make installkernel KERNCONF=YOUR_KERNEL_HERE KODIR=/boot/testkernel 253 nextboot -k testkernel 254 255 To just build a kernel when you know that it won't mess you up 256 -------------------------------------------------------------- 257 This assumes you are already running a 5.X system. Replace 258 ${arch} with the architecture of your machine (e.g. "i386", 259 "alpha", "amd64", "ia64", "pc98", "sparc64", etc). 260 261 cd src/sys/${arch}/conf 262 config KERNEL_NAME_HERE 263 cd ../compile/KERNEL_NAME_HERE 264 make depend 265 make 266 make install 267 268 If this fails, go to the "To build a kernel" section. 269 270 To rebuild everything and install it on the current system. 271 ----------------------------------------------------------- 272 # Note: sometimes if you are running current you gotta do more than 273 # is listed here if you are upgrading from a really old current. 274 275 <make sure you have good level 0 dumps> 276 make buildworld 277 make kernel KERNCONF=YOUR_KERNEL_HERE 278 [1] 279 <reboot in single user> [3] 280 mergemaster -p [5] 281 make installworld 282 make delete-old 283 mergemaster [4] 284 <reboot> 285 286 287 To cross-install current onto a separate partition 288 -------------------------------------------------- 289 # In this approach we use a separate partition to hold 290 # current's root, 'usr', and 'var' directories. A partition 291 # holding "/", "/usr" and "/var" should be about 2GB in 292 # size. 293 294 <make sure you have good level 0 dumps> 295 <boot into -stable> 296 make buildworld 297 make buildkernel KERNCONF=YOUR_KERNEL_HERE 298 <maybe newfs current's root partition> 299 <mount current's root partition on directory ${CURRENT_ROOT}> 300 make installworld DESTDIR=${CURRENT_ROOT} 301 cd src/etc; make distribution DESTDIR=${CURRENT_ROOT} # if newfs'd 302 make installkernel KERNCONF=YOUR_KERNEL_HERE DESTDIR=${CURRENT_ROOT} 303 cp /etc/fstab ${CURRENT_ROOT}/etc/fstab # if newfs'd 304 <edit ${CURRENT_ROOT}/etc/fstab to mount "/" from the correct partition> 305 <reboot into current> 306 <do a "native" rebuild/install as described in the previous section> 307 <maybe install compatibility libraries from src/lib/compat> 308 <reboot> 309 310 311 To upgrade in-place from 5.x-stable to current 312 ---------------------------------------------- 313 <make sure you have good level 0 dumps> 314 make buildworld [9] 315 make kernel KERNCONF=YOUR_KERNEL_HERE [8] 316 [1] 317 <reboot in single user> [3] 318 mergemaster -p [5] 319 make installworld 320 make delete-old 321 mergemaster -i [4] 322 <reboot> 323 324 Make sure that you've read the UPDATING file to understand the 325 tweaks to various things you need. At this point in the life 326 cycle of current, things change often and you are on your own 327 to cope. The defaults can also change, so please read ALL of 328 the UPDATING entries. 329 330 Also, if you are tracking -current, you must be subscribed to 331 freebsd-current@freebsd.org. Make sure that before you update 332 your sources that you have read and understood all the recent 333 messages there. If in doubt, please track -stable which has 334 much fewer pitfalls. 335 336 [1] If you have third party modules, such as vmware, you 337 should disable them at this point so they don't crash your 338 system on reboot. 339 340 [3] From the bootblocks, boot -s, and then do 341 fsck -p 342 mount -u / 343 mount -a 344 cd src 345 adjkerntz -i # if CMOS is wall time 346 Also, when doing a major release upgrade, it is required that 347 you boot into single user mode to do the installworld. 348 349 [4] Note: This step is non-optional. Failure to do this step 350 can result in a significant reduction in the functionality of the 351 system. Attempting to do it by hand is not recommended and those 352 that pursue this avenue should read this file carefully, as well 353 as the archives of freebsd-current and freebsd-hackers mailing lists 354 for potential gotchas. 355 356 [5] Usually this step is a noop. However, from time to time 357 you may need to do this if you get unknown user in the following 358 step. It never hurts to do it all the time. You may need to 359 install a new mergemaster (cd src/usr.sbin/mergemaster && make 360 install) after the buildworld before this step if you last updated 361 from current before 20020224 or from -stable before 20020408. 362 363 [8] In order to have a kernel that can run the 4.x binaries 364 needed to do an installworld, you must include the COMPAT_FREEBSD4 365 option in your kernel. Failure to do so may leave you with a system 366 that is hard to boot to recover. 367 368 Make sure that you merge any new devices from GENERIC since the 369 last time you updated your kernel config file. 370 371 [9] When checking out sources, you must include the -P flag to have 372 cvs prune empty directories. 373 374 If CPUTYPE is defined in your /etc/make.conf, make sure to use the 375 "?=" instead of the "=" assignment operator, so that buildworld can 376 override the CPUTYPE if it needs to. 377 378 MAKEOBJDIRPREFIX must be defined in an environment variable, and 379 not on the command line, or in /etc/make.conf. buildworld will 380 warn if it is improperly defined. 381FORMAT: 382 383This file contains a list, in reverse chronological order, of major 384breakages in tracking -current. Not all things will be listed here, 385and it only starts on October 16, 2004. Updating files can found in 386previous releases if your system is older than this. 387 388Copyright information: 389 390Copyright 1998-2005 M. Warner Losh. All Rights Reserved. 391 392Redistribution, publication, translation and use, with or without 393modification, in full or in part, in any form or format of this 394document are permitted without further permission from the author. 395 396THIS DOCUMENT IS PROVIDED BY WARNER LOSH ``AS IS'' AND ANY EXPRESS OR 397IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 398WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 399DISCLAIMED. IN NO EVENT SHALL WARNER LOSH BE LIABLE FOR ANY DIRECT, 400INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 401(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 402SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 403HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 404STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 405IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 406POSSIBILITY OF SUCH DAMAGE. 407 408If you find this document useful, and you want to, you may buy the 409author a beer. 410 411Contact Warner Losh if you have any questions about your use of 412this document. 413 414$FreeBSD$ 415