Re: [dev] Suckless operating system

From: Kurt Van Dijck <>
Date: Mon, 18 Jun 2012 12:08:35 +0200

Sorry for the delay.

On Mon, May 14, 2012 at 03:27:38PM -0700, Amit Uttamchandani wrote:
> On Mon, Jun 14, 2010 at 01:51:21PM +0200, Kurt Van Dijck wrote:
> [snip]
> >
> > I fully agree. after looking to minit & stuff, I decided to write our own
> > init daemon to incorporate some safety stuff.
> > * booting is done in parallel.
> > * udev (+/- 5sec) was replaced by our (small) fdev (now takes some 0.1 sec).
> >
> Hello,
> Just came across your message while going through the suckless archives.
> You mentioned later on in the thread that you have not opensourced the
> init daemon yet. Has this happened?
Nope, not yet.
> Or is it possible now?
There's no real intention to do so, and without a strong commitment, I chose
not to start putting it in opensource.

The 'fdev' daemon may be considered again, especially since linux
invented a 'devtmpfs' to solve the udev bloat.
> I would like
> to take a look at some of the optimizations you have done.
I do understand that.

Let me pave your way a bit.
I think for the examples I mentioned, 'minit' & equivalents perform very well, maybe
even better. I started over to accomplish:
* per-service software watchdog.
* dependency-based shutdown.
* probably a few others I forgot.

The optimisations to reach short startup times are not implemented in the init daemon,
but rather in the dependency configurations of different services. Which init daemon
actually gets used is of less importance (for this matter).

The optimizations I made:
* early boot:
        $ dmesg -n5
        $ mount nodev /sys -tsysfs
        $ mount nodev /proc -tprocfs
        $ mount nodev /dev -ttmpfs
        # make nodes /dev/{console,null,zero}
then split up into:
        $ hostname -F /etc/hostname
        $ ip link set lo up
        $ mkdir /dev/cgroup
        $ mount nodev /dev/cgroup -tcgroup
        # clear hotplug callback from kernel
        # should already be cleared in kernel config & recompile
        $ echo "" > /proc/sys/kernel/hotplug
        # start device daemon (fdev, mdev, ...)
        $ fdev ...
# wait for SETUP & FDEV
        $ mkdir /dev/pts
        $ mount nodev /dev/pts -tdevpts
        $ mount / -o remount,rw
        $ rm -rf /tmp
        $ cp /proc/mounts /etc/mtab
        # very debian specific
        $ /etc/init.d/ start
        # DEBIAN ifupdown state
        $ cp /dev/null /etc/network/run/ifstat
# now, you're ready to run anything.

minit for example allows for easily starting stuff
in parallel.
Also, by putting network 'lo' up already,
you can start most networking daemons, without waiting
for DHCP to complete ...

Basically, I let no service depend on others, unless some service
would fail to initialize properly otherwise.


> Thanks,
> Amit

Kurt Van Dijck
Received on Mon Jun 18 2012 - 12:08:35 CEST

This archive was generated by hypermail 2.3.0 : Mon Jun 18 2012 - 12:12:04 CEST