Download linux-2.6.29.4.tar.bz2 to/usr/src # wgethttp: // rewrite
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.27 ro 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.
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!