Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 12-15-2007, 03:13 PM   #1
LQ Newbie
Registered: Aug 2003
Posts: 29

Rep: Reputation: 15
Question Creating a highly-specialized kernel

I've been playing around with Linux for a few years now and my goal is to have an ultra-lean, specialized kernel for my laptop. I know that most Linux users don't go through the trouble to do this, but I know that there have to be people out there as anal as I. Despite having played around with Gentoo and having perused the LFS documentation, I can't seem to find a source that will tell me how to figure out EXACTLY what kernel configuration is optimal for my system. I realize that no one's going to just tell me how what configuration is optimal for my system... what I'm looking for is guidance on how to do it myself. Thanks ahead of time to anyone who can give me some insight.
Old 12-15-2007, 04:33 PM   #2
Senior Member
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96

There's not much to it. Start from an 'everything off' situation, then just pick the right processor type and add only what you need.

My advice would generally be to compile-in anything that can't be hot-plugged (PCI card drivers, system FS types etc), and compile anything else you need as a module (USB device drivers, FAT32 etc).

Old 12-15-2007, 04:50 PM   #3
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,623

Rep: Reputation: 208Reputation: 208Reputation: 208
Certain things are dependent on the way you use your system, like scheduling. Choosing the right option will require knowledge of the situation when a certain option should be used and a little while of thinking if it fits your case. If you want to know more, I recommends getting a book about general kernel design (doesn't have to be Linux--specific, rather show the basic and more advanced concepts).
Old 12-15-2007, 07:31 PM   #4
LQ Newbie
Registered: Aug 2003
Posts: 29

Original Poster
Rep: Reputation: 15
I guess what I'm really asking is: How do I determine hardware dependencies for my devices?
Old 12-15-2007, 07:46 PM   #5
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 16,212

Rep: Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302Reputation: 2302
Run up Knoppix, and "lsmod".
Good a place as any to start.
Old 12-15-2007, 11:37 PM   #6
Registered: Nov 2003
Distribution: Arch
Posts: 31

Rep: Reputation: 16
Originally Posted by JediDrunk View Post
I guess what I'm really asking is: How do I determine hardware dependencies for my devices?
One thing I did to fully customize my kernel is read the kernel log file (perhaps /var/log/kernel.log, the name changes from one distro to the next). Find a spot in the log where a reboot starts, start reading from there. You might find a module saying something like "exiting, hardware not found". You now know that the module can be left out of your kernel. Just keep on reading, take note of the names of devices that were properly set up.

Since many distros make kernels that enable just about every module, you should have a pretty decent list of hardware+modules when you are done.

I agree with ilikejam about statically compiling more "constant" things, and leaving others as modules. Good advice.

Finally, there is "lspci -vv", and lsusb. They'll give you a good idea of what you need in your kernel.


PS: Expect to fsck up your first few kernels. Keep a working one handy!


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
specialized or a jack of all trades? acid_kewpie General 29 01-03-2008 11:19 PM
Please help me pick a distro for my specialized needs idumych Linux - Laptop and Netbook 3 03-13-2007 05:13 PM
Vim Substitution (specialized) infidel Linux - Software 7 05-07-2005 05:28 PM
Specialized Linux network distributions SSBN Linux - Networking 3 07-04-2003 08:30 PM
Specialized shopping cart system Jasutinsama Linux - General 2 01-11-2001 11:31 AM > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 09:17 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration