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