Introducing StripSlack, a minimal configuration of Slackware
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.
BTW you don't need any X libs. Groff is used only by man and it works fine w/o X. And I am not sure why you need the netkit stuff. You have to add portmap and eventually inetd to make use of it. Telnet and tftp-hpa make me wonder too.
Cheers
I didn't know about tracepkg, looks like a highly useful tool. Thanks!
I worked with the LFS/BLFS books to get something usable at first, and they include some stuff that's not strictly needed. My little project will probably change shape in the days and weeks to come, and I've already got some nice ideas brewing.
I think it deserves a clear separation as the LFS/BLFS projects do. "Linux From Slack" would give you the bare minimum, something like a Bash shell, the huge kernel and pkgtool, but no net, only the strict minimum to get to a shell. And then, "Beyond Linux From Slack" would start from there, introduce basic tools like dhcpcd, openssh/openssl, Vim, the man pages, compilers, etc.
This is more like a personal documentation project, to learn more about the innards of Slackware. Plus, it's always good to be able to shave off some bloat without shooting myself in my own foot.
I did a little more experimenting, and I can use your suggestions. Right now I'm trying to configure an extremely reduced system, which should do the following:
Get me to a shell prompt.
Allow me to login as root.
Install packages from a mounted CD-Rom or DVD using installpkg.
So far, I stripped the system down to the following packages:
a/aaa_base
a/aaa_elflibs
a/aaa_terminfo
a/acl
a/attr
a/bash
a/bin
a/bzip2
a/coreutils
a/cxxlibs
a/devs
a/dialog
a/e2fsprogs
a/elvis
a/etc
a/file
a/findutils
a/gawk
a/gettext
a/glibc-solibs
a/glibc-zoneinfo
a/grep
a/gzip
a/kbd
a/kernel-firmware
a/kernel-huge-smp
a/kernel-modules-smp
a/kmod
a/less
a/lilo
a/pkgtools
a/procps
a/sed
a/shadow
a/sysklogd
a/sysvinit
a/sysvinit-functions
a/sysvinit-scripts
a/tar
a/udev
a/util-linux
a/which
a/xz
What I'm interested to know here: can this be stripped down even more? Of course, the aim of the exercise is not to have a pathologically unusable system, but this slowly turns into some funny little documentation project that's going to be separated into two distinct parts, if I may say so:
Linux From Slack - everything that's needed to have a strictly minimal system
Beyond Linux From Slack - networking, slackpkg, man and info pages, remote login, text mode web browsing, etc.
Which means that everything that's not strictly necessary to get to a login prompt will go into the "Beyond..." part. For example, watching my little package list from above, I already sense that the 'dialog' package will eventually go into the "Beyond..." part, since I can very well use installpkg/removepkg without calling 'pkgtool' (which depends on 'dialog' for its interactive menus).
I also sense that at this stage, there's a high chance to shoot myself in the foot / paint myself in a corner / saw off the branch on which I'm sitting, so I'm open for your suggestions.
Cheers,
Niki
Edit: I successfully removed dialog and gettext (which can always added be later on). I'm now down to 41 packages using 205 MB of space.
when I faced the same problem (creating the smallest usable install) while assembling the lxc template, I started too from Vincent Batt's template for a minimal install (thanks again, Vincent!) but I made the following consideration: as a minimal install has to be a base for an usable system, I have to have in it slackpkg, so that after the system's setup I can easily install through its templates what is needed to let it do what I want it to do (webserver, fileserver, etc.); for the same reason I gotta have in it networking capabilities, or I shouldn't be able to easily retrieve packages (when you install the OS it can be a cdrom/dvd isn't always available)...
@Didier: thanks. The 'sysvinit' package is required, as it contains /sbin/shutdown and other things. On the other hand, I could get rid of sysvinit-scripts.
@ponce: I'm well aware of that. As I go along, I think I can clarify the main motivation behind this project: learning (and teaching, because my students will have to eat this ). I guess I am considering this as the "Linux From Scratch" book transposed to Slackware, with the BLFS follow-up. Discover what each package contains, what's his role in the system, etc. Start from the bare minimum, and then add man pages, initrd construction, networking, remote login, package management via the network, etc.
I think I will provide two sets of tagfiles for this.
One extremely reduced set to have just a boot prompt. Not much more than 35 packages from the A group.
One extended set which is a *usable* minimum, with networking, slackpkg, SSH, man and info pages, etc. About 100 packages, roughly estimated.
Right, here we go after some more experimenting. I could remove the following packages without harming the boot process:
a/gettext [1]
a/dialog [2]
a/acl
a/attr
a/less [3]
a/sysvinit-functions [4]
a/sysvinit-scripts [4]
a/gawk
a/sysklogd [5]
[1] "English, Motherfucker!" -- Pulp Fiction
[2] Normally needed by pkgtool, but installpkg and removepkg don't need it
[3] A pager is not strictly needed for boot, and there's 'more' anyway.
[4] As far as I understand, these two packages only provide compatibility for third-party software.
[5] What happens to the kernel logs after removing sysklogd? I half expected them to flood my terminal.
So here's what we have for now:
a/aaa_base
a/aaa_elflibs
a/aaa_terminfo
a/bash
a/bin
a/bzip2
a/coreutils
a/cxxlibs
a/devs
a/e2fsprogs
a/elvis
a/etc
a/file
a/findutils
a/glibc-solibs
a/glibc-zoneinfo
a/grep
a/gzip
a/kbd
a/kernel-firmware
a/kernel-huge-smp [1]
a/kernel-modules-smp [1]
a/kmod
a/lilo
a/pkgtools
a/procps
a/sed
a/shadow
a/sysvinit
a/tar
a/udev
a/util-linux
a/which
a/xz
[1] On some very old processors, these will have to be replaced by their non-smp counterparts.
We're down to 34 packages, and df -h shows 258 MB disk usage. Well, well, well...
Without sysvinit-scripts how can you start/stop your system?
But maybe you'll ship systemd instead
Well, curiously enough, my bare system still boots after removing these. Give it a spin, you'll see. I'm just writing a set of tagfiles, and then you guys can try it out.
Edit: of course you're right and I'm wrong on this. I just have too many VM's open and rebooted the wrong one. I admit I was also puzzled that my system could survive without the sysvinit-scripts. Silly me.
regarding templates and tagfiles, if can be useful for anybody, I personally have this workflow:
- prepare a tagfile tree with all the packages in SKP mode;
- assemble my needed package lists as slackpkg templates (that are basically lists of packages names in alphabetical order);
- when having to install the OS, prepare the tagfile tree using a very simple script that switch to ADD in the tagfile if the package is found in the template;
- retrieve the custom tagfile tree via network during the install phase.
this is an example template for a qemu-kvm webserver I recently set up: it's not strictly the stuff needed for a basic webserver (consider that php gets inside X stuff by default) but there are additional image-processing thingies (and more)
regarding templates and tagfiles, if can be useful for anybody, I personally have this workflow:
- prepare a tagfile tree with all the packages in SKP mode;
- assemble my needed package lists as slackpkg templates (that are basically lists of packages names in alphabetical order);
- when having to install the OS, prepare the tagfile tree using a very simple script that switch to ADD in the tagfile if the package is found in the template;
Just in case it is helpful. Gust allows to generate tagfiles directly from the alphabetic list of files.
I need a suggestion to name two different sets of tagfiles. The first set is a stripped-to-the-bones bare system as described in the posts above. The second one will be more usable and will include basic networking, SSH, Git, slackpkg, man and info pages, etc.
While the names "core", "minimal", "bare" and "base" are all highly suggestive, I don't see how I can point out a difference between the two approaches, since I need something like "minimal" vs. "less minimal but usable out of the box".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.