From f588272b8055c615df73094d77ceb179a1182219 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 17 Jun 2015 10:06:12 +0000 Subject: Initial commit --- doc/s6-linux-init-maker.html | 276 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 276 insertions(+) create mode 100644 doc/s6-linux-init-maker.html (limited to 'doc/s6-linux-init-maker.html') diff --git a/doc/s6-linux-init-maker.html b/doc/s6-linux-init-maker.html new file mode 100644 index 0000000..3c27a2f --- /dev/null +++ b/doc/s6-linux-init-maker.html @@ -0,0 +1,276 @@ + + + + + + s6-linux-init: the s6-linux-init-maker program + + + + + + +

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

+ +

The s6-linux-init-maker program

+ +

+s6-linux-init-maker reads configuration options on +the command line, and outputs a directory to place in the +root filesystem as well as a script suitable as an init program. +

+ +

+ s6-linux-init-maker only writes scripts. At boot time, these +scripts will call commands provided by other skarnet.org packages +such as +execline or +s6. It is the +responsibility of the administrator to make sure that all the +dependencies are properly installed at boot time, and that the +correct options have been given to s6-linux-init-maker so that +the programs are found on the root filesystem of the +machine - else the scripts will crash. +

+ +

+ +

Interface and usage

+ +
+     s6-linux-init-maker \
+       [ -c basedir ] \
+       [ -l tmpfsdir ] \
+       [ -b execline_bindir ] \
+       [ -u log_user ] \
+       [ -g early_getty ] \
+       [ -2 stage2 ] \
+       [ -3 stage3 ] \
+       [ -p initial_path ] \
+       [ -m initial_umask ] \
+       [ -t timestamp_style ] \
+       [ -d dev_style ] \
+       [ -e initial_envvar ] ... \
+       dir > stage1
+
+ + + +

+ dir should then be copied by the administrator to the place +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. +

+ +

+ The stage1 script printed by s6-linux-init-maker on its +stdout is then suitable as an init program. The administrator should +copy it to /sbin/init and make it executable. +

+ +

Boot sequence

+ +

+ When the kernel boots, it runs the stage1 script, and this is +what happens: +

+ + + +

+ stage2 is the responsibility of the administrator - it will +not be written automatically! +It should +contain all the necessary initialization sequence to bring up a proper +system. When stage2 is executed, the machine state is as follows: +

+ + + +

+ There is nothing else. In particular, no filesystem has been +mounted yet, including /proc and /sys; and no one-time +initialization +has been performed. The point of stage1 is only to make it +possible to run stage2 with a logging infrastructure and a +supervision infrastructure already available, and all the +real machine and service initialization should happen in stage2. +

+ +

Shutdown sequence

+ +

+ When s6-svscan is told to exit via an appropriate +s6-svscanctl +command, it executes into the stage3 script, which, like +stage2, is the responsibility of the administrator. stage3 +is run in the following state: +

+ + + +

s6-linux-init-maker options

+ + + + + -- cgit v1.2.3