# General Kernel Configuration...where to go for help?

## cazort

I've been building my own kernels for about five years now and I still feel like I don't know what I'm doing.  Yes, the kernels work fine, but I wished I knew more what I was doing.  It usually takes me 5-10 builds of trial and error before I get a working kernel that supports my hardware.

In particular...there are dozens of kernel options that I have no clue whether to say "yes" or "no" to.  When I type these kernel options into google, I often get very few hits, and the hits are usually people just posting working kernel configs.

I usually just follow the directions in the kernel help, but often the directions are extremely sparse, and many options don't have the "If you don't know what you're doing, say Y" or "say N" thing that I find oh-so-helpful.

So...what's some advice...where does someone like me, with a fair amount of experience and time on my hands, go, to move from being a clumsy kernel compiler towards being an expert user who really knows with confidence what to choose when building a kernel and maybe takes only 2 or 3 rebuilds to get a working kernel, and isn't enabling lots of options in the kernel that I don't need?

BTW I've already found/read these:

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=7

http://www.gentoo.org/doc/en/gentoo-kernel.xml

http://gentoo-wiki.com/HOWTO_Compile_a_Kernel_Manually

Thanks for any advice or pointers of places to go.

----------

## skellr

/usr/src/linux/Documentation/ Is a good place to find quick answers.

----------

## infernus

That's what I was gonna say.. Just check for a doc file on each feature you are unsure of (most have one). And also, you can check for a little bit more info here:

http://www.linuxdocs.org/HOWTOs/Kernel-HOWTO-4.html

I have a question.. why not just use genkernel with a previously working config and go from there with menuconfig? Check this out:

http://gentoo-wiki.com/Kernel/genkernel

Works For Me

----------

## cyrillic

About 90% of what I need to know to compile a perfect kernel comes from the output of "lspci", because selecting which drivers go with what hardware is usually straightforward.

The remaining 10% is mostly personal preference, deciding which scheduler or filesystems to use, deciding what parts to make modular and what parts to compile in, etc.

BTW, You shouldn't aim for a working kernel in 2 or 3 tries.  Have confidence, and build it right on the first try, then you will be an expert.   :Wink: 

----------

## infernus

 *cyrillic wrote:*   

> About 90% of what I need to know to compile a perfect kernel comes from the output of "lspci", because selecting which drivers go with what hardware is usually straightforward.

 

Also try "lshw" (emerge -av lshw) for some really really detailed results.

----------

## cazort

Thanks peoples!

----------

## krinn

on a side note many people don't think/know that kernel config from an old kernel can be import in a newer kernel to keep up good previous settings simply by compying the .config to your new kernel. Running make config and kernel setup will only ask for new options from the new kernel.

For me, it's the fastest way to upgrade a kernel.

"make help" also, many options there can save time like the ones to autoconfigure kernel to all Yes or modules...

----------

## RedSquirrel

 *krinn wrote:*   

> on a side note many people don't think/know that kernel config from an old kernel can be import in a newer kernel to keep up good previous settings simply by compying the .config to your new kernel. Running make config and kernel setup will only ask for new options from the new kernel.
> 
> For me, it's the fastest way to upgrade a kernel.

 

More info here (especially section #10):

http://www.gentoo.org/doc/en/kernel-upgrade.xml

 *krinn wrote:*   

> "make help" also, many options there can save time like the ones to autoconfigure kernel to all Yes or modules...

 

... or random values.  :Twisted Evil: 

Edit: As mentioned above, lspci is helpful. It has some handy options, for example:

lspci -k

lspci -vv

----------

