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