LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 07-17-2007, 08:36 PM   #1
ankit4u1
Member
 
Registered: Apr 2006
Distribution: Red Hat, Fedora
Posts: 97

Rep: Reputation: 15
Does recompiling the kernel overwrite the modules ?


Hi,

I want to recompile the kernel. But I am not sure if it overwrites the modules !!!

I have 2.6.16 kernel with RHEL 4. but I want to recompile it to 2.6.11 as I need that, because I need to patch it and the patch is available for 2.6.11 only.

so, should I go ahead with recompiling? Is it advisable? will the modules be over written?

Thanks in advance.

Cheers,
~Ankit
 
Old 07-17-2007, 08:50 PM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
The modules should go to /lib/modules/$KERNEL_VERSION, so I believe they'd be stored alongside, rather than overwrite, and you should be okay.

However, some patches will apply (maybe with fuzz/offset, but apply) even if they weren't specifically for a certain version, so you could try applying it to a more recent kernel source. I can't say whether that would be more or less desirable, but it's a possible alternative.

As yet another possibility, if you know your hardware and it doesn't often change, you can compile a static kernel with no modules, though everything's set up to expect modules, so that's definitely swimming against the current.
 
Old 07-17-2007, 09:05 PM   #3
ankit4u1
Member
 
Registered: Apr 2006
Distribution: Red Hat, Fedora
Posts: 97

Original Poster
Rep: Reputation: 15
I am compiling the kernel. As you said, it did not overwrite the modules. Great !


Quote:
you can compile a static kernel with no modules, though everything's set up to expect modules, so that's definitely swimming against the current
Does this mean that, I should not select any module while compilation !!
When I started the compilation, it showed me the GUI, from where i can select the modules...
Do you mean that I should uncheck all the options?

Plz correct me if I am wrong !! thanks
 
Old 07-17-2007, 09:38 PM   #4
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
No no - if everything's going well for you (and I'm glad it is), then just stick with it.

I just mentioned the alternative method because it makes modules a non-issue. You'd basically go through whatever configuration method you choose and disable kernel support for modules and then, for each config option, you'd either build it in directly or not build it at all. So definitely not uncheck all - just uncheck all unneeded and then make sure all that *are* needed are builtin. The problem is that if you miss anything, it's broken; if you build in anything you don't need, it's wasting resources at all times; and if your hardware configuration changes, your kernel will need to be recompiled to cope with that - and, as I say, system startup scripts and whatnot always assume you have modules to be probed and inserted and so on and get disappointed when they can't. So there are many arguments against it and I probably shouldn't have even mentioned it.
 
Old 07-20-2007, 11:39 AM   #5
ankit4u1
Member
 
Registered: Apr 2006
Distribution: Red Hat, Fedora
Posts: 97

Original Poster
Rep: Reputation: 15
general question about recompilation

Also, during recompilation, there are three options,

module <M>
build-in[*] and
[] excluded

If I want to include some module, which one should i select, module<M> or built-in[*] ??

thanks in advance...
ankit
 
Old 07-20-2007, 12:00 PM   #6
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
If you want to include 'some module' then it has to be 'module' - builtin means it won't be a module and not setting something means it won't be anything at all - but I'm guessing you mean whether it should be a module in the first place.

Basically, it's up to you. When compiling a kernel and not doing a static one (everything builtin), I tend to go on the theory that, if I need it all the time and it's not likely to change, compile it in. If it's something I rarely need or often change, make it a module. Like IDE and ext3 builtin and USB storage and FAT as modules - that sort of thing. Most things should be builtin.
 
Old 07-20-2007, 12:07 PM   #7
ankit4u1
Member
 
Registered: Apr 2006
Distribution: Red Hat, Fedora
Posts: 97

Original Poster
Rep: Reputation: 15
Thanks

I selected M for IPSEC service. But when I do, ipsec --version, it says

Linux Openswan U3.0.06GITGITGIT/K(no kernel code presently loaded)

I also did

modprobe ipsec, then it says
FATAL: Module ipsec not found

So, I started recompilation of the kernel again and changed M to[*] built in for IPSEC and i did

modprobe ipsec again, but without success...Does that mean that module IPSEC is not installed?

That's where is the confusion.....
 
Old 07-20-2007, 12:15 PM   #8
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Well, that's just it - if you build something in, it's not going to produce a module and none of the module tools apply. If it's builtin, then (keeping in mind I don't know anything about ipsec) you should have ipsec capability - it's just that it's not going to be loadable code, so the module tools won't know anything about it.
 
Old 07-20-2007, 12:25 PM   #9
ankit4u1
Member
 
Registered: Apr 2006
Distribution: Red Hat, Fedora
Posts: 97

Original Poster
Rep: Reputation: 15
hmmm....so everything is fine with the recompilation...seems to be some other problem to be sorted out for IPSEC...

frustration setting in now !! spent too many days behind this...

Thanks for the wonderful help !
 
Old 07-20-2007, 01:25 PM   #10
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
You're very welcome! I know the 'burned out' frustrated feeling, too. Sometimes just stepping away for awhile almost sorts the problem out by itself - I've had several problems that seemed impossible and on coming back to them after a break, they seemed almost easy. Or maybe start a new thread specifically on ipsec and somebody who knows about that will pitch in. Good luck.
 
Old 07-20-2007, 01:33 PM   #11
ankit4u1
Member
 
Registered: Apr 2006
Distribution: Red Hat, Fedora
Posts: 97

Original Poster
Rep: Reputation: 15
Thanks !! M starting a new thread after one to two more hours of fight ! lemme scratch my head
 
  


Reply

Tags
kernel, modules, overwrite, recompilation


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
word to the wise: when recompiling same kernel version, watch your /lib/modules/! stabu Slackware 7 04-03-2007 12:07 PM
Error while "make modules" while recompiling the kernel on linux 2.4.21-40ELsmp gaurav_verma22 Red Hat 2 07-19-2006 07:32 AM
forget to install modules after recompiling kernel janos Suse/Novell 3 05-28-2006 08:17 AM
kernel modules when recompiling kernel prozac Linux - General 8 04-13-2006 07:17 AM
recompiling kernel goes fine, problem with make modules fritex Linux - Software 4 11-07-2002 11:17 PM


All times are GMT -5. The time now is 08:51 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration