LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-12-2003, 04:35 PM   #1
Pisces107
Member
 
Registered: Dec 2003
Distribution: Slackware Current, Gentoo , Debian SID
Posts: 90

Rep: Reputation: 15
How to install kernel-source files? (v 2.4.22)


I have Redhat 8 installed with kernel version 2.4.18.
I want to upgrade to kernel version 2.4.22. I found a thread by Thetargos, but, it tells how to install JUST the kernel, and NOT the kernel-source.

I downloaded the kernel rpm and the kernel-source rpm form Redhat site. I could install the kernel itself, but, when I install the kernel-source (size is about 33mb), I'm not sure if it gets installed or not, but at least 'rpm -qa | grep kernel' doesn't show the kernel-source to be installed (even after reboot).

why I'm emphasizing on installing the source is, my MODEM(BCM v.90)! I, successfully installed my MODEM by following a howto here on 'Linuxquestions.org'. But, with my kernel updated to 2.4.22, it stops working(not recognized by new kernel?), and if I have to follow that same howto to install for the new kernel, I need the kernel-source files installed for the 2.4.22.

So, my questions are:

1. Since I'm newbie to Linux, is there an easy-to-follow step-by-step working way to install kernel-source?

2. I have downloaded a 'linux-2.4.22.tar.bz2' (28mb) file off the 'kernel.org', and also two files from Redhat: 'kernel-2.4.20-24.8.src.rpm' (33mb) and 'kernel-2.4.20-24.8.i686.rpm' (13mb) -- (Redhat lags behind the version), which file to go with for kernel-source and/or kernel itself?

3. Can I install kernel-source files without instlaiing kernel of the same version ( I know the other way round works)?

Thanks.
 
Old 12-12-2003, 05:49 PM   #2
vladkrack
Member
 
Registered: Oct 2002
Location: Curitiba - Brazil
Distribution: Conectiva
Posts: 334

Rep: Reputation: 30
Re: How to install kernel-source files? (v 2.4.22)

Quote:
Originally posted by Pisces107
1. Since I'm newbie to Linux, is there an easy-to-follow step-by-step working way to install kernel-source?
Just instaling it with rpm -ivh kernel-2.4.20-24.8.i686.rpm should work, but usualy it does requires the kernel-headers of the same version ...

Quote:
2. I have downloaded a 'linux-2.4.22.tar.bz2' (28mb) file off the 'kernel.org', and also two files from Redhat: 'kernel-2.4.20-24.8.src.rpm' (33mb) and 'kernel-2.4.20-24.8.i686.rpm' (13mb) -- (Redhat lags behind the version), which file to go with for kernel-source and/or kernel itself?
Its better to install the src.rpm that is the source of your kernel, that has the Red Hat patches included ...

Quote:
3. Can I install kernel-source files without instlaiing kernel of the same version ( I know the other way round works)?
It should work too, but it will not work using the module of your modem compiled with a different kernel version that the one you are using.

Hope that helps...
 
Old 12-12-2003, 06:03 PM   #3
Pisces107
Member
 
Registered: Dec 2003
Distribution: Slackware Current, Gentoo , Debian SID
Posts: 90

Original Poster
Rep: Reputation: 15
yes,I tried instaling it with 'rpm -ivh kernel-2.4.20-24.8.i686.rpm' , but like other rpm installs, it doesn't endup with successfull install message, and all I could see ( after searching through files) are lots of the " .patch " files in /usr/src/redhat/SOURCES (i'm in windows right now, so the path might be short of a directory or two). donno what to do with those patch files.
but one thing for sure, kernel-source doesn' get installed, coz it doesn't show up in the 'rpm -qa' query (the only way to know the installed rpms?).

what sould I do? anymore help.....
 
Old 12-12-2003, 06:56 PM   #4
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394

Rep: Reputation: 30
Source packages are never marked as 'installed', nor registered in the repository (i think this is in rpm manpage). There are reasons for this that i dont remember
Usually kernel sources go under /usr/src/linux.
About the patch, I suppose there is a makefile to automatically apply them and compile...
Still I don't fully understand why you need the sources, unless you have to enable some unusual hardware support...
BTW, there's a serious security issue about 2.4.22, see here:
http://www.linuxquestions.org/questi...hreadid=122021
 
Old 12-12-2003, 07:25 PM   #5
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,187

Rep: Reputation: 53
you can extract that tarball with tar jxvf filename.tar.bz2
be in /usr/src when you do that, and make a symlink to
the directory called linux
cd /usr/src
tar jxvf /home/pisses107/linux-2.4.22.tar.bz2
rmdir linux
ln -s linux-2.4.22 linux
cd linux
make menuconfig


those are just guesses of course.
 
Old 12-13-2003, 08:56 PM   #6
Pisces107
Member
 
Registered: Dec 2003
Distribution: Slackware Current, Gentoo , Debian SID
Posts: 90

Original Poster
Rep: Reputation: 15
ac1980, I want sources installed coz of my modem (BCM v.90) and here I have only dial-up access. and the way my modem could work for upgraded kernel is to have sources installed.

ok i'm going to have 2.4.23 (as .22 has bug(s) ). but whatsnard, or anyone can tell me how to install it (whatsnard, is that all i have to do to install, which you described? ) ...and would it contain the sources too? (it's size is 29,134kb).

appreciate your help.
 
Old 12-13-2003, 09:46 PM   #7
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,187

Rep: Reputation: 53
that modem software wants your kernel source installed because it's
going to use it to compile a module or 2. those modules most likely
will not work with your current running kernel.
the last command i put up
make menuconfig
starts the kernel configuration process. there is a lot to do from there.
get a kernel compilation howto if you want to do that.
 
Old 12-15-2003, 08:42 PM   #8
Pisces107
Member
 
Registered: Dec 2003
Distribution: Slackware Current, Gentoo , Debian SID
Posts: 90

Original Poster
Rep: Reputation: 15
ok, i "succeeded" in booting from new kernel by removing " ro root=LABEL=/' from the kernel arguments in grub.conf but now i get modprobe couldn't find modules for USB OHCI/UHCI etc and hence my USB optical mouse is not working anymore. the strange thing is, it popped up a configuration change message & asked me if i wan to "keep/remove/do nothing" with the Logitech USB mouse config. when i chose to remove, the mouse still worked but it was like real slow in responding to clicks. but the second time around when i booted again, it altogether disabked the mouse. and also my x server configuration was changed.

other problem: when i logged into my old kernel (2.4.18) , it asked about the USB mouse configuration and also about the X server config. what it looks like is if both kernel versions are using the same modules i don't know) or what?

does anybody have any idea why my USB devices are not workingand it is spitting out errors of US OHCI, UHCI modules compalints.....whereas, i have selected those nodules during my kernel config.

how to make these two kernel versions not to use the same modules(if they are using) and is there a way for me to undo/un-install the upgraded kernel and do the kernel-recompile ?

i'm a newbie and i'm almost there to my first successful kernel compile, if i can got rid of the USB and x server config errors.

thanks in advanc and i hope people here would make my migration from Windows to Linux easy for me.

thanks.
 
Old 12-15-2003, 11:04 PM   #9
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,187

Rep: Reputation: 53
modules only work with the kernel they were compiled with. the new kernel would
be using the old kernel's modules if they are the same kernel version. that wouldn't
work. to have the new kernel work, you need to have compiled the kernel modules
and installed them too.
make sure thats what you want to do, cause to install them, they will overwrite your
old ones.
it's
make modules
make modules_install
from the same place as you compiled the kernel.

you could fairly easily get the kernel and modules from your slakware install cdrom
and install them over if you wish.
 
Old 12-16-2003, 03:29 PM   #10
Pisces107
Member
 
Registered: Dec 2003
Distribution: Slackware Current, Gentoo , Debian SID
Posts: 90

Original Poster
Rep: Reputation: 15
thanks whansard, i did follow the procedure for compiling the kernel including
make modules
make modules_install

where would i have gone wrong?

is there a way i can find out out which kernel version is using which modules, i-e to see if both the kernel versions ( 2.4.18 and 2.4.23) are using modules of their own version.

and if they are using the same modules (possible?) then how can i make them use their own mods?

specifically, i'm having problems with x server config and my USB mouse. startup says, modprobe couldn't find/load USB ohci/UHCI modules and couldn't load my USB mouse. so the new kernel startsup WITHOUT mouse.

and when i go back and start the older kernel, it reconfigures the mouse and the settings which get changed in the new kernel ( display resolution, depth) are changed in the current/old kernel too. which makes me think that both the kernels using same modules/settings.

any help....?
 
Old 12-16-2003, 04:17 PM   #11
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,187

Rep: Reputation: 53
the kernel modules are in /lib/modules/<kernel version>.
a kernel of a certain version will only look under it's directory
for modules, so 2.4.18 will not use modules of 2.4.23 and 2.4.23
will use use 2.4.18's.

what is happening is that you didn't get proper support set up for your
usb mouse under kernel 2.4.23. whenever you boot a different kernel,
your hardware setup notices that the mouse it has set up doesn't work,
so it tries to set it up for you. i think you're going to have to mess with
your kernel config some more and recompile a few more times to
get the stuff working.
 
Old 12-16-2003, 08:45 PM   #12
Pisces107
Member
 
Registered: Dec 2003
Distribution: Slackware Current, Gentoo , Debian SID
Posts: 90

Original Poster
Rep: Reputation: 15
long way to go ... :-)

if that's the way to overcome linux problems, i'm more than willing to go through series of kernel compiles. just a few days ago, i didn't how to compile...but now i can go through this process more comfortably ...and...in fixing the problems i have, i would have kerenl-compile on my finger tips (really?) ..:-)

thanks, wansard...i'll be posting after a couple of more compiles and trying out different settings for my USB devices.

thanks.
 
Old 12-17-2003, 07:34 AM   #13
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,187

Rep: Reputation: 53
you should probably get a usb howto, and make sure you have the proper
kernel configuration stuff checked. i''m sure somebody has a list of the
things you need checked somewhere.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Please lead me by the nose to kernel source files? dianna Linux - Newbie 4 07-09-2005 02:58 PM
kernel source files missing !! rpb Linux - Software 4 04-27-2005 02:34 AM
Where in source files does it tell where it will install? ginda Linux - Newbie 3 01-31-2005 10:00 PM
need to install kernel source files (mandrake 10) in console lostlyre Linux - Software 2 04-02-2004 04:45 PM
Mandrake 8.1 need help in getting Kernel source files CorpChAoS Mandriva 2 01-19-2004 05:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:23 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration