README 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. Linux kernel release 2.6.xx
  2. These are the release notes for Linux version 2.6. Read them carefully,
  3. as they tell you what this is all about, explain how to install the
  4. kernel, and what to do if something goes wrong.
  5. WHAT IS LINUX?
  6. Linux is a Unix clone written from scratch by Linus Torvalds with
  7. assistance from a loosely-knit team of hackers across the Net.
  8. It aims towards POSIX compliance.
  9. It has all the features you would expect in a modern fully-fledged
  10. Unix, including true multitasking, virtual memory, shared libraries,
  11. demand loading, shared copy-on-write executables, proper memory
  12. management and TCP/IP networking.
  13. It is distributed under the GNU General Public License - see the
  14. accompanying COPYING file for more details.
  15. ON WHAT HARDWARE DOES IT RUN?
  16. Linux was first developed for 386/486-based PCs. These days it also
  17. runs on ARMs, DEC Alphas, SUN Sparcs, M68000 machines (like Atari and
  18. Amiga), MIPS and PowerPC, and others.
  19. DOCUMENTATION:
  20. - There is a lot of documentation available both in electronic form on
  21. the Internet and in books, both Linux-specific and pertaining to
  22. general UNIX questions. I'd recommend looking into the documentation
  23. subdirectories on any Linux FTP site for the LDP (Linux Documentation
  24. Project) books. This README is not meant to be documentation on the
  25. system: there are much better sources available.
  26. - There are various README files in the Documentation/ subdirectory:
  27. these typically contain kernel-specific installation notes for some
  28. drivers for example. See Documentation/00-INDEX for a list of what
  29. is contained in each file. Please read the Changes file, as it
  30. contains information about the problems, which may result by upgrading
  31. your kernel.
  32. - The Documentation/DocBook/ subdirectory contains several guides for
  33. kernel developers and users. These guides can be rendered in a
  34. number of formats: PostScript (.ps), PDF, and HTML, among others.
  35. After installation, "make psdocs", "make pdfdocs", or "make htmldocs"
  36. will render the documentation in the requested format.
  37. INSTALLING the kernel:
  38. - If you install the full sources, put the kernel tarball in a
  39. directory where you have permissions (eg. your home directory) and
  40. unpack it:
  41. gzip -cd linux-2.6.XX.tar.gz | tar xvf -
  42. Replace "XX" with the version number of the latest kernel.
  43. Do NOT use the /usr/src/linux area! This area has a (usually
  44. incomplete) set of kernel headers that are used by the library header
  45. files. They should match the library, and not get messed up by
  46. whatever the kernel-du-jour happens to be.
  47. - You can also upgrade between 2.6.xx releases by patching. Patches are
  48. distributed in the traditional gzip and the new bzip2 format. To
  49. install by patching, get all the newer patch files, enter the
  50. top level directory of the kernel source (linux-2.6.xx) and execute:
  51. gzip -cd ../patch-2.6.xx.gz | patch -p1
  52. or
  53. bzip2 -dc ../patch-2.6.xx.bz2 | patch -p1
  54. (repeat xx for all versions bigger than the version of your current
  55. source tree, _in_order_) and you should be ok. You may want to remove
  56. the backup files (xxx~ or xxx.orig), and make sure that there are no
  57. failed patches (xxx# or xxx.rej). If there are, either you or me has
  58. made a mistake.
  59. Alternatively, the script patch-kernel can be used to automate this
  60. process. It determines the current kernel version and applies any
  61. patches found.
  62. linux/scripts/patch-kernel linux
  63. The first argument in the command above is the location of the
  64. kernel source. Patches are applied from the current directory, but
  65. an alternative directory can be specified as the second argument.
  66. - If you are upgrading between releases using the stable series patches
  67. (for example, patch-2.6.xx.y), note that these "dot-releases" are
  68. not incremental and must be applied to the 2.6.xx base tree. For
  69. example, if your base kernel is 2.6.12 and you want to apply the
  70. 2.6.12.3 patch, you do not and indeed must not first apply the
  71. 2.6.12.1 and 2.6.12.2 patches. Similarly, if you are running kernel
  72. version 2.6.12.2 and want to jump to 2.6.12.3, you must first
  73. reverse the 2.6.12.2 patch (that is, patch -R) _before_ applying
  74. the 2.6.12.3 patch.
  75. - Make sure you have no stale .o files and dependencies lying around:
  76. cd linux
  77. make mrproper
  78. You should now have the sources correctly installed.
  79. SOFTWARE REQUIREMENTS
  80. Compiling and running the 2.6.xx kernels requires up-to-date
  81. versions of various software packages. Consult
  82. Documentation/Changes for the minimum version numbers required
  83. and how to get updates for these packages. Beware that using
  84. excessively old versions of these packages can cause indirect
  85. errors that are very difficult to track down, so don't assume that
  86. you can just update packages when obvious problems arise during
  87. build or operation.
  88. BUILD directory for the kernel:
  89. When compiling the kernel all output files will per default be
  90. stored together with the kernel source code.
  91. Using the option "make O=output/dir" allow you to specify an alternate
  92. place for the output files (including .config).
  93. Example:
  94. kernel source code: /usr/src/linux-2.6.N
  95. build directory: /home/name/build/kernel
  96. To configure and build the kernel use:
  97. cd /usr/src/linux-2.6.N
  98. make O=/home/name/build/kernel menuconfig
  99. make O=/home/name/build/kernel
  100. sudo make O=/home/name/build/kernel modules_install install
  101. Please note: If the 'O=output/dir' option is used then it must be
  102. used for all invocations of make.
  103. CONFIGURING the kernel:
  104. Do not skip this step even if you are only upgrading one minor
  105. version. New configuration options are added in each release, and
  106. odd problems will turn up if the configuration files are not set up
  107. as expected. If you want to carry your existing configuration to a
  108. new version with minimal work, use "make oldconfig", which will
  109. only ask you for the answers to new questions.
  110. - Alternate configuration commands are:
  111. "make menuconfig" Text based color menus, radiolists & dialogs.
  112. "make xconfig" X windows (Qt) based configuration tool.
  113. "make gconfig" X windows (Gtk) based configuration tool.
  114. "make oldconfig" Default all questions based on the contents of
  115. your existing ./.config file.
  116. NOTES on "make config":
  117. - having unnecessary drivers will make the kernel bigger, and can
  118. under some circumstances lead to problems: probing for a
  119. nonexistent controller card may confuse your other controllers
  120. - compiling the kernel with "Processor type" set higher than 386
  121. will result in a kernel that does NOT work on a 386. The
  122. kernel will detect this on bootup, and give up.
  123. - A kernel with math-emulation compiled in will still use the
  124. coprocessor if one is present: the math emulation will just
  125. never get used in that case. The kernel will be slightly larger,
  126. but will work on different machines regardless of whether they
  127. have a math coprocessor or not.
  128. - the "kernel hacking" configuration details usually result in a
  129. bigger or slower kernel (or both), and can even make the kernel
  130. less stable by configuring some routines to actively try to
  131. break bad code to find kernel problems (kmalloc()). Thus you
  132. should probably answer 'n' to the questions for
  133. "development", "experimental", or "debugging" features.
  134. - Check the top Makefile for further site-dependent configuration
  135. (default SVGA mode etc).
  136. COMPILING the kernel:
  137. - Make sure you have gcc 2.95.3 available.
  138. gcc 2.91.66 (egcs-1.1.2), and gcc 2.7.2.3 are known to miscompile
  139. some parts of the kernel, and are *no longer supported*.
  140. Also remember to upgrade your binutils package (for as/ld/nm and company)
  141. if necessary. For more information, refer to Documentation/Changes.
  142. Please note that you can still run a.out user programs with this kernel.
  143. - Do a "make" to create a compressed kernel image. It is also
  144. possible to do "make install" if you have lilo installed to suit the
  145. kernel makefiles, but you may want to check your particular lilo setup first.
  146. To do the actual install you have to be root, but none of the normal
  147. build should require that. Don't take the name of root in vain.
  148. - If you configured any of the parts of the kernel as `modules', you
  149. will also have to do "make modules_install".
  150. - Keep a backup kernel handy in case something goes wrong. This is
  151. especially true for the development releases, since each new release
  152. contains new code which has not been debugged. Make sure you keep a
  153. backup of the modules corresponding to that kernel, as well. If you
  154. are installing a new kernel with the same version number as your
  155. working kernel, make a backup of your modules directory before you
  156. do a "make modules_install".
  157. - In order to boot your new kernel, you'll need to copy the kernel
  158. image (e.g. .../linux/arch/i386/boot/bzImage after compilation)
  159. to the place where your regular bootable kernel is found.
  160. - Booting a kernel directly from a floppy without the assistance of a
  161. bootloader such as LILO, is no longer supported.
  162. If you boot Linux from the hard drive, chances are you use LILO which
  163. uses the kernel image as specified in the file /etc/lilo.conf. The
  164. kernel image file is usually /vmlinuz, /boot/vmlinuz, /bzImage or
  165. /boot/bzImage. To use the new kernel, save a copy of the old image
  166. and copy the new image over the old one. Then, you MUST RERUN LILO
  167. to update the loading map!! If you don't, you won't be able to boot
  168. the new kernel image.
  169. Reinstalling LILO is usually a matter of running /sbin/lilo.
  170. You may wish to edit /etc/lilo.conf to specify an entry for your
  171. old kernel image (say, /vmlinux.old) in case the new one does not
  172. work. See the LILO docs for more information.
  173. After reinstalling LILO, you should be all set. Shutdown the system,
  174. reboot, and enjoy!
  175. If you ever need to change the default root device, video mode,
  176. ramdisk size, etc. in the kernel image, use the 'rdev' program (or
  177. alternatively the LILO boot options when appropriate). No need to
  178. recompile the kernel to change these parameters.
  179. - Reboot with the new kernel and enjoy.
  180. IF SOMETHING GOES WRONG:
  181. - If you have problems that seem to be due to kernel bugs, please check
  182. the file MAINTAINERS to see if there is a particular person associated
  183. with the part of the kernel that you are having trouble with. If there
  184. isn't anyone listed there, then the second best thing is to mail
  185. them to me (torvalds@osdl.org), and possibly to any other relevant
  186. mailing-list or to the newsgroup.
  187. - In all bug-reports, *please* tell what kernel you are talking about,
  188. how to duplicate the problem, and what your setup is (use your common
  189. sense). If the problem is new, tell me so, and if the problem is
  190. old, please try to tell me when you first noticed it.
  191. - If the bug results in a message like
  192. unable to handle kernel paging request at address C0000010
  193. Oops: 0002
  194. EIP: 0010:XXXXXXXX
  195. eax: xxxxxxxx ebx: xxxxxxxx ecx: xxxxxxxx edx: xxxxxxxx
  196. esi: xxxxxxxx edi: xxxxxxxx ebp: xxxxxxxx
  197. ds: xxxx es: xxxx fs: xxxx gs: xxxx
  198. Pid: xx, process nr: xx
  199. xx xx xx xx xx xx xx xx xx xx
  200. or similar kernel debugging information on your screen or in your
  201. system log, please duplicate it *exactly*. The dump may look
  202. incomprehensible to you, but it does contain information that may
  203. help debugging the problem. The text above the dump is also
  204. important: it tells something about why the kernel dumped code (in
  205. the above example it's due to a bad kernel pointer). More information
  206. on making sense of the dump is in Documentation/oops-tracing.txt
  207. - If you compiled the kernel with CONFIG_KALLSYMS you can send the dump
  208. as is, otherwise you will have to use the "ksymoops" program to make
  209. sense of the dump. This utility can be downloaded from
  210. ftp://ftp.<country>.kernel.org/pub/linux/utils/kernel/ksymoops.
  211. Alternately you can do the dump lookup by hand:
  212. - In debugging dumps like the above, it helps enormously if you can
  213. look up what the EIP value means. The hex value as such doesn't help
  214. me or anybody else very much: it will depend on your particular
  215. kernel setup. What you should do is take the hex value from the EIP
  216. line (ignore the "0010:"), and look it up in the kernel namelist to
  217. see which kernel function contains the offending address.
  218. To find out the kernel function name, you'll need to find the system
  219. binary associated with the kernel that exhibited the symptom. This is
  220. the file 'linux/vmlinux'. To extract the namelist and match it against
  221. the EIP from the kernel crash, do:
  222. nm vmlinux | sort | less
  223. This will give you a list of kernel addresses sorted in ascending
  224. order, from which it is simple to find the function that contains the
  225. offending address. Note that the address given by the kernel
  226. debugging messages will not necessarily match exactly with the
  227. function addresses (in fact, that is very unlikely), so you can't
  228. just 'grep' the list: the list will, however, give you the starting
  229. point of each kernel function, so by looking for the function that
  230. has a starting address lower than the one you are searching for but
  231. is followed by a function with a higher address you will find the one
  232. you want. In fact, it may be a good idea to include a bit of
  233. "context" in your problem report, giving a few lines around the
  234. interesting one.
  235. If you for some reason cannot do the above (you have a pre-compiled
  236. kernel image or similar), telling me as much about your setup as
  237. possible will help.
  238. - Alternately, you can use gdb on a running kernel. (read-only; i.e. you
  239. cannot change values or set break points.) To do this, first compile the
  240. kernel with -g; edit arch/i386/Makefile appropriately, then do a "make
  241. clean". You'll also need to enable CONFIG_PROC_FS (via "make config").
  242. After you've rebooted with the new kernel, do "gdb vmlinux /proc/kcore".
  243. You can now use all the usual gdb commands. The command to look up the
  244. point where your system crashed is "l *0xXXXXXXXX". (Replace the XXXes
  245. with the EIP value.)
  246. gdb'ing a non-running kernel currently fails because gdb (wrongly)
  247. disregards the starting offset for which the kernel is compiled.