LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-08-2010, 11:43 PM   #1
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Rep: Reputation: 55
How do I install a kernel from the RPM?


How do I install a kernel from the RPM?

I tried with rpm -ivh, and its says it installed it, but it doesn't add anything to /etc/grub.conf, and it doesn't add an files to /usr/src/kernels.

TIA

Code:
[root@l ~]# rpm -ivh kernel-2.6.18-194.11.1.el5.src.rpm 
warning: kernel-2.6.18-194.11.1.el5.src.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
   1:kernel                 ########################################### [100%]
[root@l ~]# cat /etc/grub.conf 
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/sda5
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-194.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-194.el5 ro root=LABEL=/
        initrd /initrd-2.6.18-194.el5.img

[root@l ~]# ll /usr/src/kernels/
total 8
drwxr-xr-x 19 root root 4096 Sep  6 10:20 2.6.18-194.el5-x86_64
 
Old 09-09-2010, 01:06 AM   #2
mjuhannus
Member
 
Registered: Sep 2004
Location: Finland
Distribution: Ubuntu 10.04, Debian 5, OpenSUSE 11.3
Posts: 60

Rep: Reputation: 15
You have kernel source package, not a compiled one. kernel-2.6.18-194.11.1.el5.src.rpm.

Either you have compile the source yourself, or get the right package.
 
Old 09-09-2010, 01:35 AM   #3
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
A bit more information about your system would have been helpful...

In KDE (and possibly Gnome) open the file manager (Konqueror) and click on the rpm -- OpenSuSE then installs everything properly. The rpm command per se is not aware of /boot/grub/menu.lst.
 
Old 09-09-2010, 04:14 AM   #4
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
Well you only installed the source code and it should be someplace in /usr/src/redhat/SOURCES.
The rpm should not have something like kerne_xxx.src.rpm, it should be similar to this: kernel-2.6.18-194.11.3.el5.rpm, without "src" which means source code.
 
Old 09-09-2010, 04:15 AM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
"kernel-2.6.18-194.11.1.el5.src.rpm " besides being a SRC -not compiled SOURCE CODE only rpm it is also OLD and NOT the current

2.6.18-194.11.3.el5.centos.plus is the current
if what you want is the kernel source to build a kmod then use yum
Code:
yum install kernel-devel
yum update
reboot seeing as a new kernel will have been installed
 
Old 09-09-2010, 06:54 AM   #6
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by robertjinx View Post
Well you only installed the source code and it should be someplace in /usr/src/redhat/SOURCES.
The rpm should not have something like kerne_xxx.src.rpm, it should be similar to this: kernel-2.6.18-194.11.3.el5.rpm, without "src" which means source code.
Thanks!

I assumed it compiled it automatically and also put the source files on the box.
 
Old 09-09-2010, 06:54 AM   #7
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by John VV View Post
"kernel-2.6.18-194.11.1.el5.src.rpm " besides being a SRC -not compiled SOURCE CODE only rpm it is also OLD and NOT the current

2.6.18-194.11.3.el5.centos.plus is the current
if what you want is the kernel source to build a kmod then use yum
Code:
yum install kernel-devel
yum update
reboot seeing as a new kernel will have been installed
yum won't work, because this server is not directly connected to the Internet.

Last edited by abefroman; 09-09-2010 at 06:57 AM.
 
Old 09-09-2010, 06:56 AM   #8
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Original Poster
Rep: Reputation: 55
I downloaded the kernel from here:
http://mirror.centos.org/centos/5.5/...s/x86_64/RPMS/
and it worked.

Code:
[root@l ~]# rpm -ivh kernel-2.6.18-194.11.3.el5.x86_64.rpm 
warning: kernel-2.6.18-194.11.3.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing...                ########################################### [100%]
   1:kernel                 ########################################### [100%]
[root@l ~]# cat /etc/grub.conf 
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/sda5
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-194.11.3.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-194.11.3.el5 ro root=/dev/sda5
        initrd /initrd-2.6.18-194.11.3.el5.img
title CentOS (2.6.18-194.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-194.el5 ro root=LABEL=/
        initrd /initrd-2.6.18-194.el5.img
 
Old 09-09-2010, 07:14 AM   #9
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
Now that is interesting. SuSE doesn't do changes in menu.lst when you insert a kernel via rpm. Must be a RedHat / anaconda trick. Good for you, saves work .
 
Old 09-09-2010, 07:15 AM   #10
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by JZL240I-U View Post
Now that is interesting. SuSE doesn't do changes in menu.lst when you insert a kernel via rpm. Must be a RedHat / anaconda trick. Good for you, saves work .
Gotta love redhat
 
Old 09-09-2010, 07:16 AM   #11
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
Well, in SuSE you use
Code:
yast -i <kernel.rpm>
Then you may love Susie as well .
 
Old 09-09-2010, 07:29 AM   #12
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Original Poster
Rep: Reputation: 55
hehe
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Install kernel using rpm? Ashkan_s Linux - Kernel 3 05-10-2010 08:20 AM
How to Install kernel (RPM) iansoundz Linux - Newbie 8 12-05-2005 12:04 PM
what is the rpm parameter for kernel install baronlynx Linux - Newbie 2 02-24-2004 09:34 AM
Ok, dumb question. If I install a Mandrake kernel RPM, where does it install to? Kramer Linux - General 6 01-13-2004 09:39 PM
Arjan's 2.6 kernel in RPM ...how to install? svarreby Fedora 5 01-13-2004 06:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration