ces

Distro (s)hopping for an ancient laptop

All of my laptops are probably vintage items now. The oldest one that I have and still use is a ~20 year old Toshiba Satellite (bought ~2003) with 256MB RAM and a 40GB disk.

It came installed with Windows XP, but since I was working at Sun Microsystems at that time, I wanted to try Solaris on it and luckily I was able to dual boot it into Solaris 6 (or perhaps Solaris 8, don't remember exactly which anymore) and it was a solid working system. The only complaint I had with the Solaris install on it was that lid close didn't work - I couldn't get it to hibernate (suspend to RAM/disk). So the only option I had was to shut it down at the end of the day and wait for it to bootup before starting to work on it the next day. I used it that way for the better part of ~5 years. My window manager of choice during that entire time was olvwm since it let me multiplex plenty of virtual display space onto the relatively small screen.

Even before I left Sun (which had become part of Oracle by then), I had started twiddling with a few Linux distros. Since the Toshiba couldn't boot off a USB stick (yeah, the ROM was that old), the first Linux distro that I ever tested was Damn Small Linux/DSL burnt on a CD. It was all of ~50MB in size, IIRC. It worked like a charm and quite importantly booted up fairly fast (probably just because it was so, well, damn small). The occasional crash and the weird version of vi (nvi, I think) on it had me wary though, so for my daily usage I continued to use my trusty old Solaris partition.

Somewhere around this time, I happened to also try Puppy Linux and its performance was astonishing (since it ran directly from tmpfs/RAM) compared to the performance of Solaris and as a bonus it booted up amazingly fast since the CD was less than ~100 MB, IIRC.

Around this time I'd also bought a second laptop (around 2006, I think) for my wife and kid just so they didn't have to "learn Solaris" to browse the net ;)

It was a Compaq with 2GB of RAM and ~250GB disk. It came installed with Windows Vista and they used it almost exclusively for email and browsing. Unfortunately, in almost no time at all, the machine was completely infected and bogged down in viruses and had to be reinstalled. I used that as an excuse to install Ubuntu 12.04 on it since it was near the top of the Distrowatch listings of that time. That turned out to be a good choice since it ran well without any problems - at least ones that I could see. A nice side effect of the transition was that I could get lid close to finally work on a non-Windows system.

A couple of years later, I turned the Toshiba, (which was running Puppy among other multiboot stuff) into a full time media player (mostly for random MP3 files downloaded from the net) and for my daily usage, around 2008 I think, I bought myself an Acer laptop - again with 2GB RAM and ~250GB disk. It came installed with Windows 7 and I had no hesitation getting Solaris (9?) dual booted on it as well. I couldn't blow away the Windows partition because the scanner/printer that I had at that time (which was a Dell 810 "all in one") could only print with Windows. I assume CUPS doesn't support it even today. I stayed with Solaris on this laptop just for one reason: ZFS, since Ubuntu 12.04 didn't have ZFS support. I don't remember trying to see if olvwm worked on Ubuntu 12.04 since I didn't use it much anyway.

While DSL and Puppy (and even TinyCore) were usable, they were just toys and it was Ubuntu 16.04 that eventually turned into my distro of choice. Ubuntu 16.04 with its support for ZFS and olvwm (in a .deb!) was a turning point (this was in ~2016, I think). I didn't lose much time switching over all of my "newer" laptops from Ubuntu 12.04 to 16.04. The best part of that transition was that lid close also finally "just worked" without experimenting and twiddling with boot setting parameters such as "nomodeset".

Things didn't work out that great for the old Toshiba though ; since it was severely memory constrained with only 256MB of memory, it couldn't even boot the Ubuntu 16.04 ISO image.

Luckily enough though, I could get Arch installed on it and with olvwm from one of the Arch AURs, I was all set and I could continue using it without sending it off to a landfill somewhere. I did consider donating it, but who else would even want to use such an old computer - especially running Windows which has become a glacial hog.

Progress unfortunately is relentless and in the case of Linux distros, I assume progress means getting more bloated and slower (just like Windows) over time. Which meant the Toshiba was stuck in a rut. I could have continued using it as is but it was missing at least 2 features which I was starting to depend fairly heavily on: (1) ZFS and (2) hibernate on lid close. Thus started my latest round of distro (s)hopping to see if there was something out there that "just works" on it.

Ubuntu dropped 32 bit support recently(?), so Ubuntu (and all its derivatives) are ruled out. Arch also no longer seems to have 32 bit support so that avenue appears to be closed as well. The current contenders seem to all have reduced to the "hands-on distros": Gentoo and NixOS. Debian is also still in the running along with the toy distros such as TinyCore and Puppy. Alpine also has support for 32 bits so I decided to put it in there along with Minimal Linux Live/MLL, for a "real DIY" experience).

Since my requirements are fairly simple (for some definition of simple), I'll look at each of these in turn. The requirements in priority order are:

  1. 32 bit support : Since my ancient laptop has a 32 bit Intel Celeron I don't have much of a choice regarding this

  2. Memory : This is the second hardware constraint: 256 MB

  3. olvwm : olvwm is my window manager of choice. I've used it almost daily for a couple of decades now and I'm used to it. The new ones out there are just memory hogs (with eye candy) for not much more (in most cases, less) functionality. The best part is that I can build it myself and it works across OSes so I can be OS/distro agnostic

  4. ZFS : Backup is : zfs send | zfs recv ; enough said

  5. Hibernate : Nice to have - but in a pinch, I can live without this

  6. ISO boot : Nice to have : ISO should be bootable. Workaround is to install on another system/VM and use a USB stick

Evaluation

For evaluating the various distro's I used QEMU/kvm by setting the memory size to the value listed below (using -m) and booting off the ISO image (using -cdrom)

The evaluation results (sorted by memory required to boot the ISO) are:

Distro 32bit Memory olvwm ZFS Hibernate ISO_boot
MLL yes 128M yes? yes? no? yes
TinyCore yes 128M no? no? no? yes
Puppy yes 128M no? no? no? yes
Nix yes 128M yes? yes yes yes : minimal
Alpine yes 256M yes? yes? no yes : minimal
Gentoo yes 256M yes? yes? ? yes : minimal
Debian yes 512M yes? yes? ? yes : minimal

Note: All the above tests (except hibernation) were done using QEMU/kvm.

Some notes about the evaluation:

  • Alpine: I didn't see an obvious way to make it hibernate (after boot from ISO)
  • Gentoo: I could get it working - sorta, but their wiki is quite literally a zoo, overloaded with information helter skelter, (in a good way though, almost like many of the internal corporate wikis I've seen)
  • Debian: I was able to install it with 256M (using the "non-Graphic"/console install) but it warned about crashes and that it needed at least 273 MB
  • NixOS: Steep learning curve, so I ended up doing copy paste from various places to get it working with startx -> xterms (with dwm, for now). It wants to takeover the bootloader as well but I just wish it left that part to me to deal with (so I could just use it without having to learn Nix, the language, as well).

On the basis of the above comparison (except for hibernation), all of which was done on QEMU/kvm, I copied the ISO images of Alpine and NixOS to USB sticks and booted them on the actual hardware to verify hibernation. Alpine and Nix were the only ones tested on the Toshiba laptop for hibernation (although to be really fair, I should have included Gentoo as well. Gentoo did not have ZFS at boot on the ISO, so I took it out of the list). Testing on the laptop shows that Alpine wasn't able to hibernate on lid close, but NixOS was able to do it easily (using nomodeset selected from grub). So, NixOS it is!

Conclusion

NixOS 22.05 appears to be the winner here and the best part is that it has ZFS support (in the minimal ISO) and is able to boot from the ISO to the CLI with just 128 MB which is comparable to the much tinier toy distros. So even if it does get bloated up, filling up the disk over time as I try to figure out how to build olvwm for it, I assume it should remain bootable for a while before it chews up the entire 40GB of disk space.

If I run into trouble with NixOS filling up the disk, my next move might be to Gentoo or to go barebones all the way to Minimal Linux Live (MLL) or if that is too minimal then Linux From Scratch(LFS) or if that turns out to be too difficult (been there, done that), I might just fall back to buildroot.