Skip to content

Instantly share code, notes, and snippets.

@ruario
Last active February 26, 2024 02:10
  • Star 10 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ruario/7c2742d6d1dd2f89575c to your computer and use it in GitHub Desktop.
A short guide to quickly setting up a small Slackware install

Setting up a "small" Slackware install

Intro

Before you do this, reconsider if it is really needed. More often than not, it isn't. This is why.

A common reason for attempting a minimal install is an expectation that Slackware will run faster. This is not true. Some example, (IMHO) valid, reasons for stripping back the install include:

  • Installing on a device with limited disk space, where it is hard to add additional storage
  • A setup where there is an ongoing cost to rent disk space (e.g. a Virtual Private Server)
  • As a learning exercise. ;)

If you do have a good reason, below is a rough guide. It won't get you the smallest possible install but with relatively little effort you can take 32-bit Slackware 14.1 down to around the 2GB mark, which is good enough for many use cases. It is also relatively fast to setup, compared to a more precise minimal install (without any redundant dependencies).

Remember that only a full install is supported, so if you are asking for help on the Slackware forums you should first test your problem with a full install, to ensure that missing packages are not the source of your problems. At the very minimum mention that your installation is stripped back and exactly what you have removed (keep notes!).

Install

  1. Install only the a/, d/, l/, n/ and x/ package sets.
  2. After install is complete remove large, unneeded packages (see Tips below for help identifying the biggest packages). If you are unsure if something is needed, just leave it! Some examples of things to consider include:
    • Large libs, like Qt
    • Large network servers, like Apache (httpd)
    • Any kernels (plus kernel modules and the source package) that you know you won't use
    • Any development tools you know you won't need
    • Excess font packages
  3. Consider also issuing rm -r /usr/doc after install. The contents of this directory (documentation, which can usually also be found online) take up quite some space and are not essential to the every day running of the operating system. (Note: This directory will get re-created and start to repopulate when new packages are installed or old ones upgraded).
  4. Install anything you find missing and regularly use (e.g. your preferred window manager, a web browser, your favourite utilities). You can find the packages on your local install media or use a tool like lftp or wget to fetch packages from a Slackware mirror.

Tips

  • You can generate a sorted list of the largest installed packages via the following command:
( cd /var/log/packages/ ; grep -x 'U.*M' * ) | awk -F: '{print $3 "\t" $1}' | sort -n
  • To simplify installing additional packages and keeping the system up to date, install and configure slackpkg and its dependency diffutils (both found in the ap/ package set).
  • If you want to be able to read man pages locally, install groff, man and man-pages (found in the ap/ package set). Otherwise there are plenty sites online that have the same information.
  • Have a look through PACKAGES.TXT (found on the install media or a mirror) to get an overview of available packages from the official repository. Pay particular attention to packages from the package sets you skipped over during install.
  • If a program complains about a missing program or library, you can find the package that owns it using slackpkg's file-search command or looking in MANIFEST.bz2.
@lnxslck
Copy link

lnxslck commented Dec 16, 2014

I've been looking for this a long time ago, but wouldn't this, decrease the boot time and also make Slackware faster?

Or is it the fat kernel installed by default that makes Slackware take forever to boot?

@ruario
Copy link
Author

ruario commented Dec 19, 2014

It won't speed up boot time.

@ruario
Copy link
Author

ruario commented Oct 26, 2017

Since I shut down my blog, I have moved the contents of the post back to this gist, along with a few updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment