LinuxQuestions.org
Visit Jeremy's Blog.
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 08-10-2006, 12:37 AM   #1
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
tips for slimming down Slackware install size


Hello everybody!

I've been working on building a "utility" Slackware, as in a Slackware install not meant to be used as a workstation, but to preform a specific job and nothing else. I'm working with an install size of 256 MB and at the moment I've almost doubled that.

I was wondering if people could share any experience they've had, or provide any tips on cutting down on install size. I was just needing to run some multimedia in MPlayer, but I was not wanting to limit the thread to this. I was hoping we could get some good advice on any type of "utility" Slackware. For instance, what about a webserver? A samba/print server? Simple router/gateway? Or anything else you feel like providing tips for.

Let me get it started with what I've done so far:
I installed all of the a/ packages, and the basic libs needed to boot/chroot: libc, glib & libtermcap (this is now a working bare bones system). Then I installed all application packages I needed and chrooted to the install directory. I ran "ldd * | grep "not found" in each directory containing binaries. I installed any library package that reported as not found. From there I removed all the man pages and docs.

This unfortunately was not enough. My next task was to start recompiling programs and cut out things I don't think I will need. Such as debug stuff, internationalization, etc. I have also considered uclib, but I'm not sure what I'll be getting myself into. My efforts have proved futile so far.

Can anyone share their expert knowledge on ways to cut down size and the trade offs between amount of work, loss of functionality, and benefit (how much space you will actually save).

Thanks in advance!
...drkstr

**EDIT
I just wanted to make sure I stress the fact that **anything** on this topic you feel like sharing will be helpfull. Even if you just want to list an application and it's exact requirements. Or if you know a certin package that you only need 1 small portion of as a dependency, and not the whole thing. Get creative and brag about your neat ideas, that's what this thread is for.

thanks!

Last edited by drkstr; 08-10-2006 at 02:01 AM.
 
Old 08-10-2006, 03:28 AM   #2
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
What's the specific end-programs or tasks you need to run? With GUI?
 
Old 08-10-2006, 10:13 AM   #3
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
I have a Slackware utility machine set up in a half gig partition and right now it's sitting at right about 300M. I don't have X but I have Emacs. I have gcc and all the stuff I need to build a kernel, along with Perl and Tcl and some other stuff I could easily live without. I don't have any networking either. When I take a look at the size of this setup and compare it with Slax, what I have doesn't look too good.

But I think a 256M machine is very reasonable based on what Slax is doing. Take a look at that distro- it's a very interesting, Slackware-based distro that comes in a pretty wide variety of flavors from a DSL-like Frodo edition (around 50M but I complained on his website that there's NO editor!!!) to a pretty nice KDE desktop version and a lot of stuff in between. Tomas documents things well and his distros work- and there's a lot of work always in progress with his stuff. I am pretty sure that on the webpage you can find what packages he's used to build the various flavors. That would be a good starting point if you don't already know exactly what your goals are and what you want.

Last edited by Randux; 08-10-2006 at 10:15 AM.
 
Old 08-10-2006, 11:26 AM   #4
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Original Poster
Rep: Reputation: 45
gnashley:
I will be using Firefox to play media via mplayer/mplayer plugin, flash, and java (but i might do away with java sine I don't think i'll need it)

randux:
Yeah, slax is what inspired me to try it. I can do everything I need to do in slax in about 150 Mb! He has to have done more then just intall a minimal set of packages. When I tried it, my install size was 400Mb. All I did was install the needed application packages, then install lib packages bit by bit until it worked.I will try to poke around on the Slax site a bit more to see what kind of voodoo he preformed to get it so small.

As far as the editor goes, this was a pain in the but for me too I don't know if frodo comes with midnight commander like the gui versions do, but if it does, you can use it's editor 'mcedit'. I'm not a big fan of it though. I would much rather have vi or pico.

Thanks everybody!
...drkstr
 
Old 08-10-2006, 11:42 AM   #5
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
Quote:
Originally Posted by drkstr
randux: Yeah, slax is what inspired me to try it. I can do everything I need to do in slax in about 150 Mb! He has to have done more then just intall a minimal set of packages. When I tried it, my install size was 400Mb. All I did was install the needed application packages, then install lib packages bit by bit until it worked.I will try to poke around on the Slax site a bit more to see what kind of voodoo he preformed to get it so small.
I should have thought of that, he probably did some surgery on the packages. You're right, things don't add up. I wondered why I have a distro with not much on it which is bigger than his KDE version LOL. If you have questions, search his forums and if you can't find out what you want, ask questions. He's a good guy and pretty forthcoming with answers.

Quote:
Originally Posted by drkstr
As far as the editor goes, this was a pain in the but for me too I don't know if frodo comes with midnight commander like the gui versions do, but if it does, you can use it's editor 'mcedit'. I'm not a big fan of it though. I would much rather have vi or pico.
No, nobody believed me when I posted that thread- they all jumped up and down and said "sure there's an editor" but nobody was able to find any editor at all. "It's....it's...oh there must be one somewhere!" After that Tomas said he'd put something on there- I forgot what they chose but it wasn't Emacs.

I don't think mc is on that distro. Emacs is bloated as hell and a big pain in the a$$, but I really can't live with any other editor in the UNIX world. For a system without X it's great because you can window and update source, scripts, etc., while you execute stuff in shell window.

PICO is a nice editor for its size. But if you don't have X running you don't have any way to window unless you want to sign on a bunch of times and switch terminals.
 
Old 08-10-2006, 12:07 PM   #6
PingFloyd
Member
 
Registered: Jun 2006
Posts: 94

Rep: Reputation: 16
What about using vim or some other vi variant as your editor?

I don't know if Slackware has a package for vim or not, but might be worth compiling the source, considering your goals, if not. I haven't checked, but I would imagine that it would save you more space in comparison to emacs.

Just a thought.
 
Old 08-10-2006, 12:39 PM   #7
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
Slackware has vim, vi, elvis, and many, many, many more (Actually, I think there are too many. But that's just my opinion). There are advantages to vim, as there are to emacs, plus drawbacks to both.
 
Old 08-10-2006, 12:46 PM   #8
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
Quote:
Originally Posted by PingFloyd
snip
Great name! Thanks for the grins
 
Old 08-10-2006, 12:48 PM   #9
jimX86
Member
 
Registered: Mar 2006
Distribution: Slackware64 -current
Posts: 268
Blog Entries: 1

Rep: Reputation: 79
There's some good info at the RULE project. They work primarily on getting Red Hat to run on old hardware, but a lot of that info would apply here. They also use kdrive, a trimmed down X server. There's some current info on that at freedesktop.org.
 
Old 08-10-2006, 12:54 PM   #10
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 55
Quote:
Originally Posted by cwwilson721
Slackware has vim, vi, elvis, and many, many, many more (Actually, I think there are too many. But that's just my opinion). There are advantages to vim, as there are to emacs, plus drawbacks to both.
Drawbacks?! Anyone who says there are drawbacks to Emacs will draw back a nub

Sorry man, couldn't resist. And the forums could use a little humor (very little!)
 
Old 08-10-2006, 03:35 PM   #11
Namaseit
Member
 
Registered: Dec 2003
Distribution: Slackware
Posts: 325

Rep: Reputation: 30
Well there is alot of unnecessary stuff in /usr

Like language stuff. That should cut like 40 megs. throw man pages out.

Use the 'du' command. 'du -h --max-depth=1' is what I used to find out what directories were hogging stuff. Then from there you can see what fat you can trim on your own.

I have done an absolutely bare minimum slackware and got it down to ~60megs. You could do even better if you used busybox instead of the larger bash utils.

qemu is awesome for this task. just load a test virtual environment, trim what you don't need and then just copy it. Or make a script to install only packages you need(once you know) and automatically delete the dir's you don't. Done that too.

Good luck.
 
Old 08-10-2006, 05:20 PM   #12
aquaboogie90
Member
 
Registered: Jun 2006
Location: California
Distribution: Ubuntu 7.10
Posts: 33

Rep: Reputation: 15
Maybe you could start from ZipSlack, remove unneeded stuff, and go from there.

P.S. The emacs thing sounds like a good idea. Since it comes with **so much** stuff, you could run a really basic workstation with emacs alone.
 
Old 08-10-2006, 08:02 PM   #13
Namaseit
Member
 
Registered: Dec 2003
Distribution: Slackware
Posts: 325

Rep: Reputation: 30
Check package dependencies though. I don't know what emacs depends on and what extra fluff is installed with it. I just installed nano. simple and small executable with minimal dependencies. or vi/vim. whatever floats your boat. using busybox it has vi built in.
 
Old 08-10-2006, 09:35 PM   #14
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Original Poster
Rep: Reputation: 45
Editors arn't really to much of a concern for me (I actually don't need one on my system). Any administration will be done remotely, and if I do decide to add one, I'll just copy the pico binary over since it does not need any libraries I don't already have for other things.

I have my system install grouped into directories so I can easily monitor my disk usage and adjust accordingly.

(Might look a little familiar to anyone that's worked with Slax )
base:
--------
core
kernel
libs
network
x11

Modules:
--------
firefox
mplayer
userprofile



core contains the base system needed to run Linux and is the bulkiest (~300mb):
The brunt of this bulk is coming from glibc/glibc-solibs, util-linux, coreutils, and aaa_elflibs. Busybox was a good idea, I completely forgot about it. Hopefully this will replace some or all of the mentioned items but I will have to do some looking into it (never used it before). This will also be quite smaller once I clean out all the docs and man stuff. I haven't done this again since I started over with a clean install.

kernel is sitting at around 40mb and contains the vmlinux and all modules:
probably not much I can do here for size.

libs is sitting at around 200 mb and contains all the library packages:
This will should be about 100mb smaller once I clean everything out. I did a full install of l/ on this last run through for debuging reasons. I will remove out all the stuff I don't need pice by pice.

network is holding out at about 90 mb and contains all the needed n/ packages:
There probably isn't much I can do here either without recompiling all the packages.

x11 is sitting at 80mb and contains x11, fluxbox, and xv (for background):
this might be cut down a bit as well. kdrive might be a good option, but it seems pretty rough. This probably won't work since I am relying on some neat features in xorg for generalized settings of hardware.

firefox, mplayer, and user profile are about 75 mb combined.


The total install size from these folders is about 700 mb. Around 500 after I remove the un needed stuff (doc, man, and unneeded libs) I will give busybox a try, but I doubt it will give me the 256 mb I need.

Any more ideas?

Thanks for everyone's input!
...drkstr
 
Old 08-10-2006, 10:06 PM   #15
jimX86
Member
 
Registered: Mar 2006
Distribution: Slackware64 -current
Posts: 268
Blog Entries: 1

Rep: Reputation: 79
One last idea (admittedly not well thought out). What about using Knoppix type cloop compression? Would it be possible to compress the system and run it in memory, with a writable partition for user data?
 
  


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
Slackware Install, Configure, Tips guide fprimex Slackware 2 04-30-2006 05:52 PM
Slackware 10.2 Tips Unduhtakuh Slackware 4 09-25-2005 03:22 PM
Slimming down before the new release samac Slackware 9 08-14-2005 02:19 PM
Slackware 9.1 install - PCI cache line size incorrect will103 Linux - Newbie 4 04-21-2004 01:38 PM
Slackware Tips Artimus Slackware 2 02-28-2003 06:21 PM

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

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