Centos5.1 kernel compilation 2.6.24.5 Summary-Linux general technology-Linux programming and kernel information. The following is a detailed description. The entire compilation of the kernel has been referenced in many articles. Since I have compiled the kernel on the vm, the process is also quite long. Later, I had to create a snapshot without repeating the same steps.
Now we compile the 2.6 kernel, which is basically the same as the previous 2.4 kernel. However, the best processing is much simpler, and a single command solves many previous steps.
After compilation, you can start two kernels at the same time. In this case, if a new kernel has a problem, the old kernel can be started.
I just saw a document and divided the kernel compilation into five steps.
Five Things are required to install the Linux kernel.
1. Obtain the source code.
2. Set the code
3. Compile the code
4. Install the target code
5. Configure the boot loader. (GRUB will automatically load)
You need to answer hundreds of questions during the entire process to generate a configuration file for compiling the kernel. This is a headache. You can use defconfig to save the trouble.
7: make dep
[Root @ centos5 linux] # make dep
Scripts/kconfig/conf-s arch/x86/Kconfig
* ** Warning: make dep is unnecessary now.
8: make clean
9: make bzImage
10: make modules
11: make modules_install
This will put the kernel built in the previous step into a sub-directory of the module:/lib/modules/your_kernel_version
12: make install,
This will put the compiled kernel into/boot. The boot file is updated.
13: Edit/boot/grub. conf
Comment out hildenmenu
The above is the entire process of compiling the kernel.
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.