LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to Install kernel (RPM) (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-install-kernel-rpm-389462/)

iansoundz 12-05-2005 10:24 AM

How to Install kernel (RPM)
 
Hello,

I am using CentOS 4.1. I have downloaded kernel-2.6.9-22.EL.rpm. I am currently using kernel-2.6.9-11.EL.

Is installing this new kernel as simple as:

rpm -ivf kernel-2.6.9-22.EL.rpm? What other steps are involved? I would think that there should be a "make xconfig" involved, make dep, make bzimage, create symbolic links, edit grub. etc , but nothing I have read about installing kernel rpms mention this as part of the process. Also, will installing the rpm create the usr/src/linux-2.blah directory tree? This is the only reason I am doing this BTW. My distro did not include the kernel source, nor did it include the /usr/src/linux-2.blah directory tree which I need in order to install a custom made module which make depends on. Any help is always appreciated!

GrueMaster 12-05-2005 10:47 AM

There should be two (or more) packages based on this kernel. The binary package should have an i#86 (i386,i586, i686) prior to the .rpm extension (smp will be in the name for multiprocessor binaries), and the source would be in a package labeled kernel-source-<version>.rpm. To install the binary, you should just be able to type "rpm -i kernel-<version>.rpm". This will install the new kernel without removing the existing one (always a good idea). Same with the kernel-source package.

iansoundz 12-05-2005 10:51 AM

So doing this will upgrade the kernel, keeping the same config as used with my previous kernel? Will this create the /usr/src/linux-2.blah directory tree?

mebrelith 12-05-2005 10:54 AM

Actually, if I my memory aint playin tricks at me, the proper syntax would be rpm -Uvh kernel*

jailbait 12-05-2005 11:00 AM

"I would think that there should be a "make xconfig" involved, make dep, make bzimage"

Those steps were all done by the person who created the binary kernel rpm package.

"will installing the rpm create the usr/src/linux-2.blah directory tree?"

No. A different rpm package installs the kernel source.

"What other steps are involved?" "edit grub. etc , but nothing I have read about installing kernel rpms mention this as part of the process."

Different distributions handle kernel updates differently. You should check the documentation from where you downloaded kernel-2.6.9-22.EL.rpm. I would expect that kernel rpm package probably does not edit grub.


------------------
Steve Stites

GrueMaster 12-05-2005 11:06 AM

You DO NOT want to do rpm -Uvh with a kernel. That essentially removes the currently running kernel and replaces it with the new kernel, often resulting in an unstable system. Installing the new kernel with rpm -i will add the new kernel to your environment and (if built properly) add it to your boot configuration. If you are using lilo, you will probably want to rerun lilo to add it to your boot menu (the config file should have already been updated by the rpm). Grub will automatically pick up changes made to it's menu on the next boot. This way when you reboot, if there is a problem, you can always reboot to the previous kernel and fix it.

Here's a link on installing a kernel rpm with more details on why not to use -Uvh: http://www.yolinux.com/TUTORIALS/Lin...pmInstall.html

reddazz 12-05-2005 11:07 AM

When you install new kernel on Redhat/Fedora based distros, the bootloader is automatically configured to boot the new kernel. The old kernel is not uninstalled, you need to do this yourself. When you uninstall the old kernel its grub entry is automatically removed.

iansoundz 12-05-2005 11:48 AM

Jailbait,

You said "No. A different rpm package installs the kernel source." Which package would this be??

reddazz 12-05-2005 12:04 PM

Quote:

Originally Posted by iansoundz
Jailbait,

You said "No. A different rpm package installs the kernel source." Which package would this be??

The kernel-devel package.


All times are GMT -5. The time now is 01:07 PM.