LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-09-2011, 04:46 AM   #1
wargus
Member
 
Registered: Mar 2010
Location: Switzerland
Distribution: Slackware
Posts: 98

Rep: Reputation: 23
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)

Thanks,
 
Old 04-09-2011, 04:59 AM   #2
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Hi,

there are two ways.
1. copy the old .config to the new kernelsources and execute
Code:
make oldconfig
2. using
Code:
make localmodconfig
adapts the kernel to the yet loaded modules.
You may want to read the README-file in the rootdirectory of the kernelsources.

Markus

Last edited by markush; 04-09-2011 at 05:00 AM.
 
1 members found this post helpful.
Old 04-09-2011, 05:05 AM   #3
wargus
Member
 
Registered: Mar 2010
Location: Switzerland
Distribution: Slackware
Posts: 98

Original Poster
Rep: Reputation: 23
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...


Last edited by wargus; 04-09-2011 at 05:06 AM.
 
Old 04-09-2011, 05:11 AM   #4
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
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).

Markus
 
1 members found this post helpful.
Old 04-09-2011, 05:13 AM   #5
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,810

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
Quote:
Originally Posted by wargus View Post
I do not understand for example the whole CAN-bus
http://en.wikipedia.org/wiki/Controller_area_network
 
1 members found this post helpful.
Old 04-09-2011, 05:22 AM   #6
wargus
Member
 
Registered: Mar 2010
Location: Switzerland
Distribution: Slackware
Posts: 98

Original Poster
Rep: Reputation: 23
Quote:
For example every possible hardware has to be connected (printer or other USB-devices)
Ok so it seems to be what I wanted. I'll try it out

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 )
 
  


Reply



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
What config option needed for usb wifi rt2x00 modules? wufo Slackware 4 01-06-2010 07:05 AM
config file for kernel-modules? gnashley Slackware 8 09-04-2008 03:13 AM
getting config from compiled kernel grayFalcon Linux - Software 2 07-26-2006 03:43 AM
REDHAT 6.2 config / modules : usb storage, wired network, x config audan Linux - Hardware 2 02-18-2006 05:23 PM
help Compiled kernel destroyed system-config-packages database bvknapp Fedora 1 03-03-2005 11:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:21 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
Open Source Consulting | Domain Registration