1, how to upgrade, compile the kernel?
If you don't want to change the kernel version, go directly to step fourth below.
1 in any subdirectory (but usually under/usr/src/) Untar unlock the new kernel source program:
Tar xvfz linux-x.x.xx.tar.gz (e.g. linux-2.0.35.tar.gz)
or a patch (patch): GZIP-CD patch-2.0.35.gz | Patch-p0
Skip the patch and jump straight to step fourth.
2) Rm/usr/src/linux This is usually a symbolic connection.
3 Create a symbol to connect to your new kernel directory under/usr/src/.
Ln-s/usr/src/linux.2.x.xx/usr/src/linux
The older version of the kernel may also have to do the work:
Cd/usr/include
RM-RF ASM Linux SCSI
Ln-s/usr/src/linux/include/asm-i386 ASM
Ln-s/usr/src/linux/include/linux Linux
Ln-s/USR/SRC/LINUX/INCLUDE/SCSI SCSI
4 The current directory into/usr/src/linux
Cd/usr/src/linux
5 becomes Superuser su
6) Configure the kernel
If you are under X window and want to have a graphical interface, use: Make Xconfig
(Note: The TK/TCL package needs to be installed and the resolution of X server is above 800x600)
If you are not under X window or do not want to use the graphical interface, use:
Make config or make menuconfig (recommended), after answering the question one by one, wait a moment, wait for a prompt to appear or the graphical interface disappears, configure the system.
7 to generate a new kernel, with:
Make DEP; Make clean
Make zimage (or further compress the kernel with make bzimage)
(Note that there are case sensitive)
There are also make Zlilo/make install and so on to choose from.
8 If you use a module, you also need to build and install the module
Make modules
Make Modules-install
Depmod-a
9 Check/etc/lilo.conf, the use of the directory, that file as image. Example: Image =/boot/vmlinuz (Slackware version is/vmlinuz)
Copy the/usr/src/linux/system.map to the/boot directory,
Copy the/usr/src/linux/arch/i386/boot/zimage to the/boot directory and rename it to Vmlinuz
Copy the new kernel to the appropriate directory with a new file name, such as
Cp/usr/src/linux/arch/i386/boot/zimage/boot/zimage2
Then edit the/etc/lilo.conf file and copy the section that is related to the original kernel, such as
Image =/boot/vmlinuz
root =/dev/hda1
label = Linux
After copying the image into/boot/zimage2 to change the label to Newlinux.
This allows the new kernel to coexist with the old kernel, and when the new kernel does not start, there are backups. Note Where to place the copy and, if default is not set, who is the first item and who is the default startup item.