diff options
author | Thomas Trepl (Moody) <thomas@linuxfromscratch.org> | 2022-08-07 20:29:37 +0200 |
---|---|---|
committer | Thomas Trepl (Moody) <thomas@linuxfromscratch.org> | 2022-08-07 20:29:37 +0200 |
commit | 57c4c384a3ded4998b59fc141059fa1f91087f82 (patch) | |
tree | 9c27dc282529b2dfe4829220737701012d4d7ecf | |
parent | 193913e25def32a96d04baaec3671fb4b3b31a6c (diff) |
Add essential program build (init, poweroff, ...)
-rw-r--r-- | chapter09/usage6.xml | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/chapter09/usage6.xml b/chapter09/usage6.xml index 4d089a8d7..2a9d074bf 100644 --- a/chapter09/usage6.xml +++ b/chapter09/usage6.xml @@ -11,6 +11,40 @@ <title>S6 Usage and Configuration</title> - <para>Add more info about S6 here.</para> + <para>*** Add more info about S6 here. ***</para> + + <para>Now setup some essential scripts for booting.</para> + +<!-- + Following setup is taken from + https://skarnet.org/software/s6-linux-init/quickstart.html + It builds the required programs (init, reboot, ...). + + The system is bootable with this config, but it has + * only one tty (tty1) + * root-fs is mounted R/O + * no virtual filesystems (like /proc) are mounted + * messages breaks thru to console + ... but it boots ;-) +--> + <para>Make sure that the configuration directory exists:</para> + +<screen><userinput>mkdir -p /etc/s6-linux-init</userinput></screen> + + <para>Setup a temporary directory:</para> + +<screen><userinput>tmpdir=$(mktemp -d)</userinput></screen> + + <para>Create essential programs and move them to a + directory representing the current setup:</para> + +<screen><userinput>s6-linux-init-maker -1 -G "/sbin/agetty 38400 tty1" $tmpdir +mv $tmpdir /etc/etc/s6-linux-init/current +</userinput></screen> + + <para>Install the essential programs in the file system:</para> + +<screen><userinput>cp -av /etc/etc/s6-linux-init/current/bin/* /sbin/</userinput></screen> + </sect1> |