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