From ff781adeb26caca82a717d7f1dd83c4ad94b5165 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 17 Jun 2015 18:33:06 +0000 Subject: Fix some bugs, add some doc --- doc/index.html | 24 +++++--- doc/quickstart.html | 142 +++++++++++++++++++++++++++++++++++++++++++ doc/s6-linux-init-maker.html | 63 ++++++++++++++++--- 3 files changed, 213 insertions(+), 16 deletions(-) create mode 100644 doc/quickstart.html (limited to 'doc') diff --git a/doc/index.html b/doc/index.html index ad0d3b0..c3426e0 100644 --- a/doc/index.html +++ b/doc/index.html @@ -20,9 +20,9 @@

What is it ?

- s6-linux-init is a set of minimalistic tools to create and manage -the init process on a Linux system - i.e. the first process created -by the kernel at boot time. + s6-linux-init is a set of minimalistic tools to create a +s6-based init +system, including a /sbin/init binary, on a Linux kernel.

@@ -61,11 +61,12 @@ and then you can boot your system on that init script.

- The listed dependencies are all build-time dependencies and also -boot-time dependencies, i.e. you need the tools installed to build -s6-linux-init and to boot your system. There are no run-time -dependencies, except skalibs if you linked against the shared version of -the library. + skalibs and execline are build-time dependencies. + There are no run-time dependencies. + And every listed package, save skalibs, is a boot-time dependency. + If you are using the shared version of the skalibs library, +then skalibs also becomes a run-time and a +boot-time dependency.

Licensing

@@ -101,6 +102,13 @@ the previous versions of s6-linux-init and the current one.

Reference

+

Quickstart guide and FAQ

+ +

+ There is one, + here ! +

+

Commands

diff --git a/doc/quickstart.html b/doc/quickstart.html new file mode 100644 index 0000000..da47334 --- /dev/null +++ b/doc/quickstart.html @@ -0,0 +1,142 @@ + + + + + + s6-linux-init: quickstart and FAQ + + + + + + +

+s6-linux-init
+Software
+skarnet.org +

+ +

Quickstart and FAQ for s6-linux-init

+ +

Quickstart

+ + + +

FAQ

+ +

Why is it so complicated to use s6 as an init process? It's much +simpler with runit.

+ +

+ Yes, runit is simpler, because it provides a simple +runit binary +suitable as a /sbin/init program and calls scripts to +handle the three stages of init. However, the runit design has a +few perfectible points: +

+ + + +

+ Running a s6-based init addresses those issues: +

+ + + +

+ To sum up, a s6-based init is cleaner than a runit-based +init; it's a bit more complex to set up, but it organizes the system +in a better way, without using more resources. And the goal of +s6-linux-init is to make the setup more accessible. +

+ +

My /etc/rc.init script is not printing anything!

+ +

+ You probably gave the -r option to +s6-linux-init-maker, and +your /etc/rc.init's output is being logged into the +/run/uncaught-logs directory instead of printed to +/dev/console. +

+ +

I want to run s6 in a container, and I just want to log +to stdout/stderr, without this tmpfs and /dev/console +stuff and +without having a catch-all logger inside the container. Is it +possible ?

+ +

+ Yes, it is possible, but then s6-linux-init may not be what you +are looking for. For your case, it will be simpler to run s6-svscan +directly! +

+ +

+ If you are using +Docker, there is a +s6-overlay +project specifically made for integrating s6 into Docker images. +

+ + + diff --git a/doc/s6-linux-init-maker.html b/doc/s6-linux-init-maker.html index cdf617e..530cd41 100644 --- a/doc/s6-linux-init-maker.html +++ b/doc/s6-linux-init-maker.html @@ -49,6 +49,7 @@ machine - else the scripts will crash. [ -u log_user ] \ [ -g early_getty ] \ [ -2 stage2 ] \ + [ -r ] \ [ -3 stage3 ] \ [ -p initial_path ] \ [ -m initial_umask ] \ @@ -74,7 +75,7 @@ declared as basedir. Be careful: it contains fifos, files with precise uid/gid permissions, and files with non-standard access rights, so be sure to copy it verbatim. The s6-hiercopy -tool can do it, as well as the GNU or busybox cp -a command. +tool can do it, as well as the GNU or busybox cp -a or mv commands.

@@ -133,11 +134,10 @@ system. When stage2 is executed, the machine state is as follows:

+

Notes

+ +

+ The difficult parts of +running +s6-svscan as process 1 are: +

+ + + +

+ The main benefit of s6-linux-init-maker is that it automates those +parts. This means that it has been designed for real hardware +where the above issues apply. + If you are building an init system for a +virtual machine, a container, or anything similar that does not +have the /dev/console issue or the read-only rootfs issue, +you will probably not reap much benefit from using s6-linux-init-maker: +you could probably invoke +s6-svscan +directly as your process 1, or build a script by hand, which +would result in a simpler init with less dependencies. +

+ -- cgit v1.3.1