LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   rpm -qa | grep kernel gives wrong kernel version (https://www.linuxquestions.org/questions/red-hat-31/rpm-qa-%7C-grep-kernel-gives-wrong-kernel-version-205793/)

markelo 07-16-2004 07:29 AM

rpm -qa | grep kernel gives wrong kernel version
 
Here is the story. Installed Red Hat linux 9. Then compiled custom kernel 2.6.7 from kernel sources and make it somewhat work with Red Hat linux 9.

uname -r gives 2.6.7_a which is my customized kernel but
rpm -qa | grep kernel gives
kernel-pcmcia-cs-3.1.31-13
kernel-2.4.20-20.9
kernel-2.4.20-28.9
kernel-2.4.20-18.9
kernel-2.4.20-19.9
kernel-2.4.20-13.9
kernel-source-2.4.20-30.9
kernel-2.4.20-30.9
kernel-2.4.20-8

Then I decided to go to /usr/src/linux-2.6.7_a directory and run
make rpm.

That put files in /usr/src/redhat directory but still didn't fix rpm -qa problem
Should I now go to /usr/src/redhat/RPMS/i386 directory and run
rpm -ihv kernel-2.6.7_a-2.i386.rpm to get correct kernel version number or what would you suggest?

Any information available where that rpm -qa gets its kernel version.

stickman 07-16-2004 07:40 AM

'rpm -qa" is displaying the currently installed RPM on your system. Since you built from source, your current version is not insync with the RPM database. Install the RPM that you built if you want the current version in the DB.

markelo 07-18-2004 03:25 AM

Quote:

Originally posted by stickman
'rpm -qa" is displaying the currently installed RPM on your system. Since you built from source, your current version is not insync with the RPM database. Install the RPM that you built if you want the current version in the DB.
Thanks for information. That helped. Started with init 3 level and went to
Code:

/usr/src/redhat/RPMS/i386
directory and wrote
Code:

rpm -ihv kernel-2.6.7_a-2.i386.rpm
Few more questions

Why
Code:

make rpm
command adds
Code:

-2
to end of file? My kernel should be
Code:

kernel-2.6.7_a
and not
Code:

kernel-2.6.7_a-2
.

Is there a way to make kernel source rpm and install it using rpm from kernel sources ? I tried following
Code:

rpm -ihv kernel-2.6.7_a-2.src.rpm
but it didn't add anything.
What about kernel headers for other application compilation. How kernel headers are build and installed ?

markelo 07-18-2004 09:35 AM

A bit more troubles
I am hitting on
/lib/modules/2.6.7_a/build/include/asm/irq.h:16:25: irq_vectors.h: No such file or directory
error.

/lib/modules/2.6.7_a/build/ is actually link to
/usr/src/redhat/BUILD/kernel-2.6.7_a directory

Path
/usr/src/redhat/BUILD/kernel-2.6.7_a/include/asm
is link to
/usr/src/redhat/BUILD/kernel-2.6.7_a/include/asm-i386
which contains irq.h vile but not irq_vectors.h which is found in
/usr/src/redhat/BUILD/kernel-2.6.7_a/include/asm-i386/mach-default directory

also
/usr/src/redhat/BUILD/kernel-2.6.7_a/include/asm-x86_64
contains irq.h
file but it doesn't have any references to irq_vectors.h file.

Should
/usr/src/redhat/BUILD/kernel-2.6.7_a/include/asm
be link to
/usr/src/redhat/BUILD/kernel-2.6.7_a/include/asm-x86_64
instead of
/usr/src/redhat/BUILD/kernel-2.6.7_a/include/asm-i386

?

And if so why it pointed to wrong directory in first place as it was made by issuing
make rpm command in top dir of kernel source tree.


All times are GMT -5. The time now is 08:42 AM.