Compile and use the new kernel in Ubuntu7.10

Source: Internet
Author: User
Article title: compile and use the new kernel in Ubuntu7.10. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

First, use the following method to compile the kernel:

Compile the kernel and driver:

Install sound card and video card driver: (optional)

> Apt-get install alsa-source

(It may be recommended that you install kernel-source-2.4. ** and choose not to install this

Kernel-2.4 .**)

This command generates a alsa-driver.tar.bz2 file under the Directory.

> Cd/usr/src

> Tar xvjf alsa-driver.tar.bz2

This command will generate the alsa-driver directory under the/usr/src/modules Directory

> Dpkg-reconfigure

(Select the sound card on your machine)

Because my video card is nvidia, I will only introduce how to install the nvidia driver.


> Apt-get install nvidia-new-kernel-source

> Cd/usr/src

> Tar xvzf nvidia-new-kernel-source.tar.gz

The nvidia-new-kernel directory is generated under the/usr/src/modules Directory.


> Cd/usr/src/linux

> Make-kpkg clean

> Fakeroot make-kpkg -- initrd -- append-to-version =-core2-smp

-- Rev. = 1.0 kernel_image modules_image

Note: the initrd option is used to generate initrd. img. Additional-core2-smp and

1.0 can be any other string.

If everything goes well, the command will generate three deb files in the/usr/src directory after it is completed,

Kernel-image-2.6.17-ck1_1.0_i386.deb, nvidia-kernel-****. deb

And alsa-****. deb

Installation:

> Cd/usr/src

> Dpkg-I kernel-***. deb nvidia-***. deb alsa-***. deb

The system automatically installs the kernel, generates the initrd image, and configures the grub menu.

Note:

A. If the newly installed kernel cannot work properly for some reason, you need to make some minor operations on the kernel.

Modify, you only need to enter/usr/src/linux and then make menuconfig, and then do not need

Make-kpkg clean and direct

Fakeroot make-kpkg -- initrd -- append-to-version = *** -- rev = **

! Here, the rev and append-to-version parameters must be the same as the original ones.

This saves a lot of time for re-compilation.

B. The graphic interface may not work properly when the new kernel runs for the first time.

Root account, run depmod, and then/etc/init. d/mcm restart.

After performing the above steps, I still cannot enter the graphic interface in my system. I found that the module was not loaded correctly.

Insmod/lib/modules/2.6.23.1-core2/nvidia. ko

Then, run/etc/init. d/mcm restart to enter the graphic interface and enable the 3D desktop.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.