Does recompiling the kernel overwrite the modules ?
Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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?
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.
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?
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.