Life without /sbin/init

Denis Vlasenko vda.linux at googlemail.com
Mon Nov 20 01:39:48 UTC 2006


The tarball at the following URL:

http://busybox.net/~vda/example_fs/example.tar.bz2

contains a stripped down system which
does not have /sbin/init. Put it on whatever
partition, and boot from it, specifying
"init=/init" kernel parameter.

It will provide you with seven gettys on vt2..vt8,
nmeter on vt9, top on vt10, klog on vt11, and syslog on vt12.
There are two user accounts: "root" and "user".

This tarball is mostly a quick and dirty
example taken from my desktop system.

It is intended to demonstrate that /sbin/init is
overdesigned. There is no real reasons why stuff
like getty is run by init. There is also no real reasons
why reboot/poweroff is done by init. And if you
remove those two tasks, init does almost nothing.

If you will examine the tarball, you will see that
gettys and nmeter/top/klog/syslog is controlled by
runsvdir, and can be selectively stopped/started by sv.
On real system, I just add more /var/service/something
directories with stuff I would like to run
(apache, sshd, samba, nfs.....).

You will also find that reboot/poweroff are shell scripts,
which work without any interaction with init.

And finally, you will see that init is a trivial shell
script, which does nothing.

I am sure that there are some rough edges, please report those.
--
vda



More information about the busybox mailing list