Lightweight custom linux build

It is generally possible to roll a system with Busybox; busybox's web site details how to do this.

A statically linked busybox binary will require just a couple of megs of memory (over what the kernel requires, of course). I've been able to boot and log into a machine with 8M of ram.

However, it is relatively complicated to get all the system services you may require working, using a small existing distribution might be better.

How much is "little memory"? Are you on a really tiny embedded system? Unless you have less than 64M, or your process needs to use a lot of the available ram (and no swap), I'd recommend going with a minimal standard distro.


Edit: The "buildroot" tool is a companion of Busybox which helps you to build very small usable filesystems.


Try TinyCore (or MicroCore even).

TinyCore is at 10MB (ISO) and MicroCore at 6MB. TinyCore has X and a minimal GUI, while MicroCore is text mode only. I use it on a 12 year old laptop with 199MHz and 32MB RAM. Works perfect, even with WLAN, etc.

TinyCore is made with customization abilities in mind. You can easily fork your own minimal dristro from TinyCore. To facilitate this, there's even a remastering how-to in the Wiki.


You could go with Arch linux, but that doesn't strictly meet your "custom" distro, I think.

I'd go with Linux From Scratch. That's not really a distro, but rather a system for building your own distro. I think you'll find you have some "fat" in your system when you're done, as it has you building and installing Tcl/Tk (or at least it used to) and a few other things that aren't strictly necessary, but let you run test cases semi-automatically.