The process of compiling and installing kernel on Ubuntu9.04 was in July and is only for your reference. 1. download and install the required tool: $ apt-getinstallkernel-packagelibncurses5-devbzip22. download the new linux-kernel source code: http://www.kernel.org/download pipeline, here I download linux-2.6.29.4.tar.
The process of compiling and installing the kernel on Ubuntu 9.04 was in July and is only for your reference.
1. download and install the required tools:
$ Apt-get install kernel-package libncurses5-dev bzip2
2. download the new linux-kernel source code:
Http://www.kernel.org/
Download the source code. Here I download the linux-2.6.29.4.tar.bz2
3. decompress the source code:
$ Tar xvjf linux-2.6.29.4.tar.bz2
4. Create a compilation configuration file
$ Linux-2.6.29.4 cd
$ Vi Makefile
Change EXTRAVERSION =. 4 to EXTRAVERSION =-4-generic
$ Sudo cp/boot/config-2.6.28-11-generic./. config
$ Make menuconfig
Configure your own options or select Load an Alternate Configuration File to use the System Configuration
5. Compile the deb installation package
$ Make-kpkg clean
$ Sudo make-kpkg -- initrd kernel_image kernel_headers modules_image
After the compilation is complete, it will be generated in the previous level directory
Linux-headers-2.6.29-4-generic_2.6.29-4-generic-10.00.Custom_i386.deb and linux-image-2.6.29-4-generic_2.6.29-4-generic-10.00.Custom_i386.deb
6. Install the kernel mirror and the module package
$ Cd ..
$ Sudo dpkg-I linux-image-2.6.29-4-generic_2.6.29-4-generic-10.00.Custom_i386.deb
After the installation is complete, we can
The 2.6.29-4-generic Directory is added to the/lib/modules directory.
The/boot directory has more config-2.6.29-4-generic, System. map-2.6.29-4-generic, initrd. img-2.6.29-4-generic, vmlinuz-2.6.29-4-generic files.
The/boot/grub/menu. lst file contains some additional content.
Title Ubuntu 9.04, kernel 2.6.29-4-generic
Uuid 11213c36-058e-4933-a2b3-81f3df0acb38
Kernel/boot/vmlinuz-2.6.29-4-generic root = UUID = 41513c36-058e-4933-a2b3-81f3df0acb38 ro locale = zh_CN quiet splash
Initrd/boot/initrd. img-2.6.29-4-generic
Quiet
Title Ubuntu 9.04, kernel 2.6.29-4-generic (recovery mode)
Uuid 11213c36-058e-4933-a2b3-81f3df0acb38
Kernel/boot/vmlinuz-2.6.29-4-generic root = UUID = 41513c36-058e-4933-a2b3-81f3df0acb38 ro locale = zh_CN single
Initrd/boot/initrd. img-2.6.29-4-generic
7. Install the kernel header file:
$ Sudo dpkg-I linux-headers-2.6.29-4-generic_2.6.29-4-generic-10.00.Custom_i386.deb
After completion
/Usr/src directory contains the directory of the linux-headers-2.6.29-4-generic header file
Restart your computer.