LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
LinkBack Search this Thread
Old 12-15-2007, 02:13 PM   #1
JediDrunk
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, 03:33 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi.

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).

Dave
 
Old 12-15-2007, 03:50 PM   #3
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,527

Rep: Reputation: 147Reputation: 147
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, 06:31 PM   #4
JediDrunk
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, 06:46 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,821

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

Rep: Reputation: 16
Quote:
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.

HTH
peart.

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


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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


All times are GMT -5. The time now is 10:29 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration