LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 07-15-2007, 05:39 PM   #1
stepan_par
LQ Newbie
 
Registered: Jul 2007
Posts: 11

Rep: Reputation: 0
how to build a light linux kernel?


hi guys. I am compiling the latest kernel on my ubuntu box and it is basically 500-600 mb!Why is that since comparing to Ubuntu's kernel it is much fatter(5-6 times fatter to be exact).How can i make the kernel be more light-weight. When i was extracting i noticed that the kernel extracted folders such as sparc so i am assuming it installed the dependencies for every single architecture. Is there a way i can make it i386 only?if i am wrong about my deduction what exactly is causing the problem?i compiled on feisty and the kernel is 2.6.22
 
Old 07-15-2007, 05:58 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Weird double-post. Please ignore.

Last edited by ilikejam; 07-15-2007 at 06:06 PM.
 
Old 07-15-2007, 06:05 PM   #3
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Hi.

Are you just counting the size of the full kernel source directory after you compile? This will be very large, since it contains all the sources and binaries. Try doing a 'make deb-pkg' and see what the size of the .pkg file created is.

The sources contain all the files for every supported architecture, processor, driver etc, but when you compile on x86 you will only compile the relevant bits for x86. If you want to get the kernel size down further, you can remove drivers, FSes etc that you don't need. The kernel RPM for my mail server, for example, is 1.4MB compared with 45MB for the original Fedora kernel package.

Dave
 
Old 07-15-2007, 06:24 PM   #4
stepan_par
LQ Newbie
 
Registered: Jul 2007
Posts: 11

Original Poster
Rep: Reputation: 0
thanks for the reply. I talked to the people on ubuntu-kernel irc chat and they told me to disable CONFIG_KALLSYMS_ALL. How do i disable this?

Last edited by stepan_par; 07-15-2007 at 06:27 PM.
 
Old 07-15-2007, 07:10 PM   #5
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Hi. The double post was me, not you

Disabling CONFIG_KALLSYMS_ALL will drop the size of the kernel by only a few K. If you really want to do this (unless you're compiling for an embedded arch with very limited RAM, you probably don't) then you can in [g|x]config by switching off:
General setup -> Configure standard kernel features (for small systems) -> Load all symbols for debugging/ksymoops

I still think you're comparing the total size of the sources and compiled binaries with the size of the binary kernel package though. An 'everything switched on' kernel for i386 is only about 40-50Meg.

Dave
 
Old 07-15-2007, 07:32 PM   #6
stepan_par
LQ Newbie
 
Registered: Jul 2007
Posts: 11

Original Poster
Rep: Reputation: 0
Ok. Also , i am not comapring the sources. I installed the kernel and in synaptic , while i clicked to rmeove my custom kernel , it took of like 500 mb but when i ticked of to remove the ubuntu kernel , it only removed about 100-200 mb. also , i isntalled kubuntu , removed kubuntu the kde and then isntalled kde-base , when i added my custom kernl it was over 2 gb with just kdebase
 
Old 07-16-2007, 10:17 AM   #7
stepan_par
LQ Newbie
 
Registered: Jul 2007
Posts: 11

Original Poster
Rep: Reputation: 0
anyone got an answer on this topic?
 
  


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
Which is the kernel build directory? I Can't find kernel build files crabsody Debian 7 01-09-2007 04:48 AM
LXer: Howto: build Linux kernel module against installed kernel w/o full kernel source tree LXer Syndicated Linux News 0 09-03-2006 08:21 PM
Build Linux from zero with kernel only... for fun... luzi82 Linux - General 6 04-25-2003 07:55 PM
The linux kernel ...to patch it or to build it that is the question Rodcl Linux - Software 3 07-13-2002 08:19 PM

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

All times are GMT -5. The time now is 10:15 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