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