I'm exploring the idea of "reducing" a debian bootstrap chroot, similarly to how the m0n0wall build scripts copy only the necessary files for a running system from a FreeBSD jail.
The base debian bootstrap uses about 166MB (after apt-get clean and localepurge, it is only 120MB), which is pretty small as it is. Most of the stuff isn't needed though. I would like the build to not actually have an sshd server, and similar console messages to m0n0wall.
I think the process would even be simpler than the m0n0wall building process, because of how everything is installed.
host+-- chroot +-- target to do a minidebootstrap to
Several questions remain:
I think I'll just try a few different experiments to see what happens. How? QEMU!
How does m0n0wall build such a mini distro:
I learn better by doing than reading, so I'll probably do some trial and error experiments with QEMU and see what happens. I just remembered that I had seen an article about running debian on a 32mb compact flash drive at one point, here it is: Embedding Debian GNU/Linux in a 32MB CompactFlash by by Bao C. Ha.
This has a lot of very helpful information. I just scanned through it again, and I'm sure I'll be reading it again and again in the coming days!
On the FreeBSD side of things, there is the excellent miniBSD - reducing FreeBSD by Manuel Kasper. This also has a lot of great stuff. There is a lot of cool parallels between the two guides and I think a phing-based build process will work really well for both operating systems.
On the "WRT" side of things, OpenWRT uses ipkg, from handhelds.org. An "itsy" package management system. Along those lines is the Soekris Port of the OpenWRT distribution. I just found an interview with the founder of FreeWRT discussing the differences between it and OpenWRT, the site was down, so I mirrored the interview from Google's cache here. At the same time, I checked out kamikaze from OpenWRT and it seems to be working well - I'm compiling an x86 image with all the packages right now, among them ipkg and uClibc. Cool!
Argh, unfortunately that build failed too. Now I'm going to try building uClinux. Actually no I'm not. After reading some more about uClinux, FreeWRT, and OpenWRT, I think my focus remains on standard hardware. While I really like the idea of uClinux, the lure of debian is too strong! And for good reason. Debian is awesome.
The plan then is to stick with FreeBSD and debian as the basis for building mini-distros. And with my recent foray into OpenVZ, it should be easier to test various "reduced" debian systems. While I'm at it, I'll try to clarify the goal here:
My guess is that both Debian and FreeBSD (among others) will work very well for this purpose, and making the build process support them both (at least) will open the sphere of influence to a great audience.
UPDATE: A new psuedo-distro is in the works: NODOWS.