DietLinux — a Linux that boots in under 10 seconds

The tinkerer in me just couldn’t stay away. I saw a reference on Linux Weekly News to DietLinux and had to look at it.
DietLinux is an example of a Linux distribution that can’t properly be called GNU/Linux, because the majority of its userspace didn’t come from the GNU project. GNU’s libc–the main API for Unixish systems, and I’ll call Linux a Unix just to hack off SCO–is replaced with an alternative, trimmed-down libc called dietlibc. It’s not feature-complete but it’s tiny. Those of you who programmed casually in the 1980s and 1990s probably remember a day when you could write a fairly sophisticated program in a few kilobytes. Under modern operating systems, a simple program that simply emits “Hello, world!” can take up 32K or more. Using dietlibc instead of GNU’s libc shrinks that program back down to a couple of kilobytes.

The majority of DietLinux’s userspace comes from Felix von Leitner, the author of dietlibc. Von Leitner reimplemented init–the program that bootstraps a Unix system once the kernel is loaded–and getty, which is the program that handles text-based logins. These unglamorous programs can eat up a fair chunk of memory, and since Unix systems typically go for long periods of time without being rebooted, it’s a bit of a waste unless you need certain features provided by the more traditional init and getty programs. He also wrote replacements for several standard utilities.

Obviously, not every program in the world designed for glibc will compile and run under dietlibc, so DietLinux won’t ever be a complete general-purpose distribution. But for network infrastructure glue-type servers providing services like firewalling, DNS and DHCP (all of which already function), it would be perfect.

I don’t know what the future plans for DietLinux are. The asmutils provide an impressive number of userspace and server utilities, written in assembly language with very low overhead, and would appear to be a nice complement to DietLinux’s infrastructure. Their use would limit DietLinux to x86, however. And the text editor e3 is tiny, full-featured, and emulates keybindings for vi, emacs, WordStar, and Pico, so it’s friendly to pretty much any command-line jockey regardless of heritage and takes little space.

It’s also not a newbie distribution. Installation requires a fair bit of skill and pretty much requires an existing Linux system to bootstrap it.

But it’s definitely something I want to keep an eye on. I’m highly tempted to put it on one of my 486s. I just wish I had more time to mess around with it.

6 thoughts on “DietLinux — a Linux that boots in under 10 seconds

  • June 1, 2003 at 10:08 pm
    Permalink

    Only a really short comment — it’s late night here in Germany, and I have to get up in 3 hours.

    I’ll have a look at the programms mentioned by you — I’m always looking for small but featurecomplete utilities. I’ll include some i386-only stuff — one of the reasons is that many people with a old i386/i486 will benefit if I do so. Therefore I’ll give you the option to use asmutils, if you want to do so.

    You wrote about possible future plans for DietLinux — next step will be the release of a rescue-CD; thats what you currently can download, with some more programs (please mail me if you’d like to have some rescue-tools on that CD).

    The next bigger release will contain everything you need to build DietLinux — depending on how much time I have it will come in 8 days or in 1 month. Main problem is the work on a small package system and a port collection which will include all software distributed with DietLinux. The gcc-toolchain is already working, all new binaries for my CD-ROM are built under a dietlibc-only-system. SInce tonight I have a working perl, which results in a working autoconf — which enabled me to build gnu grep, gawk, most of coreutils, libncurses (!), and some more gnu-stuff under a dietlibc-only-system.

    Till july I’d like to habe my system working on alpha and sparc — I have an old alpha xl and a sun ipc to test my builds. More hardware and any other kind of support is always welcome — I’m only a poor student ๐Ÿ˜‰

    The one thing I currently need most are mirrors — I’d like to make ready-to-use ISO images available for download, but cannot afford the traffic I think this will make within a couple of month.

    Have a nice day — and please have a look at my current ISO, and mail me any bugs or additional programs.

  • June 3, 2003 at 2:58 pm
    Permalink

    Copied from e-mail to spur discussion:

    Bernd,

    Have you considered using BitTorrent as a means of distributing your ISOs?


    Dustin D. Cook, A+
    Network Administrator
    The Law Offices of Jeffrey H. Rasansky, P.C.

  • June 3, 2003 at 3:29 pm
    Permalink

    Hi,
    no, I didn’t even know about this. It looks like a nice idea, but its worthless for me — people who want to install additional software can get it using Make/rsync; people who want to download it to have a short look at it will not download BitTorrent. And — since they are downloading from my server — the traffic will be most likely higher than providing ISO-images only from mirror-servers.

    Luckily, I don’t have to think about this anymore — there is a first mirror online at (http|ftp)://ftp.freenet.de/pub/lart.info; a second one will be up during the next days at http://ftp.uni-erlangen.de — and maybe there will be a third one at presroi.de

    Bernd

    BTW, if anybody wants to talk to me about the project — you can find me at IRCNet, Nick Aard or ICQ, UIN 57546041;
    if you want to meet me — you can find me at most Linux / CCC-events in Germany, next will be LinuxTag in Karlsruhe and ChaosCamp in Berlin

  • June 4, 2003 at 9:30 pm
    Permalink

    Now *this* I have to play with!!! For some reason, it’s very appealing. ๐Ÿ™‚

    Thanks for pointing it out Dave!

  • January 5, 2004 at 8:06 pm
    Permalink

    I think there’s definitely room for a recovery disk that boots very quick, either floppy or cd based. Would be nice if it mounted ntfs, ext2, all the rest. And i’d like one that had cdrecord or burncd included to quickly back stuff up.

    I haven’t run across one yet. I like tomsrtbt and DSL though, although they aren’t too quick. Tried writing tomsrtbt to CD with floppy emulation but couldn’t get it to boot.

    I’ll try dietlinux if i run across any surplus 386/486.

Comments are closed.

%d bloggers like this:
WordPress Appliance - Powered by TurnKey Linux