UPDATING revision 156943
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 2420060317: 25 Most world/kernel related NO_* build options changed names. 26 New knobs have common prefixes WITHOUT_*/WITH_* (modelled 27 after FreeBSD ports) and should be set in /etc/src.conf 28 (the src.conf(5) manpage is provided). Full backwards 29 compatibility is maintained for the time being though it's 30 highly recommended to start moving old options out of the 31 system-wide /etc/make.conf file into the new /etc/src.conf 32 while also properly renaming them. More conversions will 33 likely follow. Posting to current@: 34 35 http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html 36 3720060305: 38 The NETSMBCRYPTO kernel option has been retired because its 39 functionality is always included in NETSMB and smbfs.ko now. 40 4120060303: 42 The TDFX_LINUX kernel option was retired and replaced by the 43 tdfx_linux device. The latter can be loaded as the 3dfx_linux.ko 44 kernel module. Loading it alone should suffice to get 3dfx support 45 for Linux apps because it will pull in 3dfx.ko and linux.ko through 46 its dependencies. 47 4820060204: 49 The 'audit' group was added to support the new auditing functionality 50 in the base system. Be sure to follow the directions for updating, 51 including the requirement to run mergemaster -p. 52 5320060201: 54 The kernel ABI to file system modules was changed on i386. 55 Please make sure that your kernel and modules are in sync. 56 5720060118: 58 This actually occured some time ago, but installing the kernel 59 now also installs a bunch of symbol files for the kernel modules. 60 This increases the size of /boot/kernel to about 67Mbytes. You 61 will need twice this if you will eventually back this up to kernel.old 62 on your next install. 63 If you have a shortage of room in your root partition, you should add 64 -DINSTALL_NODEBUG to your make arguments or add INSTALL_NODEBUG="yes" 65 to your /etc/make.conf. 66 6720060113: 68 libc's malloc implementation has been replaced. This change has the 69 potential to uncover application bugs that previously went unnoticed. 70 See the malloc(3) manual page for more details. 71 7220060112: 73 The generic netgraph(4) cookie has been changed. If you upgrade 74 kernel passing this point, you also need to upgrade userland 75 and netgraph(4) utilities like ports/net/mpd or ports/net/mpd4. 76 7720060106: 78 si(4)'s device files now contain the unit number. 79 Uses of {cua,tty}A[0-9a-f] should be replaced by {cua,tty}A0[0-9a-f]. 80 8120060106: 82 The kernel ABI was mostly destroyed due to a change in the size 83 of struct lock_object which is nested in other structures such 84 as mutexes which are nested in all sorts of other structures. 85 Make sure your kernel and modules are in sync. 86 8720051231: 88 The page coloring algorithm in the VM subsystem was converted 89 from tuning with kernel options to autotuning. Please remove 90 any PQ_* option except PQ_NOOPT from your kernel config. 91 9220051211: 93 The net80211-related tools in the tools/tools/ath directory 94 have been moved to tools/tools/net80211 and renamed with a 95 "wlan" prefix. Scripts that use them should be adjusted 96 accordingly. 97 9820051202: 99 Scripts in the local_startup directories (as defined in 100 /etc/defaults/rc.conf) that have the new rc.d semantics will 101 now be run as part of the base system rcorder. If there are 102 errors or problems with one of these local scripts, it could 103 cause boot problems. If you encounter such problems, boot in 104 single user mode, remove that script from the */rc.d directory. 105 Please report the problem to the port's maintainer, and the 106 freebsd-ports@freebsd.org mailing list. 107 10820051129: 109 The nodev mount option was deprecated in RELENG_6 (where it 110 was a no-op), and is now unsupported. If you have nodev or dev listed 111 in /etc/fstab, remove it, otherwise it will result in a mount error. 112 11320051129: 114 ABI between ipfw(4) and ipfw(8) has been changed. You need 115 to rebuild ipfw(8) when rebuilding kernel. 116 11720051108: 118 rp(4)'s device files now contain the unit number. 119 Uses of {cua,tty}R[0-9a-f] should be replaced by {cua,tty}R0[0-9a-f]. 120 12120051029: 122 /etc/rc.d/ppp-user has been renamed to /etc/rc.d/ppp. 123 Its /etc/rc.conf.d configuration file has been `ppp' from 124 the beginning, and hence there is no need to touch it. 125 12620051014: 127 Now most modules get their build-time options from the kernel 128 configuration file. A few modules still have fixed options 129 due to their non-conformant implementation, but they will be 130 corrected eventually. You may need to review the options of 131 the modules in use, explicitly specify the non-default options 132 in the kernel configuration file, and rebuild the kernel and 133 modules afterwards. 134 13520051001: 136 kern.polling.enable sysctl MIB is now deprecated. Use ifconfig(8) 137 to turn polling(4) on your interfaces. 138 13920050927: 140 The old bridge(4) implementation was retired. The new 141 if_bridge(4) serves as a full functional replacement. 142 14320050722: 144 The ai_addrlen of a struct addrinfo was changed to a socklen_t 145 to conform to POSIX-2001. This change broke an ABI 146 compatibility on 64 bit architecture. You have to recompile 147 userland programs that use getaddrinfo(3) on 64 bit 148 architecture. 149 15020050711: 151 RELENG_6 branched here. 152 15320050629: 154 The pccard_ifconfig rc.conf variable has been removed and a new 155 variable, ifconfig_DEFAULT has been introduced. Unlike 156 pccard_ifconfig, ifconfig_DEFAULT applies to ALL interfaces that 157 do not have ifconfig_ifn entries rather than just those in 158 removable_interfaces. 159 16020050616: 161 Some previous versions of PAM have permitted the use of 162 non-absolute paths in /etc/pam.conf or /etc/pam.d/* when referring 163 to third party PAM modules in /usr/local/lib. A change has been 164 made to require the use of absolute paths in order to avoid 165 ambiguity and dependence on library path configuration, which may 166 affect existing configurations. 167 16820050610: 169 Major changes to network interface API. All drivers must be 170 recompiled. Drivers not in the base system will need to be 171 updated to the new APIs. 172 17320050609: 174 Changes were made to kinfo_proc in sys/user.h. Please recompile 175 userland, or commands like `fstat', `pkill', `ps', `top' and `w' 176 will not behave correctly. 177 178 The API and ABI for hwpmc(4) have changed with the addition 179 of sampling support. Please recompile lib/libpmc(3) and 180 usr.sbin/{pmcstat,pmccontrol}. 181 18220050606: 183 The OpenBSD dhclient was imported in place of the ISC dhclient 184 and the network interface configuration scripts were updated 185 accordingly. If you use DHCP to configure your interfaces, you 186 must now run devd. Also, DNS updating was lost so you will need 187 to find a workaround if you use this feature. 188 189 The '_dhcp' user was added to support the OpenBSD dhclient. Be 190 sure to run mergemaster -p (like you are supposed to do every time 191 anyway). 192 19320050605: 194 if_bridge was added to the tree. This has changed struct ifnet. 195 Please recompile userland and all network related modules. 196 19720050603: 198 The n_net of a struct netent was changed to an uint32_t, and 199 1st argument of getnetbyaddr() was changed to an uint32_t, to 200 conform to POSIX-2001. These changes broke an ABI 201 compatibility on 64 bit architecture. With these changes, 202 shlib major of libpcap was bumped. You have to recompile 203 userland programs that use getnetbyaddr(3), getnetbyname(3), 204 getnetent(3) and/or libpcap on 64 bit architecture. 205 20620050528: 207 Kernel parsing of extra options on '#!' first lines of shell 208 scripts has changed. Lines with multiple options likely will 209 fail after this date. For full details, please see 210 http://people.freebsd.org/~gad/Updating-20050528.txt 211 21220050503: 213 The packet filter (pf) code has been updated to OpenBSD 3.7 214 Please note the changed anchor syntax and the fact that 215 authpf(8) now needs a mounted fdescfs(5) to function. 216 21720050415: 218 The NO_MIXED_MODE kernel option has been removed from the i386 219 amd64 platforms as its use has been superceded by the new local 220 APIC timer code. Any kernel config files containing this option 221 should be updated. 222 22320050227: 224 The on-disk format of LC_CTYPE files was changed to be machine 225 independent. Please make sure NOT to use NO_CLEAN buildworld 226 when crossing this point. Crossing this point also requires 227 recompile or reinstall of all locale depended packages. 228 22920050225: 230 The ifi_epoch member of struct if_data has been changed to 231 contain the uptime at which the interface was created or the 232 statistics zeroed rather then the wall clock time because 233 wallclock time may go backwards. This should have no impact 234 unless an snmp implementation is using this value (I know of 235 none at this point.) 236 23720050224: 238 The acpi_perf and acpi_throttle drivers are now part of the 239 acpi(4) main module. They are no longer built separately. 240 24120050223: 242 The layout of struct image_params has changed. You have to 243 recompile all compatibility modules (linux, svr4, etc) for use 244 with the new kernel. 245 24620050223: 247 The p4tcc driver has been merged into cpufreq(4). This makes 248 "options CPU_ENABLE_TCC" obsolete. Please load cpufreq.ko or 249 compile in "device cpufreq" to restore this functionality. 250 25120050220: 252 The responsibility of recomputing the file system summary of 253 a SoftUpdates-enabled dirty volume has been transferred to the 254 background fsck. A rebuild of fsck(8) utility is recommended 255 if you have updated the kernel. 256 257 To get the old behavior (recompute file system summary at mount 258 time), you can set vfs.ffs.compute_summary_at_mount=1 before 259 mounting the new volume. 260 26120050206: 262 The cpufreq import is complete. As part of this, the sysctls for 263 acpi(4) throttling have been removed. The power_profile script 264 has been updated, so you can use performance/economy_cpu_freq in 265 rc.conf(5) to set AC on/offline cpu frequencies. 266 26720050206: 268 NG_VERSION has been increased. Recompiling kernel (or ng_socket.ko) 269 requires recompiling libnetgraph and userland netgraph utilities. 270 27120050114: 272 Support for abbreviated forms of a number of ipfw options is 273 now deprecated. Warnings are printed to stderr indicating the 274 correct full form when a match occurs. Some abbreviations may 275 be supported at a later date based on user feedback. To be 276 considered for support, abbreviations must be in use prior to 277 this commit and unlikely to be confused with current key words. 278 27920041221: 280 By a popular demand, a lot of NOFOO options were renamed 281 to NO_FOO (see bsd.compat.mk for a full list). The old 282 spellings are still supported, but will cause annoying 283 warnings on stderr. Make sure you upgrade properly (see 284 the COMMON ITEMS: section later in this file). 285 28620041219: 287 Auto-loading of ancillary wlan modules such as wlan_wep has 288 been temporarily disabled; you need to statically configure 289 the modules you need into your kernel or explicitly load them 290 prior to use. Specifically, if you intend to use WEP encryption 291 with an 802.11 device load/configure wlan_wep; if you want to 292 use WPA with the ath driver load/configure wlan_tkip, wlan_ccmp, 293 and wlan_xauth as required. 294 29520041213: 296 The behaviour of ppp(8) has changed slightly. If lqr is enabled 297 (``enable lqr''), older versions would revert to LCP ECHO mode on 298 negotiation failure. Now, ``enable echo'' is required for this 299 behaviour. The ppp version number has been bumped to 3.4.2 to 300 reflect the change. 301 30220041201: 303 The wlan support has been updated to split the crypto support 304 into separate modules. For static WEP you must configure the 305 wlan_wep module in your system or build and install the module 306 in place where it can be loaded (the kernel will auto-load 307 the module when a wep key is configured). 308 30920041201: 310 The ath driver has been updated to split the tx rate control 311 algorithm into a separate module. You need to include either 312 ath_rate_onoe or ath_rate_amrr when configuring the kernel. 313 31420041116: 315 Support for systems with an 80386 CPU has been removed. Please 316 use FreeBSD 5.x or earlier on systems with an 80386. 317 31820041110: 319 We have had a hack which would mount the root filesystem 320 R/W if the device were named 'md*'. As part of the vnode 321 work I'm doing I have had to remove this hack. People 322 building systems which use preloaded MD root filesystems 323 may need to insert a "/sbin/mount -u -o rw /dev/md0 /" in 324 their /etc/rc scripts. 325 32620041104: 327 FreeBSD 5.3 shipped here. 328 32920041102: 330 The size of struct tcpcb has changed again due to the removal 331 of RFC1644 T/TCP. You have to recompile userland programs that 332 read kmem for tcp sockets directly (netstat, sockstat, etc.) 333 33420041022: 335 The size of struct tcpcb has changed. You have to recompile 336 userland programs that read kmem for tcp sockets directly 337 (netstat, sockstat, etc.) 338 33920041016: 340 RELENG_5 branched here. For older entries, please see updating 341 in the RELENG_5 branch. 342 343COMMON ITEMS: 344 345 General Notes 346 ------------- 347 Avoid using make -j when upgrading. From time to time in the 348 past there have been problems using -j with buildworld and/or 349 installworld. This is especially true when upgrading between 350 "distant" versions (eg one that cross a major release boundary 351 or several minor releases, or when several months have passed 352 on the -current branch). 353 354 Sometimes, obscure build problems are the result of environment 355 poisoning. This can happen because the make utility reads its 356 environment when searching for values for global variables. 357 To run your build attempts in an "environmental clean room", 358 prefix all make commands with 'env -i '. See the env(1) manual 359 page for more details. 360 361 When upgrading from one major version to another it is generally 362 best to upgrade to the latest code in the currently installed branch 363 first, then do an upgrade to the new branch. This is the best-tested 364 upgrade path, and has the highest probability of being successful. 365 Please try this approach before reporting problems with a major 366 version upgrade. 367 368 To build a kernel 369 ----------------- 370 If you are updating from a prior version of FreeBSD (even one just 371 a few days old), you should follow this procedure. It is the most 372 failsafe as it uses a /usr/obj tree with a fresh mini-buildworld, 373 374 make kernel-toolchain 375 make -DALWAYS_CHECK_MAKE buildkernel KERNCONF=YOUR_KERNEL_HERE 376 make -DALWAYS_CHECK_MAKE installkernel KERNCONF=YOUR_KERNEL_HERE 377 378 To test a kernel once 379 --------------------- 380 If you just want to boot a kernel once (because you are not sure 381 if it works, or if you want to boot a known bad kernel to provide 382 debugging information) run 383 make installkernel KERNCONF=YOUR_KERNEL_HERE KODIR=/boot/testkernel 384 nextboot -k testkernel 385 386 To just build a kernel when you know that it won't mess you up 387 -------------------------------------------------------------- 388 This assumes you are already running a 5.X system. Replace 389 ${arch} with the architecture of your machine (e.g. "i386", 390 "alpha", "amd64", "ia64", "pc98", "sparc64", etc). 391 392 cd src/sys/${arch}/conf 393 config KERNEL_NAME_HERE 394 cd ../compile/KERNEL_NAME_HERE 395 make depend 396 make 397 make install 398 399 If this fails, go to the "To build a kernel" section. 400 401 To rebuild everything and install it on the current system. 402 ----------------------------------------------------------- 403 # Note: sometimes if you are running current you gotta do more than 404 # is listed here if you are upgrading from a really old current. 405 406 <make sure you have good level 0 dumps> 407 make buildworld 408 make kernel KERNCONF=YOUR_KERNEL_HERE 409 [1] 410 <reboot in single user> [3] 411 mergemaster -p [5] 412 make installworld 413 make delete-old 414 mergemaster [4] 415 <reboot> 416 417 418 To cross-install current onto a separate partition 419 -------------------------------------------------- 420 # In this approach we use a separate partition to hold 421 # current's root, 'usr', and 'var' directories. A partition 422 # holding "/", "/usr" and "/var" should be about 2GB in 423 # size. 424 425 <make sure you have good level 0 dumps> 426 <boot into -stable> 427 make buildworld 428 make buildkernel KERNCONF=YOUR_KERNEL_HERE 429 <maybe newfs current's root partition> 430 <mount current's root partition on directory ${CURRENT_ROOT}> 431 make installworld DESTDIR=${CURRENT_ROOT} 432 cd src/etc; make distribution DESTDIR=${CURRENT_ROOT} # if newfs'd 433 make installkernel KERNCONF=YOUR_KERNEL_HERE DESTDIR=${CURRENT_ROOT} 434 cp /etc/fstab ${CURRENT_ROOT}/etc/fstab # if newfs'd 435 <edit ${CURRENT_ROOT}/etc/fstab to mount "/" from the correct partition> 436 <reboot into current> 437 <do a "native" rebuild/install as described in the previous section> 438 <maybe install compatibility libraries from src/lib/compat> 439 <reboot> 440 441 442 To upgrade in-place from 5.x-stable to current 443 ---------------------------------------------- 444 <make sure you have good level 0 dumps> 445 make buildworld [9] 446 make kernel KERNCONF=YOUR_KERNEL_HERE [8] 447 [1] 448 <reboot in single user> [3] 449 mergemaster -p [5] 450 make installworld 451 make delete-old 452 mergemaster -i [4] 453 <reboot> 454 455 Make sure that you've read the UPDATING file to understand the 456 tweaks to various things you need. At this point in the life 457 cycle of current, things change often and you are on your own 458 to cope. The defaults can also change, so please read ALL of 459 the UPDATING entries. 460 461 Also, if you are tracking -current, you must be subscribed to 462 freebsd-current@freebsd.org. Make sure that before you update 463 your sources that you have read and understood all the recent 464 messages there. If in doubt, please track -stable which has 465 much fewer pitfalls. 466 467 [1] If you have third party modules, such as vmware, you 468 should disable them at this point so they don't crash your 469 system on reboot. 470 471 [3] From the bootblocks, boot -s, and then do 472 fsck -p 473 mount -u / 474 mount -a 475 cd src 476 adjkerntz -i # if CMOS is wall time 477 Also, when doing a major release upgrade, it is required that 478 you boot into single user mode to do the installworld. 479 480 [4] Note: This step is non-optional. Failure to do this step 481 can result in a significant reduction in the functionality of the 482 system. Attempting to do it by hand is not recommended and those 483 that pursue this avenue should read this file carefully, as well 484 as the archives of freebsd-current and freebsd-hackers mailing lists 485 for potential gotchas. 486 487 [5] Usually this step is a noop. However, from time to time 488 you may need to do this if you get unknown user in the following 489 step. It never hurts to do it all the time. You may need to 490 install a new mergemaster (cd src/usr.sbin/mergemaster && make 491 install) after the buildworld before this step if you last updated 492 from current before 20020224 or from -stable before 20020408. 493 494 [8] In order to have a kernel that can run the 4.x binaries 495 needed to do an installworld, you must include the COMPAT_FREEBSD4 496 option in your kernel. Failure to do so may leave you with a system 497 that is hard to boot to recover. A similar kernel option COMPAT_FREEBSD5 498 is required to run the 5.x binaries on more recent kernels. 499 500 Make sure that you merge any new devices from GENERIC since the 501 last time you updated your kernel config file. 502 503 [9] When checking out sources, you must include the -P flag to have 504 cvs prune empty directories. 505 506 If CPUTYPE is defined in your /etc/make.conf, make sure to use the 507 "?=" instead of the "=" assignment operator, so that buildworld can 508 override the CPUTYPE if it needs to. 509 510 MAKEOBJDIRPREFIX must be defined in an environment variable, and 511 not on the command line, or in /etc/make.conf. buildworld will 512 warn if it is improperly defined. 513FORMAT: 514 515This file contains a list, in reverse chronological order, of major 516breakages in tracking -current. Not all things will be listed here, 517and it only starts on October 16, 2004. Updating files can found in 518previous releases if your system is older than this. 519 520Copyright information: 521 522Copyright 1998-2005 M. Warner Losh. All Rights Reserved. 523 524Redistribution, publication, translation and use, with or without 525modification, in full or in part, in any form or format of this 526document are permitted without further permission from the author. 527 528THIS DOCUMENT IS PROVIDED BY WARNER LOSH ``AS IS'' AND ANY EXPRESS OR 529IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 530WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 531DISCLAIMED. IN NO EVENT SHALL WARNER LOSH BE LIABLE FOR ANY DIRECT, 532INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 533(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 534SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 535HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 536STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 537IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 538POSSIBILITY OF SUCH DAMAGE. 539 540If you find this document useful, and you want to, you may buy the 541author a beer. 542 543Contact Warner Losh if you have any questions about your use of 544this document. 545 546$FreeBSD: head/UPDATING 156943 2006-03-21 10:10:05Z ru $ 547