Fix reported Samba bug.
[linux-2.6/linux-mips.git] / README
blob611354d426d8c8830e8acb76b0a48963638312d4
1         Linux kernel release 2.3.xx
3 These are the release notes for Linux version 2.3.  Read them carefully,
4 as they tell you what this is all about, explain how to install the
5 kernel, and what to do if something goes wrong. 
7 Linux version 2.3 is a DEVELOPMENT kernel, and not intended for general
8 public use.  Different releases may have various and sometimes severe
9 bugs.  It is *strongly* recommended that you back up the previous kernel
10 before installing any new 2.3.xx release.
12 If you need to use a proven and stable Linux kernel, please use 2.0.38
13 or 2.2.xx.  All features which will be in the 2.3.xx releases will be
14 contained in 2.4.xx when the code base has stabilized again. 
16 If you decide to use 2.3, it is recommended that you join the kernel mailing
17 list.  To do this, e-mail majordomo@vger.rutgers.edu, and put in the body
18 of the message "subscribe linux-kernel" or "subscribe linux-kernel-digest"
19 for a daily digest of the mailing list (it is a high-traffic list.)
21 However, please make sure you don't ask questions which are already answered
22 in various files in the Documentation directory.  See DOCUMENTATION below.
24 WHAT IS LINUX?
26   Linux is a Unix clone written from scratch by Linus Torvalds with
27   assistance from a loosely-knit team of hackers across the Net.
28   It aims towards POSIX compliance. 
30   It has all the features you would expect in a modern fully-fledged
31   Unix, including true multitasking, virtual memory, shared libraries,
32   demand loading, shared copy-on-write executables, proper memory
33   management and TCP/IP networking. 
35   It is distributed under the GNU General Public License - see the
36   accompanying COPYING file for more details. 
38 ON WHAT HARDWARE DOES IT RUN?
40   Linux was first developed for 386/486-based PCs.  These days it also
41   runs on ARMs, DEC Alphas, SUN Sparcs, M68000 machines (like Atari and
42   Amiga), MIPS and PowerPC, and others.
44 DOCUMENTATION:
46  - There is a lot of documentation available both in electronic form on
47    the Internet and in books, both Linux-specific and pertaining to
48    general UNIX questions.  I'd recommend looking into the documentation
49    subdirectories on any Linux FTP site for the LDP (Linux Documentation
50    Project) books.  This README is not meant to be documentation on the
51    system: there are much better sources available.
53  - There are various README files in the Documentation/ subdirectory:
54    these typically contain kernel-specific installation notes for some 
55    drivers for example. See ./Documentation/00-INDEX for a list of what
56    is contained in each file.  Please read the Changes file, as it
57    contains information about the problems, which may result by upgrading
58    your kernel.
60 INSTALLING the kernel:
62  - If you install the full sources, do a
64                 cd /usr/src
65                 gzip -cd linux-2.3.XX.tar.gz | tar xvf -
67    to get it all put in place. Replace "XX" with the version number of the
68    latest kernel.
70  - You can also upgrade between 2.3.xx releases by patching.  Patches are
71    distributed in the traditional gzip and the new bzip2 format.  To
72    install by patching, get all the newer patch files and do
74                 cd /usr/src
75                 gzip -cd patchXX.gz | patch -p0
77    or
78                 cd /usr/src
79                 bzip2 -dc patchXX.bz2 | patch -p0
81    (repeat xx for all versions bigger than the version of your current
82    source tree, _in_order_) and you should be ok.  You may want to remove
83    the backup files (xxx~ or xxx.orig), and make sure that there are no
84    failed patches (xxx# or xxx.rej). If there are, either you or me has
85    made a mistake.
87    Alternatively, the script patch-kernel can be used to automate this
88    process.  It determines the current kernel version and applies any
89    patches found.
91                 cd /usr/src
92                 linux/scripts/patch-kernel
94    The default directory for the kernel source is /usr/src/linux, but
95    can be specified as the first argument.  Patches are applied from
96    the current directory, but an alternative directory can be specified
97    as the second argument.
99  - Make sure you have no stale .o files and dependencies lying around:
101                 cd /usr/src/linux
102                 make mrproper
104    You should now have the sources correctly installed.
106 SOFTWARE REQUIREMENTS
108    Compiling and running the 2.3.xx kernels requires up-to-date
109    versions of various software packages.  Consult
110    ./Documentation/Changes for the minimum version numbers required
111    and how to get updates for these packages.  Beware that using
112    excessively old versions of these packages can cause indirect
113    errors that are very difficult to track down, so don't assume that
114    you can just update packages when obvious problems arise during
115    build or operation.
117 CONFIGURING the kernel:
119  - Do a "make config" to configure the basic kernel.  "make config" needs
120    bash to work: it will search for bash in $BASH, /bin/bash and /bin/sh
121    (in that order), so one of those must be correct for it to work. 
123    Do not skip this step even if you are only upgrading one minor
124    version.  New configuration options are added in each release, and
125    odd problems will turn up if the configuration files are not set up
126    as expected.  If you want to carry your existing configuration to a
127    new version with minimal work, use "make oldconfig", which will
128    only ask you for the answers to new questions.
130  - Alternate configuration commands are:
131         "make menuconfig"  Text based color menus, radiolists & dialogs.
132         "make xconfig"     X windows based configuration tool.
133         "make oldconfig"   Default all questions based on the contents of
134                            your existing ./.config file.
135    
136         NOTES on "make config":
137         - having unnecessary drivers will make the kernel bigger, and can
138           under some circumstances lead to problems: probing for a
139           nonexistent controller card may confuse your other controllers
140         - compiling the kernel with "Processor type" set higher than 386
141           will result in a kernel that does NOT work on a 386.  The
142           kernel will detect this on bootup, and give up.
143         - A kernel with math-emulation compiled in will still use the
144           coprocessor if one is present: the math emulation will just
145           never get used in that case.  The kernel will be slightly larger,
146           but will work on different machines regardless of whether they
147           have a math coprocessor or not. 
148         - the "kernel hacking" configuration details usually result in a
149           bigger or slower kernel (or both), and can even make the kernel
150           less stable by configuring some routines to actively try to
151           break bad code to find kernel problems (kmalloc()).  Thus you
152           should probably answer 'n' to the questions for
153           "development", "experimental", or "debugging" features.
155  - Check the top Makefile for further site-dependent configuration
156    (default SVGA mode etc). 
158  - Finally, do a "make dep" to set up all the dependencies correctly. 
160 COMPILING the kernel:
162  - Make sure you have gcc-2.7.2 or newer available.  It seems older gcc
163    versions can have problems compiling newer versions of Linux.  This
164    is mainly because the older compilers can only generate "a.out"-format
165    executables.  As of Linux 2.1.0, the kernel must be compiled as an
166    "ELF" binary.  If you upgrade your compiler, remember to get the new
167    binutils package too (for as/ld/nm and company).
169    Please note that you can still run a.out user programs with this
170    kernel.
172  - Do a "make bzImage" to create a compressed kernel image.  If you want
173    to make a boot disk (without root filesystem or LILO), insert a floppy
174    in your A: drive, and do a "make bzdisk".  It is also possible to do
175    "make bzlilo" if you have lilo installed to suit the kernel makefiles,
176    but you may want to check your particular lilo setup first. 
178  - In the unlikely event that your system cannot boot bzImage kernels you
179    can still compile your kernel as zImage. However, since zImage support
180    will be removed at some point in the future in favor of bzImage we
181    encourage people having problems with booting bzImage kernels to report
182    these, with detailed hardware configuration information, to the
183    linux-kernel mailing list and to H. Peter Anvin <hpa+linux@zytor.com>.
185  - If you configured any of the parts of the kernel as `modules', you
186    will have to do "make modules" followed by "make modules_install".
187    Read Documentation/modules.txt for more information.  For example,
188    an explanation of how to use the modules is included there.
190  - Keep a backup kernel handy in case something goes wrong.  This is 
191    especially true for the development releases, since each new release
192    contains new code which has not been debugged.  Make sure you keep a
193    backup of the modules corresponding to that kernel, as well.  If you
194    are installing a new kernel with the same version number as your
195    working kernel, make a backup of your modules directory before you
196    do a "make modules_install".
198  - In order to boot your new kernel, you'll need to copy the kernel
199    image (found in /usr/src/linux/arch/i386/boot/bzImage after compilation)
200    to the place where your regular bootable kernel is found. 
202    For some, this is on a floppy disk, in which case you can "cp
203    /usr/src/linux/arch/i386/boot/bzImage /dev/fd0" to make a bootable
204    floppy.  Please note that you can not boot a kernel by
205    directly dumping it to a 720k double-density 3.5" floppy.  In this
206    case, it is highly recommended that you install LILO on your
207    double-density boot floppy or switch to high-density floppies.
209    If you boot Linux from the hard drive, chances are you use LILO which
210    uses the kernel image as specified in the file /etc/lilo.conf.  The
211    kernel image file is usually /vmlinuz, /boot/vmlinuz, /bzImage or
212    /boot/bzImage.  To use the new kernel, save a copy of the old image
213    and copy the new image over the old one.  Then, you MUST RERUN LILO
214    to update the loading map!! If you don't, you won't be able to boot
215    the new kernel image.
217    Reinstalling LILO is usually a matter of running /sbin/lilo. 
218    You may wish to edit /etc/lilo.conf to specify an entry for your
219    old kernel image (say, /vmlinux.old) in case the new one does not
220    work.  See the LILO docs for more information. 
222    After reinstalling LILO, you should be all set.  Shutdown the system,
223    reboot, and enjoy!
225    If you ever need to change the default root device, video mode,
226    ramdisk size, etc.  in the kernel image, use the 'rdev' program (or
227    alternatively the LILO boot options when appropriate).  No need to
228    recompile the kernel to change these parameters. 
230  - Reboot with the new kernel and enjoy. 
232 IF SOMETHING GOES WRONG:
234  - If you have problems that seem to be due to kernel bugs, please check
235    the file MAINTAINERS to see if there is a particular person associated
236    with the part of the kernel that you are having trouble with. If there
237    isn't anyone listed there, then the second best thing is to mail
238    them to me (torvalds@transmeta.com), and possibly to any other
239    relevant mailing-list or to the newsgroup.  The mailing-lists are
240    useful especially for SCSI and networking problems, as I can't test
241    either of those personally anyway. 
243  - In all bug-reports, *please* tell what kernel you are talking about,
244    how to duplicate the problem, and what your setup is (use your common
245    sense).  If the problem is new, tell me so, and if the problem is
246    old, please try to tell me when you first noticed it.
248  - If the bug results in a message like
250         unable to handle kernel paging request at address C0000010
251         Oops: 0002
252         EIP:   0010:XXXXXXXX
253         eax: xxxxxxxx   ebx: xxxxxxxx   ecx: xxxxxxxx   edx: xxxxxxxx
254         esi: xxxxxxxx   edi: xxxxxxxx   ebp: xxxxxxxx
255         ds: xxxx  es: xxxx  fs: xxxx  gs: xxxx
256         Pid: xx, process nr: xx
257         xx xx xx xx xx xx xx xx xx xx
259    or similar kernel debugging information on your screen or in your
260    system log, please duplicate it *exactly*.  The dump may look
261    incomprehensible to you, but it does contain information that may
262    help debugging the problem.  The text above the dump is also
263    important: it tells something about why the kernel dumped code (in
264    the above example it's due to a bad kernel pointer). More information
265    on making sense of the dump is in Documentation/oops-tracing.txt
267  - You can use the "ksymoops" program to make sense of the dump.  This
268    utility can be downloaded from ftp://ftp.ocs.com.au/pub/ksymoops .
269    Alternately you can do the dump lookup by hand:
271  - In debugging dumps like the above, it helps enormously if you can
272    look up what the EIP value means.  The hex value as such doesn't help
273    me or anybody else very much: it will depend on your particular
274    kernel setup.  What you should do is take the hex value from the EIP
275    line (ignore the "0010:"), and look it up in the kernel namelist to
276    see which kernel function contains the offending address.
278    To find out the kernel function name, you'll need to find the system
279    binary associated with the kernel that exhibited the symptom.  This is
280    the file 'linux/vmlinux'.  To extract the namelist and match it against
281    the EIP from the kernel crash, do:
283                 nm vmlinux | sort | less
285    This will give you a list of kernel addresses sorted in ascending
286    order, from which it is simple to find the function that contains the
287    offending address.  Note that the address given by the kernel
288    debugging messages will not necessarily match exactly with the
289    function addresses (in fact, that is very unlikely), so you can't
290    just 'grep' the list: the list will, however, give you the starting
291    point of each kernel function, so by looking for the function that
292    has a starting address lower than the one you are searching for but
293    is followed by a function with a higher address you will find the one
294    you want.  In fact, it may be a good idea to include a bit of
295    "context" in your problem report, giving a few lines around the
296    interesting one. 
298    If you for some reason cannot do the above (you have a pre-compiled
299    kernel image or similar), telling me as much about your setup as
300    possible will help. 
302  - Alternately, you can use gdb on a running kernel. (read-only; i.e. you
303    cannot change values or set break points.) To do this, first compile the
304    kernel with -g; edit arch/i386/Makefile appropriately, then do a "make
305    clean". You'll also need to enable CONFIG_PROC_FS (via "make config").
307    After you've rebooted with the new kernel, do "gdb vmlinux /proc/kcore".
308    You can now use all the usual gdb commands. The command to look up the
309    point where your system crashed is "l *0xXXXXXXXX". (Replace the XXXes
310    with the EIP value.)
312    gdb'ing a non-running kernel currently fails because gdb (wrongly)
313    disregards the starting offset for which the kernel is compiled.