A 2 Floppy Linux for SSH Connections to Modern Servers

A working SSH session running on my Compaq Contura 420C, a laptop with a 486 DX4-75 processor and 12MB of memory.

As may be evident from this site, I enjoy using older and lower powered computers. Part of this is probably a reaction against planned (forced!) obsolescence of consumer electronics, as a vast volume of electrical waste must be generated by perfectly servicable equipment being rendered useless by software bloat and support ending for various things. For example, MS Office 4.2 (the version I use under Windows 3.1) offers the vast majority of the functionality I need, so most subsequent versions represent forced spending from my point of view. I've used some of my older machines to connect to text based internet services by telnetting into one of my newer machines and then using whichever services are of interest, but this reduces the older machine to little more than a dumb terminal. All available versions of Linux distributions new enough to have SSH versions that will connect to modern SSH servers are too heavyweight for most of my older machines, yet I wanted to connect to SDF from one of my Compaq Conturas. The answer was to make my own two floppy Linux installation (calling it a distro seems too grand for something so basic!).

I ended up building it under Slackware 11.0, as this seems to result in smaller binaries compared to using newer versions. Much older and the packages I wanted to use wouldn't build. I also needed to use an older kernel, both to boot nicely from a floppy, and to fit into a small amount of memory (indeed to boot at all!), so I've stuck with the 2.4.33.3 version from Slackware 11.0, but very cut-down, even removing PCI support, or support for any drive except a standard floppy drive. This does bring it down to 490kB though. After building the kernel bit 14 in the ramdisk word needs to be cleared following the instructions from TLDP here. This is so that the kernel expects a normal root filesystem on the root floppy and not a ramdisk that needs to be decompressed. Using a ramdisk based root filesystem would eat into memory which is a precious commodity! Busybox 1.36.1 (the latest version at the time of writing) was used, as was Dropbear 2024.85. Both have been fairly heavily pruned to fit into the root floppy - there is currently only 10kB of free space on the root floppy! Space saving measures even include using hard links instead of symlinks.

Having built it, the bare bones of the system to allow it to boot were based on the Linux Journal article here, with the addition of a resolv.conf, some extra device nodes in /dev and also setting up the SLIP connection during boot.

It's very basic, and a bit unfinished at present, but it does boot to a working shell, and dropbear does work (password authentication only). At the syslinux boot prompt, hit enter. When prompted, insert the root floppy and hit enter. It will boot to a shell prompt with only 4MB of memory, and leaving enough free to be able to run some commands, but I don't expect to be able to use dropbear with so little (I'll experiment and confirm). Specifying domain names as command options for most commands doesn't work (this seems to be a limitation in domain name resolution in busybox, so far as I understand), so the required IP address must first be found using nslookup, and then the user must use this instead of the domain name. So for example, to login to SDF, I can't just use the command dbclient mchamley@tty.sdf.org, instead I have to first do nslookup tty.sdf.org, and then dbclient@205.166.94.9

Here are the boot and root floppies as they currently are:
boot.img.gz (md5)
root.img.gz (md5)

And for source:
Dropbear source
Copy to config.h in dropbear source folder
Copy to localoptions.h in dropbear source folder
Busybox source
Copy to .config in busybox source folder
Kernel config, copy to .config in kernel source folder

Build command for busybox: LDFLAGS="--static" make

Build command for dropbear: make PROGRAMS="dbclient" strip

Now in a single floppy version! Being a little extravagant with memory usage for a 1.5MB ramdisk, both the kernel and an initrd for the root filesystem can all be crammed into a single floppy, with 32kB free on the floppy, and 89kB free in the decompressed root filesystem. Also with multiple ttys now. :) It runs nicely on my Compaq Contura 420C (which I'm using to write this), and with a running SSH session over half of its 12MB memory is still free. It should all run on as little as a 386SX now, but I don't have one with enough memory to test it with. The floppy image is below.

floppy.img.gz (md5)

Obviously this is all provided with no warranty whatsoever. It's the bare minimum to get an old laptop connected by SSH to servers that use modern ciphers. It uses an ancient kernel, and is all built with an equally ancient compiler and C library, all three of which have had any number of vulnerabilities addressed in the intervening years.

Hosting for this site is provided by

The SDF Public Access UNIX System