I run a small community shell server for a group that's going on about 20 years old, I'm sure I've mentioned it here before. We're running Debian Wheezy LTS, which is coming up on it's EOL this year, but the registrant of the domain has gone AWOL and it was going to expire shortly thereafter, so I'd not really been bothering... if the domain expires, I'll simply shitcan the box and that'll be the end of an era.

Well, the day before yesterday my friend Avi figured out that he was in fact the registrant, when someone else tried to scam Wild West Domains into transferring the domain to them, and he received the "confirm this transfer" email. So we solved that problem, now it's time to think about migrating the box over. I'm no fan of Linux (I like FreeBSD), and Avi who is effectively my only co-admin really likes Slackware. We originally met in the middle, settling on Debian, but newer versions of it come packaged with systemd, something neither of us are particularly fond of.

We could run Debian without systemd, I think, and may still do that. In the mean time, I wanted to learn more about Slackware... it was my very first Linux distribution, so there's a little bit of nostalgia there. It was actually the first unix-like OS I'd ever legitimately messed with, if you don't count other machines that didn't strictly speaking belong to me. But Linode's default Slackware image throws in the Kitchen sink:

$ ls /var/log/packages | wc -l

Yep, it comes bundled with shit like cdrdao, cdrtools, ppp, svgalib, and at least two different FTP daemons.

I've built Linux from scratch, before, but that was a long time ago, and dealing with upgrading things manually and coping with dependencies and shit just doesn't sound like much fun. But what about Slackware from scratch? Manually unpack the minimum things required for Slackware's package manager to function, chrooting to it and installing the rest, only what I wanted? It's actually semi-doable, though I'm not sure it's worth the effort for a minimal Slackware installation.

For reference, with Slackware 14.2, there are very few packages required for the chroot environment to work and be able to run pkg. Slackware packages are pretty simple: a tarball (compressed with [xz](https://en.wikipedia.org/wiki/Xz), with an install/ directory that you're supposed to blow away after unpacking and executing the script contained inside of it. That's easy enough to script (I ran this little script from Finnix):

# Fetch packages required (??) for pkgtools to operate.
# glibc-solibs is installed twice, because the script doesn't seem to do it's job the first time?
mkdir -p tmp/
for p in \
aaa_base-14.2-x86_64-2.txz \
aaa_elflibs-14.2-x86_64-23.txz \
etc-14.2-x86_64-7.txz \
glibc-solibs-2.23-x86_64-1.txz \
bin-11.1-x86_64-1.txz \
devs-2.3.1-noarch-25.txz \
coreutils-8.25-x86_64-2.txz \
shadow-4.2.1-x86_64-1.txz \
bash-4.3.046-x86_64-1.txz \
gawk-4.1.3-x86_64-1.txz \
tar-1.29-x86_64-1.txz \
sed-4.2.2-x86_64-1.txz \
grep-2.25-x86_64-1.txz \
util-linux-2.27.1-x86_64-1.txz \
xz-5.2.2-x86_64-1.txz \
pkgtools-14.2-noarch-10.txz \
openssl-solibs-1.0.2h-x86_64-1.txz \
glibc-solibs-2.23-x86_64-1.txz \
do echo "Fetching+installing: $p";
wget --quiet --no-check-certificate --directory-prefix=tmp/ https://mirrors.slackware.com/slackware/slackware64-14.2/slackware64/a/$p && tar -xf tmp/$p && sh install/doinst.sh; rm -rf install/

As noted in the comments, glibc-solibs's install script doesn't seem to do it's job the first time. I thought it depended on something else already being there, but even putting it at the end didn't work.

Finally, writing a few files (inittab, fstab, and something else which escapes me), then installing a handful of other packages gave me a system that would boot (on Linode, note that no kernel or bootloader is required there), such as sysvinit-*, aaa_terminfo, and a couple things like wget, dhcp, and openssh.

It booted, and you could shell in and set more things up. Total install weighed less than a CD-R image (remember, no kernels though). There must be something else the installer configures that I didn't (or I'm missing a package) because while the system would boot, it wouldn't shutdown correctly. It was at this point though that I figured out I really don't care.

When writing up a text file describing all of the above, I started out calling it "Slackware Linux the hard way". However, after playing around with a decent installation of Slackware, and realizing all the things it's missing that a more modern distribution has (dependency management and such), and considering that you gain nothing from all that fuckery (at least with Gentoo you can trivially build, install, and upgrade an Apache that doesn't depend on sqlite!), I decided to add some punctuation and call this entry "Slackware: Linux, the hard way". Other than "old school cred" I can't really see a reason to run Slackware at all, which pains me. I get the "if it ain't broke don't fix it" approach, but it is broken, in my humble opinion - it made me appreciate apt, freebsd-update and suchlike that much more.

Not content with the 24 hours' self-flagellation, I decided to install OpenBSD as well. I really don't feel like fucking with that any more either. So what to do? Stick with Debian, and try cut out that systemd cancer? Or use FreeBSD and listen to Avi's mouth every time something breaks? I'll decide later.

Horsham, VIC, Australia fwaggle




Filed under:


Horsham, VIC, Australia

Navigation: Older Entry Newer Entry