In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "how to compile and install a new kernel under CentOS 5.5", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn how to compile and install a new kernel under CentOS 5.5 "this article.
Step 1: download the kernel
Portal: address. The author downloaded version 3.2.84.
Step 2: decompress and compile the kernel
Since I downloaded the .tar.xz file, I cannot extract it directly with the tar command.
1. There is no xz decompression software in my system. Download the xz-5.0.3.tar.bz2 file and unzip the installation first.
Tar-jvxf xz-5.0.3.tar.bz2 cd / opt/xz-5.0.3 # enter the unzipped folder. / configuremakemake install
two。 Decompress the kernel
Xz-d linux-3.2.84.tar.xztar-xvf linux-3.2.84.tar
3. If you are compiling the kernel for the first time, there are no last remaining files to skip this step (it is best to take a closer look at the function corresponding to the instruction)
Make mrproper make clean removes most of the compiled build files, but retains the kernel configuration file .config, and there is enough compilation support to build the extension module make mrproper to delete all compiled build files, as well as kernel configuration files, plus various backup files deleted by make distclean mrproper, plus editing backup files and some patch files.
4. Build the environment needed to compile the kernel
Yum-y install gccyum install ncurses ncurses-develyum install openssl-devel
5. Go to the kernel decompression folder to configure kernel parameters
Because I am a rookie can not choose, for convenience, directly use the make localmodconfig command, this command is based on the original .config file to select, you can refer to the paper: embedded linux system cutting optimization and testing technology. And then I went back to the car until it was over. Then enter the make menuconfig command to enter the drawing selection menu, and change the Sample.. in kenel hacking Remove the option (which one I forgot, embarrassed) and exit the save. Then edit the "CONFIG_SYSFS_DEPRECATED" in the .config file, which defaults to not set, and if it is commented out, change it to y, that is, to "CONFIG_SYSFS_DEPRECATED=y", and may have to modify it later.
6. Compile a new kernel
Make bzImage & & make modules & & make modules_install
7. Install the kernel
8. What may happen when compiling and installing
There should be no problem, but it doesn't rule out the following: make: warning: clock error detected. Your creation may be incomplete. Solution: find. -type f-exec touch {}\; just recompile it.
9. Deal with the things in img (I don't know =)
1) decompress the initrd file
# cp / boot/initrd-3.2.84.img / tmp# cd / tmp/# lsinitrd-2.6.30.4.img# mkdir newinitrd# cd newinitrd/# zcat.. / initrd-2.6.30.4.img | cpio-I
After the release, you will see the following
# lsbin dev etc init lib proc sbin sys sysroot
2) Edit init, delete two of the four duplicate lines echo "Loading dm-region-hash.ko module" insmod / lib/dm-region-hash.ko echo "Loading dm-region-hash.ko module" insmod / lib/dm-region-hash.ko 3) repackage initrd
# find. | | cpio-c-o >.. / initrd11538 blocks# cd.. # gzip-9 |
< initrd >Initrd.img# lsinitrd-2.6.30.4.img initrd initrd.img
The initrd.img in this is the repackaged file. 4) copy initrd.img to / boot and issue the following command: # cp initrd.img / boot 5) modify grub.config and change initrd-3.2.84.img to initrd.img under the / etc folder. 6) restart reboot and remember to choose your own kernel! Don't miss it!
These are all the contents of this article entitled "how to compile and install a new kernel under CentOS 5.5". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, 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.