LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-21-2005, 01:43 PM   #1
Kholnuu
LQ Newbie
 
Registered: Dec 2004
Posts: 20

Rep: Reputation: 0
Reducing kernel size


I've noticed there's a lot of stuff in the kernel that I don't particular need, like any architecture other than x86/i386. Could I safely delete these directories from the kernel source and compile a new kernel, or would this be considered a bad idea?

If it's safe, where else could I possibly save some space?
 
Old 01-21-2005, 01:49 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Do a make clean to save space (save your .config before)
 
Old 01-21-2005, 01:52 PM   #3
Kholnuu
LQ Newbie
 
Registered: Dec 2004
Posts: 20

Original Poster
Rep: Reputation: 0
Oh, does make clean take care of what I was talking about?
 
Old 01-21-2005, 02:02 PM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
It will remove *.o files, you will win 50 MB or such.
 
Old 01-21-2005, 02:39 PM   #5
Phathead
Member
 
Registered: Sep 2003
Distribution: Slackware 10.1, Slamd64 10.1, IpCop 1.4
Posts: 125

Rep: Reputation: 15
What kind of space are you trying to save?

If it's disk space, the 2.6.7 kernel that ships with Slack 10.0 is 1.4 MB on disk. The kernel source tree is unecessary as long as you don't need to comple anything, so you could remove the kernel source package. You can clean things up a bit by running `make mrproper` from /usr/src/linux, but that won't save enough space to make it worth the time to even type the command, especially considering that it removes all your kernel config files.

You could save a little RAM by removing support for hardware you don't need. Just use `make menuconfig` and remove the stuff you think you don't need. However, if you don't absolutely know what you're doing, you can remove too much and end up with a kernel that doesn't work as well as the supplied kernel. Again, not worth is IMO given the small amount of RAM the kernel occupies and the relatively huge amounts of RAM in modern systems. Also, most hardware support is in modules that are not loaded into RAM until they are needed.

Recompiling the kernel can speed up your system a bit, but it's always been a marginal improvement for me, so I stopped doing it. I only compile new kernels now when I want to use newer versions that aren't with slack-current. For instance, 2.6.10 isn't part of slack-current, but I decided to run it anyway.

Give us a bit more information on what you're trying to accomplish, please.
 
Old 01-22-2005, 12:07 AM   #6
Kholnuu
LQ Newbie
 
Registered: Dec 2004
Posts: 20

Original Poster
Rep: Reputation: 0
I was mostly just curious if I need to have all that /arch stuff if I was never gonna use it.
 
Old 01-22-2005, 02:57 AM   #7
MBH
Member
 
Registered: Sep 2003
Location: Kuwait
Distribution: Slack 10.0 @ Kernel 2.4.27
Posts: 63

Rep: Reputation: 15
My Kernel sourse is around 150 MB, because I never clean it.. cuz I do a lot of kernel mods here 'n there

But you can delete packages that you don't use!

If you're on KDE, run: Package Manager (KPackage), under the System menu.
If you're a sheller, fire your shell and type pkgtool

Make sure you read the description of each package before removing it! and even if you removed a package by mistake, you'll find it in the installation CDs.

If you want to reduce the kernel size (the compiled one), go to your source directory :
/usr/src/linux
make xconfig

and remove all the options you don't need, like AppleTalk, if you're not on a network with Mac computers, you don't need that protocol, and so on.

Recompile your kernel, and as suggested above, clean it. I wouldn't clean it untill I reboot and test everything to make sure I havn't removed something needed in the kernel.
 
  


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
Reducing Debian Installation Size??? kushalkoolwal Debian 18 08-15-2005 01:58 PM
Reducing size of /usr/local/src jrdioko Linux - Software 8 06-09-2005 10:42 PM
Reducing file size using mencoder SithX Linux - Software 3 04-15-2005 08:56 PM
Reducing size of PV (partition) in LVM clacour Linux - General 2 10-24-2003 08:19 PM
reducing the size of linux partitions cybergir Linux - Newbie 1 02-04-2003 03:58 PM

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

All times are GMT -5. The time now is 02:12 AM.

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