I want to build a really small linux distribution which would be using busybox, possibly uClibc. In the beginning, just a ramfs would do. Plus, I dont mind not having a native toolchain. I went through 'linux from scratch'; but apparently, it is meant for a full blown distro. Can you please advice me on this ?
I can't tell you what the smallest possible is, but Tiny Core Linux is the smallest that I have ever heard of. They manage to squeze a graphical system into 12MB and a text-based system into 8MB.
There isn't really a restriction to how small a distro is except the functionality you want in the distro.
I recommend looking at linuxfromscratch.org if you're interested in creating a new distro.
That tucks a ramdisk image onto the actual
vmlinux kernel before compressing the whole lot, so that on loading it gets automatically retrieved and decompressed. The kernel is started using that memory image as root filesystem, and looks for an executable in there with the name
init. Which can be any binary - including
In fact, using a statically-linked busybox as
init inside an initramfs is not an unusual step in embedded device bringup - getting to the shell prompt just past loading the kernel validates that the kernel boots, the kernel/userland interface and the console works.
At this stage, there's no need for any actual storage device, functional root filesystem and all that quite yet. If your device is used in kiosk mode (no data preserved across reboots) it's actually all you need.
Knoppix is smaller than Tinycore. And for Akira who thinks my proof makes more sense, try diffing the start_kernel() methods between the 2 and you'll see for yourself how much simpler Knoppix is.
Here you go, http://alpinelinux.org/ musl libc + busybox.
It is a distribution that fits under 8mb (although it can be reduced a bit)
It is based on musl-libc and busybox.