home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / KERNEL-S / V1.2 / LINUX-1.2 / LINUX-1 / linux / README < prev    next >
Encoding:
Text File  |  1995-01-27  |  9.4 KB  |  219 lines

  1.  
  2.     Linux kernel release 1.1.xx
  3.  
  4. These are the release notes for linux version 1.1.  Read them carefully,
  5. as they tell you what this is all about, explain how to install the
  6. kernel, and what to do if something goes wrong. 
  7.  
  8. Warning: This is a work in progress. If you are not reasonably at ease with
  9. the C programming language, GCC, installing Linux, and recovering from
  10. system crashes, please use the 1.0 version, or wait for 1.2.
  11.  
  12. WHAT IS LINUX?
  13.  
  14.   Linux is a Unix clone for 386/486-based PCs written from scratch by
  15.   Linus Torvalds with assistance from a loosely-knit team of hackers
  16.   across the Net.  It aims towards POSIX compliance. 
  17.  
  18.   It has all the features you would expect in a modern fully-fledged
  19.   Unix, including true multitasking, virtual memory, shared libraries,
  20.   demand loading, shared copy-on-write executables, proper memory
  21.   management and TCP/IP networking. 
  22.  
  23.   It is distributed under the GNU General Public License - see the
  24.   accompanying COPYING file for more details. 
  25.  
  26. INSTALLING the kernel:
  27.  
  28.  - If you install the full sources, do a
  29.  
  30.         cd /usr/src
  31.         gzip -cd linux-1.1.XX.tar.gz | tar xfv -
  32.  
  33.    to get it all put in place. Replace "XX" with the version number of the
  34.    latest kernel.
  35.  
  36.  - Installing by patching is not worth the effort because the full set of
  37.    patches is bigger than a new kernel distribution. Instead, get the
  38.    latest full source archive and install as above. Then, get all newer
  39.    patch files, and do
  40.  
  41.         cd /usr/src
  42.         gzip -cd patchXX.gz | patch -p0
  43.  
  44.    (repeat xx for all versions bigger than the version of your current
  45.    source tree, _in_order_) and you should be ok.  You may want to remove
  46.    the backup files (xxx~ or xxx.orig), and make sure that there are no
  47.    failed patches (xxx# or xxx.rej). If there are, either you or me has
  48.    made a mistake.
  49.  
  50.  - make sure your /usr/include/linux and /usr/include/asm directories
  51.    are just symlinks to the kernel sources:
  52.  
  53.         cd /usr/include
  54.         rm -rf linux
  55.         rm -rf asm
  56.         ln -s /usr/src/linux/include/linux .
  57.         ln -s /usr/src/linux/include/asm .
  58.  
  59.  - make sure you have no stale .o files and dependencies lying around:
  60.  
  61.         cd /usr/src/linux
  62.         make mrproper
  63.  
  64.    You should now have the sources correctly installed.
  65.  
  66. CONFIGURING the kernel:
  67.  
  68.  - do a "make config" to configure the basic kernel.  "make config"
  69.    needs bash to work: it will search for bash in $BASH, /bin/bash and
  70.    /bin/sh (in that order), so hopefully one of those is correct. 
  71.  
  72.     NOTES on "make config":
  73.     - having unnecessary drivers will make the kernel bigger, and can
  74.       under some circumstances lead to problems: probing for a
  75.       nonexistent controller card may confuse your other controllers
  76.     - compiling the kernel with "-m486" for a number of 486-specific
  77.       will result in a kernel that still works on a 386: it may be
  78.       slightly larger and possibly slower by an insignificant amount,
  79.       but it should not hurt performance. 
  80.     - A kernel with math-emulation compiled in will still use the
  81.       coprocessor if one is present: the math emulation will just
  82.       never get used in that case.  The kernel will be slightly larger,
  83.       but will work on different machines regardless of whether they
  84.       have a math coprocessor or not. 
  85.     - the "kernel hacking" configuration details usually result in a
  86.       bigger or slower kernel (or both), and can even make the kernel
  87.       less stable by configuring some routines to actively try to
  88.       break bad code to find kernel problems (kmalloc()).  Thus you
  89.       should probably answer 'n' to the questions for a "production"
  90.       kernel. 
  91.  
  92.  - Check the top Makefile for further site-dependent configuration
  93.    (default SVGA mode etc). 
  94.  
  95.  - Finally, do a "make dep" to set up all the dependencies correctly. 
  96.  
  97. COMPILING the kernel:
  98.  
  99.  - make sure you have gcc-2.5.8 or newer available.  It seems older gcc
  100.    versions can have problems compiling newer versions of linux.  If you
  101.    upgrade your compiler, remember to get the new binutils package too
  102.    (for as/ld/nm and company). Do not use gcc-2.6.0; it has a few serious
  103.    bugs.
  104.  
  105.  - do a "make zImage" to create a compressed kernel image.  If you want
  106.    to make a bootdisk (without root filesystem or lilo), insert a floppy
  107.    in your A: drive, and do a "make zdisk".  It is also possible to do
  108.    "make zlilo" if you have lilo installed to suit the kernel makefiles,
  109.    but you may want to check your particular lilo setup first. 
  110.  
  111.  - keep a backup kernel handy in case something goes wrong. 
  112.  
  113.  - In order to boot your new kernel, you'll need to copy the kernel
  114.    image (found in /usr/src/linux/arch/i386/boot/zImage after compilation)
  115.    to the place where your regular bootable kernel is found. 
  116.  
  117.    For some, this is on a floppy disk, in which case you can "cp
  118.    /usr/src/linux/arch/i386/boot/zImage /dev/fd0" to make a bootable
  119.    floppy. 
  120.  
  121.    If you boot Linux from the hard drive, chances are you use LILO which
  122.    uses the kernel image as specified in the file /etc/lilo/config.  The
  123.    kernel image file is usually /vmlinuz, or /zImage, or /etc/zImage. 
  124.    To use the new kernel, copy the new image over the old one (save a
  125.    backup of the original!).  Then, you MUST RERUN LILO to update the
  126.    loading map!! If you don't, you won't be able to boot the new kernel
  127.    image. 
  128.  
  129.    Reinstalling LILO is usually a matter of running /etc/lilo/install. 
  130.    You may wish to edit /etc/lilo/config to specify an entry for your
  131.    old kernel image (say, /vmlinux.old) in case the new one does not
  132.    work.  See the LILO docs for more information. 
  133.  
  134.    After reinstalling LILO, you should be all set.  Shutdown the system,
  135.    reboot, and enjoy!
  136.  
  137.    If you ever need to change the default root device, video mode,
  138.    ramdisk size, etc.  in the kernel image, use the 'rdev' program (or
  139.    alternatively the LILO boot options when appropriate).  No need to
  140.    recompile the kernel to change these parameters. 
  141.  
  142.  - reboot with the new kernel and enjoy. 
  143.  
  144. IF SOMETHING GOES WRONG:
  145.  
  146.  - if you have problems that seem to be due to kernel bugs, please mail
  147.    them to me (Linus.Torvalds@Helsinki.FI), and possibly to any other
  148.    relevant mailing-list or to the newsgroup.  The mailing-lists are
  149.    useful especially for SCSI and NETworking problems, as I can't test
  150.    either of those personally anyway. 
  151.  
  152.  - In all bug-reports, *please* tell what kernel you are talking about,
  153.    how to duplicate the problem, and what your setup is (use your common
  154.    sense).  If the problem is new, tell me so, and if the problem is
  155.    old, please try to tell me when you first noticed it.
  156.  
  157.  - if the bug results in a message like
  158.  
  159.     unable to handle kernel paging request at address C0000010
  160.     Oops: 0002
  161.     EIP:   0010:XXXXXXXX
  162.     eax: xxxxxxxx   ebx: xxxxxxxx   ecx: xxxxxxxx   edx: xxxxxxxx
  163.     esi: xxxxxxxx   edi: xxxxxxxx   ebp: xxxxxxxx
  164.     ds: xxxx  es: xxxx  fs: xxxx  gs: xxxx
  165.     Pid: xx, process nr: xx
  166.     xx xx xx xx xx xx xx xx xx xx
  167.  
  168.    or similar kernel debugging information on your screen or in your
  169.    system log, please duplicate it *exactly*.  The dump may look
  170.    incomprehensible to you, but it does contain information that may
  171.    help debugging the problem.  The text above the dump is also
  172.    important: it tells something about why the kernel dumped code (in
  173.    the above example it's due to a bad kernel pointer)
  174.  
  175.  - in debugging dumps like the above, it helps enormously if you can
  176.    look up what the EIP value means.  The hex value as such doesn't help
  177.    me or anybody else very much: it will depend on your particular
  178.    kernel setup.  What you should do is take the hex value from the EIP
  179.    line (ignore the "0010:"), and look it up in the kernel namelist to
  180.    see which kernel function contains the offending address.
  181.  
  182.    To find out the kernel function name, you'll need to find the system
  183.    binary associated with the kernel that exhibited the symptom.  This is
  184.    the file 'linux/vmlinux'.  To extract the namelist and match it against
  185.    the EIP from the kernel crash, do:
  186.  
  187.         nm vmlinux | sort | less
  188.  
  189.    This will give you a list of kernel addresses sorted in ascending
  190.    order, from which it is simple to find the function that contains the
  191.    offending address.  Note that the address given by the kernel
  192.    debugging messages will not necessarily match exactly with the
  193.    function addresses (in fact, that is very unlikely), so you can't
  194.    just 'grep' the list: the list will, however, give you the starting
  195.    point of each kernel function, so by looking for the function that
  196.    has a starting address lower than the one you are searching for but
  197.    is followed by a function with a higher address you will find the one
  198.    you want.  In fact, it may be a good idea to include a bit of
  199.    "context" in your problem report, giving a few lines around the
  200.    interesting one. 
  201.  
  202.    If you for some reason cannot do the above (you have a pre-compiled
  203.    kernel image or similar), telling me as much about your setup as
  204.    possible will help. 
  205.  
  206.  - alternately, you can use gdb on a running kernel. (read-only; i.e. you
  207.    cannot change values or set break points.) To do this, first compile the
  208.    kernel with -g; edit arch/i386/Makefile appropriately, then do a "make
  209.    clean". You'll also need to enable CONFIG_PROC_FS (via "make config").
  210.  
  211.    After you've rebooted with the new kernel, do "gdb vmlinux /proc/kcore".
  212.    You can now use all the usual gdb commands. The command to look up the
  213.    point where your system crashed is "l *0xXXXXXXXX". (Replace the XXXes
  214.    with the EIP value.)
  215.  
  216.    gdb'ing a non-running kernel currently fails because gdb (wrongly)
  217.    disregards the starting offset for which the kernel is compiled.
  218.  
  219.