SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705
Rep:
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.
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.
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705
Rep:
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.
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.
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.
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.
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705
Rep:
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!)
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.
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.
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.
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.