RE: initialization vs supervision

From: James Powell <>
Date: Sun, 27 Jul 2014 12:06:49 -0700

Yes, virtual file systems, swap, system drivers, and various checks have to be made prior to loading a read-write partition.

This is usually done in stage-1.

There may be a way for s6 to do this, if it doesn't already. The s6-init binary would have to bring up the kernel, then pass to s6-svscan which would be active in mode 1 for stage-1. When stage-1 finishes it has a trigger command to switch into mode 2 for stage-2.

The ultimate problem is a script set as Laurent said. One has to be drafted for each OS type. BSD has different utilities than Linux.

Sent from my Windows Phone
From: Laurent Bercot<>
Sent: ‎7/‎27/‎2014 8:39 AM
Subject: Re: initialization vs supervision

On 27/07/2014 15:30, Joan Picanyol i Puig wrote:
> No magic wand here, I just see it as scripts all the way down...

  Of course it's scripts. But those scripts are not portable. You can't
make a tmpfs on FreeBSD the way you make one on Linux.

> Creating and mounting a tmpfs and bringing up the network look pretty
> much the same to me: initialization tasks orchestrated by scripts
> invoking userland binaries. At this point in booting, if something fails
> it's watchdog time...

  Yes, it's easy, but it still cannot be shipped in the s6 package if I
want it to be system-agnostic.

> Regarding read-only root fs, isn't it just a matter of restarting
> svscan's logger pointing to stable storage once it is up & running?

  The logger is not a problem, but you still need a read-write place you
can access before starting s6-svscan: the scan directory itself needs to
be read-write. There's no starting s6-svscan if you don't have a read-write
directory at all, for several reasons; and since you haven't started the
one-time init yet, there are no disks. So there needs to be a tmpfs
creation in /sbin/init, and I don't know how to do that portably.

Received on Sun Jul 27 2014 - 19:06:49 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:18 UTC