First, use the following method to compile the kernel of UbuntuLinux: Compile the kernel and driver: Install the sound card and video card driver: (optional) # apt-getinstallalsa-source (it may be recommended to install kernel-source-2.4. ** select not to install this kernel-2.4. ** this command will generate an alsa-driver.tar.bz2 file in the directory. # Cd/usr/src # tar
First, compile the Ubuntu Linux kernel using the following method:
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. The other-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.