LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-12-2007, 09:07 AM   #1
Philly2
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Rep: Reputation: 0
Do distros compile the kernel when installing?


Hello!

Im still farely new to linux, and was wondering if it was really worth compiling a custom kernel performance wise. This led me to ask:

- When you install a distribution, does it use a preconfigured kernel with all options, drivers in it, or does it create a kernel containing only your specific hardware information?

I am currently running Ubuntu 6.10.01.

Thanks.
 
Old 01-12-2007, 09:18 AM   #2
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,189

Rep: Reputation: 49
It is a preconfigured kernel basically, not with all the options I guess, but most of them. something like an rpm installation to a ./configure,make,make install method, if you know what I mean.

custom kernel for ME would be good when I am talking about security. Otherwise it wouldnt make a diff.
 
Old 01-12-2007, 09:37 AM   #3
asommer
Member
 
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168

Rep: Reputation: 30
Yep...Most distros have preconfigured kernels. The nice thing about that is a preconfigured kernel is more likely to have all the drivers for your hardware. A less nice thing is that it will have a ton of drivers for hardware you don't have. Which may or may not be a big deal depending on the situation.

If you want to compile your own kernel IMHO a source distro is the way to go. I recommend Gentoo, but I believe Slackware is mostly source based too.

Anyway, that's my 2 cents.
 
Old 01-12-2007, 10:00 AM   #4
xjlittle
Member
 
Registered: Aug 2003
Location: Indiana
Distribution: fc6 sles9 & 10 kubuntu ubuntu-server
Posts: 240
Blog Entries: 2

Rep: Reputation: 30
That's fair question for a newbie-I remember asking myself the same thing when learning to understand how it all worked together.

No it doesn't. The developers precompile the kernel so that it will hopefully fit a wide range of users.

Is it worth compiling yourself? If you want to understand how the kernel works with linux yes. If you want performance or loading increases-usually. If you need something that you know the kernel provides but is not compiled into the shipped kernel-most definitely.

BTW Greg Kroah-Hartman, a kernel developer, has made his book The Linux Kernel in a Nutshell available at http://www.kroah.com/lkn/ under the creative commons license. I highly recommend downloading and reading it. It's very easy to understand and follow.
 
Old 01-12-2007, 10:00 AM   #5
Philly2
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Are the unused portions of the kernel still loaded and running when I am running the OS? Or are they loaded on demand (like Windows services set as manual)?

What I would like to try is compile my own kernel, then add the software I need 1 at a time to see what's the total disk space used and what type of performance I can get (I'll probably use a Debian kernel for apt-get, and WindowMaker for the GUI). I tried Kubuntu and Ubuntu and really disliked the responsiveness of the GUI's (Gnome and KDE).

Would such an experiment be worth it or is Ubuntu already tweaked for good responsiveness under a GUI (maybe the responsiveness cannot be as fast as Server 2003)? I do not need a fancy interface, just one that allows me to multi task and is efficient performance/ressource wise.


Thanks
 
Old 01-12-2007, 10:02 AM   #6
Philly2
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by xjlittle
BTW Greg Kroah-Hartman, a kernel developer, has made his book The Linux Kernel in a Nutshell available at http://www.kroah.com/lkn/ under the creative commons license. I highly recommend downloading and reading it. It's very easy to understand and follow.
Thanks, reading as we speak
 
Old 01-12-2007, 10:22 AM   #7
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian
Posts: 448

Rep: Reputation: 37
Quote:
I tried Kubuntu and Ubuntu and really disliked the responsiveness of the GUI's (Gnome and KDE).
Don't expect miracles, when I first recompiled a kernel I saw a huge difference in boot up speed, but not an amazing increase in general performance. However once you have a nice small, fast kernel, you may want to recompile kde entirely with a few optimisations here and there and see if you notice the difference. (hehehe a warning: once you start down this path...)
BLFS has some good basic instructions for kde here

Strip out all the components you don't want (this seems to make the biggest difference actually) and make sure you can actually build it normally first before you start messing with compiler settings.

Whatever you do, best of luck.
 
Old 01-12-2007, 01:10 PM   #8
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
One of the advantages of the huge default kernels most distros give you is that the majority of the parts of that kernel are modules. A module is something that is in the kernel, but isn't up and running unless modprobbed.

For example, probably every 10/100 network card has a module for running it. The huge kernel will include every one of those modules, but when it boots, it will just check and see what is needed, and insert it. So your machine could run with any NIC, but it only fully loads the one needed for your hardware.

With that in mind, you can trim all the unneeded modules out of the kernel, and instead of having the important ones be modules, you can defualt include them.

The thing is, the modules take so little space, you'll save maybe 20 Mb of space by not including them. It only becomes important on tiny tiny systems. Any desktop system has ample space for all of the modules in existance.

You can tune a kernel to do just the minimum that's needed, and it will be faster, but not in some breathtaking way. You won't double your speed. It's like the difference between doing 100 km/h and 110 km/h. Yes 110 is faster, but not all that different.

Peace,
JimBass
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
ati (8.16.20) : Module Installing | Error After Kernel Compile dfwcomputer Linux - Newbie 2 05-10-2006 08:03 PM
How to compile a new kernel *without* installing LILO vharishankar Slackware 20 02-19-2005 03:17 AM
How to compile BasiliskII 0.9 on modern Linux distros ssokolow Linux - Software 0 09-01-2004 01:47 AM
compile kernel once for multiple distros? rgiggs Mandriva 2 06-04-2004 02:25 AM
Installing distros over distros sunilkgarg Linux - Distributions 8 11-07-2001 02:14 AM


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