Single executable rootfs
The absolute minimum system runs a single /init program as I've explained at Single Application Linux | Super User

Minimal Linux Live
https://github.com/ivandavidov/minimal
For a more interesting interactive system, this is a (mostly educational) small script that:
- downloads the source for the kernel and busybox
- compiles them
- generates a bootable 8Mb ISO with them
The ISO then leaves you in a minimal shell with busybox.
With QEMU you can easily boot into the system.
I have modified it to allow running it from the kernel source directory: https://github.com/cirosantilli/runlinux
Usage:
git clone https://github.com/ivandavidov/minimal cd minimal/src ./build_minimal_linux_live.sh # Wait. # Install QEMU. # minimal_linux_live.iso was generated ./qemu64.sh
and you will be left inside a QEMU Window with you new minimal system. Awesome.
Since it is small, this is a good option to read the source and understand what is going on.
Tested on Ubuntu 16.04.
Buildroot
https://buildroot.org/
Large set of Makefile scripts that manage:
- GCC cross compilation toolchain
- kernel compilation
- bootloader compilation
- generation of rootfs
- has tons of package download / build recipes in the source tree, including complex stuff like GTK. There is a dependency system.
Minimal example:
git clone git://git.buildroot.net/buildroot cd buildroot git checkout 2016.05 make qemu_x86_defconfig # Can't use -jN, use `BR2_JLEVEL=2` instead. BR2_JLEVEL=2 make # Wait. # cat board/qemu/x86_64/readme.txt qemu-system-x86_64 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2,if=virtio,format=raw -append root=/dev/vda -net nic,model=virtio -net user # You are now in a shell with BusyBox utilities.
It even has recipes for building X11 from scratch: How to install X11 on my own Linux Buildroot system?
Professional battle tested stuff used by some big enterprises.
Alpine Linux
https://github.com/gliderlabs/docker-alpine
Embedded distribution with a package manager that offers precompiled binaries from a website.
See also