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