In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you the solution to the problem of Linux kernel recompilation, which is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Kernel recompilation is a big challenge for many Linux enthusiasts. The author believes that many Linux users often have a misunderstanding about the kernel. They think that ordinary users cannot adjust the kernel. In fact, as far as the actual situation is concerned, this kind of understanding is not comprehensive. It should be said that kernel recompilation is not only a certain depth and complexity, but also a configuration work prone to failure. Now I would like to share my experience with you so that you can take fewer detours.
If you pay attention to the authoritative Linux reference books, you will find that many original books introduce kernel recompilation as a very important chapter. What this article will introduce to readers is not how to recompile the Linux kernel step by step, but to collect and sort out some of the most common failures in Linux kernel recompilation and their solutions. If you encounter similar failures in the process of compiling the kernel, then this article will help you.
Introduction to Common faults of Linux Kernel recompilation
Before introducing the common failures of Linux kernel recompilation, let's assume that we have configured the Linux kernel according to the steps in the reference book.
Recompiling the Linux kernel usually involves many steps. If you are "lucky", Linux kernel recompilation can be successfully compiled at once. If the system has an error message when starting the computer or kernel after the compilation is completed, the following five are most likely to occur: 1. The kernel cannot be started; 2. Exception IPUBO error; 3. The kernel reaction is slow; 4. The kernel cannot be compiled correctly; 5. The system starts repeatedly.
Fault Analysis and its solution
The kernel cannot be started
When we recreate the Linux kernel, the main thing is to select the devices and services that users need or do not need to use in the system. Starting with version 2.0 of the kernel, Linux introduces a new design feature into the kernel and provides a compromise: components can be called in and out of the kernel dynamically and at any time. For example, we all have to restart the system after modifying / etc/lilo.conf, if your kernel does not boot and you see the following message on the screen:
Warning: unable to open an initial console Kernel panic:
No init found. Try passing init= option to kernel
The possibility of this error * * is that we did not correctly provide parameters to the "root=" in / etc/lilo.conf. For example, if there is a configuration like root=dev/hdc5 in a Linux system, then this is wrong, the correct one should be root=/dev/hdc5, and don't underestimate just an extra "/", which is an important parameter provided to root. Without "/", the Linux kernel cannot confirm where the root should be started. Many friends often ignore this small detail and cause kernel boot failure. A list of the correct configurations for / etc/lilo.conf is given below for reference only.
/ etc/lilo.conf example
-
Boot=/dev/hdc5
Map=/boot/map
Prompt
Timeout=50
Image=/boot/vmlinuz-2.2.2-1
Label=Linux
Root=/dev/hdc5
Inirtd=/boot/initrd-2.2.2-1.img
Read-only
Other=/dev/hda1
Label=dos
Table=/dev/hda
Exception Icano error
If you recreate a Linux kernel and boot correctly, the system often crashes and crashes while using the new kernel. Then it is very likely that there is something wrong with ICompo. In addition to causing frequent and inexplicable failures in the system, the abnormal iPink O will also degrade the Linux kernel, resulting in a serious decline in the whole system.
The reason for the exception iUnip O error is that the user did not perform the "make dep clean" step at the end of compiling the Linux kernel. Generally speaking, we do not include the "make dep clean" step when saving "menuconfig" or "xconfig" in the Kernel configuration option. Therefore, it is recommended that users make sure that the "make dep clean" step has been taken when saving the Kernel configuration option after the configuration.
The kernel reacts slowly
At present, many computers use high-speed CPU and large-capacity memory. But sometimes after the creation of a new kernel, the system appears to be much slower than it was before the kernel was configured. When this happens, it is likely that the user chose too many options in "menuconfig" or "xconfig" when modifying the Kernel configuration options. This not only makes the computer spend more time when compiling the new kernel, but also makes the system take up too much memory when working. Because a lot of memory is occupied by useless options, this causes the system to run slowly. The solution is very simple, try to choose the options we need, those useless, too complex options do not need to be modified, sometimes the use of default parameters will be better.
The kernel cannot be compiled
When the user types "make bzImage modules" and presses the input key, the kernel does not compile or other strange phenomena occur. The way to * at this point is to restart the system and then use the "rpm-e" command to remove Kernel configuration tools, the kernel configuration tool. Then reinstall the tool (use the "rpm-I" or "rpm-Uvh" command to install it). If it is installed correctly, the problem is much easier, and reconfiguring the kernel and recompiling should succeed at this point. If you still cannot compile the kernel, check to see if there is a problem with the hardware.
The above is the solution to the Linux kernel recompilation problem. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.