1 AUTHOR: Richard A Downing FBCS CITP (geek109 at hotmail dot com)
5 LICENSE: Creative Commons Attribution-NonCommercial-ShareAlike License
6 http://creativecommons.org/licenses/by-nc-sa/1.0/
9 SYNOPSIS: How to replace SysVinit with runit when you build LFS.
12 http://wiki.linuxfromscratch.org/index.php?pagename=Building%20LFS%20with%20Runit
15 -------------------------------------------------------------------------
16 This hint is NOW UNMAINTAINED. The Author no longer uses runit
17 and does not support using it. The copyright is not chnged by this fact.
18 -------------------------------------------------------------------------
22 The LFS book installs SysVinit and a set of bootscripts. Together
23 these provide the mechanism for starting processes that run under the
24 Linux Kernel, and every process is a child of 'init', process
25 one. Other schemes exist, notably the BSD-init scripts, but these are
26 just an alternative set of scripts. This hint uses runit
27 http://smarden.org/runit/ by Gerrit Pape, a completely different
28 scheme that replaces init, and all its paraphernalia (with its own
29 paraphernalia). Runit is derived from the ideas of DJ Bernstein, but
30 the applications can easily be installed in FHS conformant places.
33 PREREQUISITES: None. This hint should apply to all versions of LFS.
40 There is a hint at http://109bean.org.uk/betterboot that explains how
41 to modify an existing LFS system to use runit. Those pages contain a
42 lot of explanatory text that is not repeated here. If you want
43 explanation, go and read that.
46 This hint will just show the minimal steps to build a fresh LFS system
47 using the book as modified by these instructions.
50 Note: If you are reading this as a text document, you might find
51 it better to look at the wiki version, which is maintained
52 on-line. http://wiki.linuxfromscratch.org
55 Obtaining Sources and Scripts
56 -----------------------------
58 Download the latest version of Gerrit Pape's packages from his website:
60 http://smarden.org/runit/runit-1.0.1.tar.gz
62 http://smarden.org/socklog/socklog-1.4.2.tar.gz
64 http://smarden.org/ipsvd/ipsvd-0.8.2.tar.gz
66 Note: There may be later versions - the ones above are the ones that
67 have been tested with these instructions
69 Follow the LFS book up to SysVInit
70 ----------------------------------
72 Carefully follow the LFS book through all its chapters until you get
73 to the page concerning SysVInit. Now follow these instructions:
75 Building and installing runit
76 -----------------------------
78 A word of warning, runit is designed to be unpacked into a directory,
79 /package, which is neither LFS nor FHS conformant. These instructions
80 therefore build an LFS and FHS conformant version.
83 Unpack the runit tarball, it will unpack as admin/runit-1.0.1.
88 install runit runit-init /sbin
89 install runsvdir runsvchdir runsv runsvstat runsvctrl /usr/sbin
90 install svlogd svwaitdown svwaitup chpst utmpset /usr/sbin
91 cp ../man/* /usr/share/man/man8
92 ln -s /sbin/runit-init /sbin/init
94 Install runit's bootscripts
95 ---------------------------
97 These scripts tell runit how to boot your system, how to run the
98 initial tty terminals, and how to shut down the system (including
99 forcing a shutdown with ctrl-alt-del). They depend on the
100 LFS-bootscripts that you will install in chapter 7 of the LFS book.
102 Obtain the scripts from the LFS Hints webpage's attachments link.
103 http://www.linuxfromscratch.org/hints/downloads/attachments/
105 Continue from the LFS book
106 --------------------------
108 Now continue from the LFS book starting with the section after SysVInit.
110 The section How does the booting process with these scripts work? is
111 not relevant, and can be skipped.
113 Finally, you will want to understand what you have built, so visit the
114 runit webpages at http://smarden.org/runit.
116 You will also want to know how to build BLFS packages with runit
117 support, if so, visit the author's runit pages at
118 http://109bean.org.uk/betterboot.
123 This hint started life on the LFS wiki (and the best version is still
124 maintained there). Kind people make improvements to it there, so far
125 these are: Uli Fahrenberg, Anderson Lizardo.
130 * Wrote the first draft on the wiki.
132 * Issued 1st Text version for the Hints project.