Which minimal but extendable Linux distribution to choose
I need an extendable Linux distribution which I can easily reduce in size so much that it fits into a 64 mb CF card.
In this stripped version it will run on a Via C7 and needed is Kernel, networking, a shell, basic perl and a ftp server. There are some distributions for embedded systems which can do this, however I have the requirement that it should be possible to to expand this set in the future, e.g. to a basic X setup or python instead of perl etc.
Which distribution do you know which can do this? Can any one of the major distributions like Fedora, Debian, Ubuntu be stripped down so much?
Edit: I looked at Embedded Debian which seems pretty close to what I need. Sadly, development seems to have stalled due to health problems of the main maintainer.
Damn Small Linux is the only off-the-shelf 50MB distribution that I know of.
It is vaguely debian-ish so one can use apt
and friends if needed.
Let’s check a few figures for mainstream distributions (i386 binaries):
- Debian lenny:
cdebootstrap -f minimal lenny lenny-minimal
produces 77MB. Add ~30MB for the package lists. About 9MB is documentation (/usr/share/doc
,/usr/share/man
), and about 25MB is locale data; you can remove these (but upgrades will bring the files back). This includes a minimal Perl setup (add 29MB for the standard library). There’s no editor (add 2MB for nvi or nano), and no ssh daemon (add 17MB for OpenSSH, 11MB for lsh). Basic FTP daemons start under 1MB. - NetBSD 5.1 starts at about 84MB (about 33MB in a tar.gz) for a kernel plus the base system, which includes a comprehensive network suite (ftpd, sshd, postfix, …), an X server, but no perl or X client. There’s no documentation, but about 10MB of locales.
- OpenBSD 4.8 starts at about 160MB (about 60MB in a tar.gz) for a kernel plus the base system (including perl with the full standard library, but no X server). There are smaller OpenBSD distributions such as Flashdist, though none looks up-to-date.
Going by the BSD figures, compression lets you fit about 120MB of programs in about 50MB of raw storage. At a 250% gain, you’re definitely going to want compression. Under Linux, you have a few choices of read-write compressed filesystems, in particular Jffs2. I don’t know what the possibilities are under *BSD. If you have a lot of RAM, you don’t need to depend on kernel support for a compressed filesystem, you can have a tar.gz or 7z archive that you uncompress into RAM at boot time.
There is a wide range of small Linux distributions, from single floppies to live CDs. You’d want something in the middle. Damn Small Linux and Puppy Linux are two popular choices; both run from RAM, and you’ll need to remaster Puppy to take away stuff you don’t need (the main distribution is too big for you).
After quite some research I settled in the end for SliTaz. I can really recommend it, as I haven’t found any distribution which is so flexible. There is a minimum system (well under 20 MB–choose from the Live CD flavors), basically giving you just a shell and ssh access. However, there is a huge package repository so you can extend to graphical interface or server daemons etc.
Try tinycorelinux – it’s only 10 MB (event less for microcore – the console version).
Beyond the small size, it’s also very quick booting
I had a similar situation. I tried slax, which is similar to siltaz mentioned here, but I found that it still contains many features I don’t need, and that it still takes to much time to boot for an embedded device.
tinycorelinux is very minimal, but when looking for a minimal system I prefer to start with almost nothing, and add just what I need.
They have a package system that includes many packages, many of the are also minimized and stripped down.
There is emdebian grip, which is binary compatible with Debian but removes all documentation and other files not strictly needed for functionality. You can mix and match packages with regular Debian, but it should give you a good base system even without doing that.