Theldus's blog

Slackware 15 on a Pentium 133 MHz (32MB of RAM)

By Davidson Francis | Published: 2023-01-15 | Last Modified: 2025-03-24

Slackware

Image 1: Slackware running on Pentium 133 MHz

Introduction

This mini-howto is intended to briefly address what was done in the video above: running Slackware 15.0, a recent Linux distro, on an old hw, from the 90s.

ℹ️ Info: If you have 64MB of RAM or more, you can skip this entire tutorial, Slackware 15 works out-of-the-box. If you have less than that, move on.

Taking things out

There are two major issues with booting a recent kernel in an environment with 32MB of RAM (and by that I mean any distro): initrd and kernel.

INITRD

INITRD is supposedly a mini-version of your operating system, or at least the bare minimum needed for the rest of your system to load a high-level bootloader.

The problem with Slackware here is that its INITRD tries to do too much: it brings a non-static Busybox (and with it also the dynamic libraries it depends on), plus a set of tools that arent really necessary for most users: such as LUKS, btrfs, RAID and etc.

With that in mind, we can do the following:

With that, it was possible to reduce the initrd from ~22MB to ~900kB, a huge improvement.

Kernel

Unfortunately the INITRD alone is not enough: even a 'Hello World'-initrd does not work, since the kernel refuses to load. So here things start to get complicated...

💡 Note: A small note: don't start with 'tinyconfig'! I wasted a lot of time trying to add things to get something usable and failed at all of them. Start with 'i386_defconfig' and remove whatever you don't need)

1 - Kernel base address

The first thing to do is modify the kernel's physical start address. By default, it starts at 16MB, and leaves very little room for the kernel and the rest of the system (memory before that is not used!):

-CONFIG_PHYSICAL_START=0x1000000
+CONFIG_PHYSICAL_START=0x200000

Using 2MB as the base physical address should be OK, I hope… at least I didn’t have any problems here.

2 - Remove drivers and (almost) everything else

With that you should have a minimal kernel that boots and runs on 32M of RAM.

My config, which supports networking, ext4 and a few other things... The diff between the config above and the i386_defconfig: diff

Final thoughts

I didn't cover everything I wanted to here: you still have to shrink your Slackware install to fit on your old PC's disk... here I got about ~4.5GB by removing: xap, xfce, kde, tex, tcl, rust, mozilla-*, LLVM, gnome-*, Qt, GTK... (and everything X-related) and libraries I know I wouldn't use.

I'd also like to answer a possible 'Why?': it sounded like fun, and it was, *a lot*. In addition, it also serves to prove that Linux is *not dead* on old PCs, and to be honest, I found the performance quite acceptable: it is perfectly possible to use VIM, IRC client, browse via Lynx and chat on Telegram via nchat, to illustrate some use cases.

If you've done something similar based on this, please let me know =).

This post is licensed under CC BY 4.0 by the author.