Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 ?

share|improve this question

migrated from Jan 25 '12 at 13:35

This question came from our site for professional and enthusiast programmers.

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.

share|improve this answer

Not sure what the "smallest possible" minimum config is, but you can start with an initramfs (see also the kernel documentation) containing just a few files.

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 busybox.

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.

share|improve this answer

There isn't really a restriction to how small a distro is except the functionality you want in the distro.

I recommend looking at if you're interested in creating a new distro.

share|improve this answer

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.

share|improve this answer

You must log in to answer this question.