Compile the kernel in Ubuntu11.04

Source: Internet
Author: User
In Ubuntu11.04, compile kernel1. download and unzip the Linux kernel source code. the kernel source code is www.kernel.org. check that the current kernel version command is uname-r. Download and decompress to the directory/usr/src.2. decompress the package to enter/usr/src/linux-2.6.34 under the terminal...
Compile the kernel in Ubuntu 11.04. 1. download and decompress the Linux kernel source code. the kernel source code is www.kernel.org. check that the current kernel version command is uname-r. Download and unzip to the directory/usr/src.2. after decompression, enter the/usr/src/linux-2.6.34.13 directory under the terminal (where 2.6.34.13 is the version number I used) 3. enter the make mrproper command to clear the previously compiled files. o and other files. if this is the first compilation, this step can be omitted. www.2cto.com 4. run make menuconfig to report an error, prompting you to install ncurses library: apt-get install libncurses5-dev 5. make menuconfig6. make compilation: 1) generate bzImage, vmlinux under/usr/src/linux-2.6.34.13/arch/x86/boot. bin, setup. elf, setup. bin, tools/build. 2) compile modules, MODPOST. www.2cto.com 7. make modules_install, make install. at this time, the kernel modules are installed, and the grub startup item is automatically modified (?) 8. mkinitramfs-o/boot/initrd. img-source_version-v source_version For my example, mkinitramfs-o/boot/initrd. img-2.6.34.13-v 2.6.34.13 execute this command to generate the image that just compiled the kernel. The command mkinitramfs can be split into "make init ram FileSystem". 2.6.34.13 is the kernel version being compiled and cannot be changed at will. But "initrd. img-2.6.34.13" is the generated kernel image file name, you can modify according to your needs, the difference. 9. update-grub: traverse the files in the/boot/directory and update/boot/grub. ipv10. reboot.
Related Article

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.