Summarize the Linux kernel compilation process on Ubuntu. first, you must obtain the root permission. There are two methods that have been verified:. sudopasswdroot ******* (enter the original root password) ******* (enter the new root password to keep it as it is. I will keep it as it is.) ****** (enter the new root password again) suroot can use the root permission on the terminal after entering the set password! B
Summarize the Linux kernel compilation process on Ubuntu.
1. First, you must obtain the root permission. There are two methods that have been verified:
A.Sudopasswd root
* ***** (Enter the original root password)
* ***** (Enter a new root password to keep it as it is. I will keep it as it is)
* ***** (Enter the new root password again)
Su root
Enter the password set once.
Then you can use the root permission in the terminal!
B.Sudo-s-H
* ******** (Enter the set password) to obtain the root permission.
2. Install the Compilation Program
Required:# (Sudo) apt-getinstall build-essential kernel-package libncurses5-dev fakeroot
In this step, programs required to compile the kernel must be installed.
3. decompress the directory stored after the cd is downloaded to the kernel. There are two common scenarios:
A. Use bz2 formatTar-jxvf linux-2.6.33.tar.bz2 or tar xjvf linux-2.6.33.tar.bz2(I have not verified it by referring to the online and instructor ppt)
B. If it is in gz formatRoot @ jb-laptop:/home/jb # tar-zxvf linux-2.6.33.tar.gz
4. Copy the source code to the directory/usr/src /.
Root @ jb-laptop:/home/jb # mv linux-2.6.38.8/usr/src/
Then cd to the/usr/src/linux-2.6.33 folder to perform the following operations (cd to the desired folder under some need to add/some do not need ,(?) Cd directly returns the parent folder)
5.Makemrproper(In fact, this step can be omitted, because the source code just downloaded must be clean. If compiled code is used, this step is required)
6. Configure the Kernel option:Make menuconfig(This step is very important. It determines that you can customize your Kernel. When you use menuconfig, some options will be listed.) The specific things are somewhat complicated. The following provides methods that do not require manual Configuration:Cp/boot/config-'uname-R'./. config(Use your current Kernel configuration to set the new kernel) then make menuconfig, enter an interface, and then load ...... Then save ...... Then exit
7.MakebzImageCompile the kernel. (about 15 minutes)
8.MakemodulesCompile the module. (1 hour or longer)
9.Makemodules_installInstallation Module
In this case,/lib/modules/should generate a new KERNEL_VERSION file.
10. generate a new kernelMake install
Put the compiled kernel into/boot, copy vmlinuz and System. map to the/boot directory, and create related links.
11. Complete the final work
First, generate initrd. img.
Mkinitramfs2.6.38.8-o/boot/initrd. img-2.6.38.8
If the system prompts that mkinitramfs is not installed,Pt-get install mkinitramfs
Then modify the boot program file grub. cfg.
Update-grub
Do not manually modify the grub. cfg file.
12. Restart your computer
Reboot
Then select your new kernel on the grub boot Interface
After reading so much, we finally completed simple kernel compilation, which is a little trivial, but each step is clearly verified. In fact, this is a relatively lazy way, about the kernel option configuration and kernel image and System. copy map to/boot/, and rename your Linux kernel. As for the commands used, there is not much explanation. You need to check the information for further understanding.
Linux Kernel: Click here
Linux Kernel: Click here
Reading:
Linux Kernel will replace iptables http://www.linuxidc.com/Linux/2013-10/91727.htm with nftables
Linux 3.12 codenamed Suicidal Squirrel http://www.linuxidc.com/Linux/2013-09/90023.htm
How to install Linux 3.11 kernel http://www.linuxidc.com/Linux/2013-09/89674.htm on Ubuntu
Ubuntu 13.10 (Saucy Salamander) Kernel has been upgraded to Linux Kernel 3.10 RC5 http://www.linuxidc.com/Linux/2013-06/86110.htm
Linux Kernel 3.4.62 LTS is now available to download the http://www.linuxidc.com/Linux/2013-09/90368.htm
How to install Linux kernel 13.10 http://www.linuxidc.com/Linux/2013-11/92930.htm on Ubuntu 3.12
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2