Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Jan 25 '12 at 13:35

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

3 Answers 3

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 linuxfromscratch.org if you're interested in creating a new distro.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.