0

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 ?

5 Answers 5

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.

2

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.

1

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.

0

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.

-1

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.

2
  • Can you expand on this a little?
    – fixer1234
    Sep 26, 2016 at 23:26
  • Ok... Done 😉.😉.😉
    – 0000000
    Sep 27, 2016 at 3:36

You must log in to answer this question.