Recompile and install the Ubuntu Kernel

Source: Internet
Author: User
Recently, the abiCloud cloud computing environment has been set up, so you need to install vbox on the node (of course, vmware can be used ). Because vbox needs to be compiled into the kernel, the Ubuntu kernel is re-compiled. The following is the entire compilation process: first, check the kernel version and run the following command: (my node uses Ubuntu9.10 desktop version) root @ hker-laptop: /## uname-a: Linuxhker-la

Recently, the abiCloud cloud computing environment has been set up, so you need to install vbox on the node (of course, vmware can be used ). Because vbox needs to be compiled into the kernel, the Ubuntu kernel is re-compiled.

The entire compilation process is as follows:

First, check the kernel version and run the following command: (my node uses Ubuntu 9.10 desktop version)

Root @ hker-laptop: // # uname-
Returned information:
Linux hker-laptop 2.6.31-14-generic # 48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009 i686 GNU/Linux
Download your website from the kernel Website: http://www.kernel.org. Here I downloaded the 2.6.31-8 version, which is lower than my own version, but it does not matter. It is important to complete the task. Use this version for installation!
First, extract linux-2.6.31.8.tar.gz to the/usr/src/directory.
Root @ hker-laptop:/usr/src/# cd/usr/src/
Root @ hker-laptop:/usr/src/linux/# tar zxvf linux-2.6.31.8.tar.gz
Root @ hker-laptop:/usr/src/linux/# mv linux-2.6.31.8 linux (New linux directory, and establish this directory with excellent connection, it seems no difference :))

Root @ hker-laptop:/usr/src/linux/# make oldconfig
Root @ hker-laptop:/usr/src/linux/# make prepare
Root @ hker-laptop:/usr/src/linux/# make modules_prepare
Root @ hker-laptop:/usr/src/linux/# cd ..
Root @ hker-laptop:/usr/src/# make-C linux M =/usr/src/linux/net/mac80211/modules
Root @ hker-laptop:/usr/src # cp linux/net/mac80211/modules. order linux/
Root @ hker-laptop:/usr/src # cd linux
Root @ hker-laptop:/usr/src/linux # make modules_install
Root @ hker-laptop:/usr/src # cd linux
Root @ hker-laptop:/usr/src/linux # make all :()
OK is finally compiled!
Root @ hker-laptop:/usr/src/linux # make install
This step copies the compiled vmlinux-2.6.31.8 to the/boot directory and creates a System. map-2.6.31.8 ing. But here there is a missing initrd. img-2.6.31.8! Set this by yourself!
You can use the mkinitramfs command to generate the initrd. img-2.6.31.8 file.
Root @ hker-laptop:/usr/src/linux/# cd/lib/modules
Root @ hker-laptop:/lib/modules/# mkinitramfs-o/boot/initrd. img-2.6.31.8
OK. Generation successful!

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.