[SOLVED] how to save needed modules config to create .config > compiled into kernel
SlackwareThis Forum is for the discussion of Slackware Linux.
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
how to save needed modules config to create .config > compiled into kernel
I am running a server with a GRSecurity patched Kernel 2.6.32.36. I've tried to optimize the kernel as much as I can and know it (removing options, not needed drivers and so on) and compiled the modules into the kernel (no loadable modules anymore). I've started with Slackware 13.0 and the default config for 2.6.29.6-huge. Still I am not sure what to remove/optimize further now.
My question: Is there a way to boot with a kernel with loadable modules, check which modules are really needed for this hardware, (do something like lsmod) and save the running configuration modules for a next kernel compile to be the default .config instead of writing them down by hand and search for the appropriate names in .config or during menuconfig? (Note: zcat /proc/config.gz > .config is NOT the way I want, as it gives me just the current kernel config)
Does it mean only the really needed modules of this hardware are enabled only? How is it with modules which may be loaded during runtime, if there are any? or does it also depend on the services?
I run apache, sshd, postfix, dovecot on reiserfs, but I do not understand for example the whole CAN-bus, watchdog,not really needed USB-driver things...
mh, as far as I know localmodconfig configures for the modules which are yet loaded, this means you'll have to force all modules to be loaded before running the command. For example every possible hardware has to be connected (printer or other USB-devices).
I'm not sure if the so created .config file can be used without further configuration. But it seems to be way faster than removing every not needed module by hand from the stock configuration (which takes many hours).
thanks I know the CAN bus in its meanings, but looking at kernel configs, I don't know what my machine really needs these options for (btw I drive a car with FlexRay )
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.