How to upgrade compilation kernel

xiaoxiao2021-03-06  79

If you don't want to change the version of the kernel, go directly to the following steps.

1) Under any subdirectory (but usually in / usr / src / down) Untar unscrew the new kernel source program:

TAR XVFZ Linux-x.x.xx.tar.gz (such as Linux-2.0.35.tar.gz)

Or a Patch: gzip -cd patch-2.0.35.gz | PATCH -P0

Jump directly to the fourth step

2) RM / USR / SRC / Linux This is usually a symbolic connection.

3) Create a symbol connection to your new kernel directory in / usr / src /.

Ln -s /usr/src/linux.2.x.xx / usr / src / linux

The old version of the kernel may still do 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) Turn the current directory into / usr / src / linux

CD / USR / SRC / Linux

5) Turn into Super User 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 in x window or don't want to use a graphical interface, use:

Make config or make menuconfig (recommended), after answering the question one after another, wait a moment, etc. The prompt appears or the graphical interface disappears, it is configured.

7) Generate a new kernel, use:

Make dep; make clean

Make Zimage (or further compress the kernel with make bzimage)

(Note that there is case in cases)

There are also options such as Make Zlilo / Make Install.

8) If you use the module, you also need to generate and install the module

Make modules

Make modules-install

DEPMOD -A

9) Check /etc/lilo.conf, the directory that uses, the file as an image. For example: image = / boot / vmlinuz (Slackware version is / vmlinuz)

Copy /usR/src/linux/system.map to the / boot directory,

Copy / usr / src / linux / arch / i386 / boot / zimage into the / boot directory and renamed VMLinuz

Use a new file name to copy the new kernel to the corresponding directory, such as

CP / USR / SRC / Linux / Arch / i386 / boot / zimage / boot / zimage2

Then edit the /etc/lilo.conf file, copy the original kernel, such as

Image = / boot / vmlinuz

Root = / dev / hda1

Label = Linux

Remove the image to newlinux after copying the image to NEWLINUX.

Such a new core can coexist with the old kernel. When the new kernel can't start, there is backup there. Pay attention to the location where you place it, if you don't set the default, who is the first who is the default startup item.

10) Install the new kernel and restart.

LILO

Shutdown -r now

转载请注明原文地址:https://www.9cbs.com/read-107640.html

New Post(0)