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

