Download linux-2.6.29.4.tar.bz2 to/usr/src
#Wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.27.tar.bz2
# Tar-jxvf linux-2.6.27.tar.bz2
# Cd linux-2.6.27
# Make mrproper
# Make menuconfig
# Make clean
# Make bzimage
# Make modules
# Make modules_install
# Mkinitrd/boot/initrd_2.6.27.img 2.6.27
When the message "No module DM-Mem-Cache found for Kernel 2.6.27, aborting." is displayed when the mkinitrd command is executed, it indicates that the mkinitrd version has a bug.
Solution: 1. When using mkinitrd, use the "-without-dmraid" parameter. 2. Create a noraid file before using mkinitrd. The creation method is as follows:
#Echo "dmraid = No">/etc/sysconfig/mkinitrd/noraid
# Chmod 755/etc/sysconfig/mkinitrd/noraid
Then run the mkinitrd command.
Here I use the first method.
#Mkinitrd/boot/initrd-2.6.27.img 2.6.27-without-dmraid
After mkinitrd is executed, you need to add the compiled kernel information in the Startup menu so that you can select the kernel version during startup.
#Cp arch/x86/boot/bzimage/boot/vmlinuz-2.6.27
# Cp system. MAP/boot/system. Map-2.6.27
Open the/etc/grub. conf file and add the following content to the end of the file.
Title centos (2.6.27)
Root (hd0,0)
Kernel/vmlinuz-2.6.27RO root = label =/
Initrd/initrd-2.6.27. Img
Save, restart, and select "centos (2.6.27)" from the grub Startup menu to use the compiled kernel.
If you think the steps after make modules_install are too troublesome, you can directly use the following command to make the system ready for you.
#Make install
The following is the prompt message during running:
SH/usr/src/Linux- 2.6 . 27 /ARCH/x86/boot/install. Sh 2.6 . 27 ARCH/x86/boot/bzimage System . Map "/Boot"
Warning: No Module DM-Mem-Cache found For Kernel 2.6 . 27 , Continuing anyway
Warning: No Module DM-message found For Kernel 2.6 . 27 , Continuing anyway
Warning: No Module dm-raid45 found For Kernel 2.6 . 27 , Continuing anyway
These are just tips, which have no impact on the system. I will check the relevant information.
It may be a bug in the kernel and mkinitrd. You can refer to this article.Article
Https://bugzilla.redhat.com/show_bug.cgi? Id = 488991
By applying a dm-raid45 patch to the kernel, the tip "Warning: No module dm-raid45 found for Kernel 2.6.29.4, continuing anyway" can be solved.
Http://people.redhat.com /~ Heinzm/SW/dm/dm-raid45/
As for the other two, there is still no solution. I hope you will know, leave a message for me!
Thank you!