</head>
<body>
-<a href="../200706-bootseq/200706-bootseq.html">insserv talk during Debconf 7</a>
-
<h1><A href="http://www.fosdem.org/2008/schedule/events/debian_boot">Reordering
the Debian boot sequence for correctness and speed</a></h1>
<div class="presenter">Petter Reinholdtsen - one of the sysvinit maintainers
<br>pere@hungry.com
- <br>FOSDEM 2008, 2008-02-26</div>
+ <br>FOSDEM 2008, 2008-02-24</div>
<!--
The very early boot is done before hard drive partitions are
mounted.</p>
-<ol>is
+<ol>
-<li>/sbin/init start, which looks at /etc/inittab and decides what to
+<li>/sbin/init stats and looks at /etc/inittab to decide what to
do.</li>
<li>The scripts in /etc/rcS.d/ are executed in sequence by
<h2>The ordering problem</h2>
<p>Script ordering is vital for this to work. And how are the scripts
-ordered? By numbers!
+ordered? By numbers 01-99!
<p>And the numbers are picked using skills, knowledge and negotiation.
Getting it right is often hard.
<p>The current Debian default is wrong. The stop sequence should by
-default be the reverse of the start sequence. It isn't.
+default be the reverse of the start sequence. It isn't. The default
+uses '20' for both.
<p>Reordering is hard and sometimes requires cooperation between
maintainers of all packages involved.
<dl>
<dt>Static checking of current headers:
-<tt>/usr/share/insserv/check-initd-order [-o] [-k]</tt>
+<br><tt>/usr/share/insserv/check-initd-order [-o] [-k]</tt>
<dd>report mismatch in current ordering.
<dt>Graph of the dependencies:
-<a href="sid-base-boot-20080220.dot"><tt>/usr/share/insserv/check-initd-order -g</tt></a>
-<dd>for reviewing dependencies
+<br><a href="sid-base-boot-20080220.dot"><tt>/usr/share/insserv/check-initd-order -g</tt></a>
+<dd>for reviewing dependencies with dotty from graphviz.
</dl>
<li>Finally reorder symlinks in rc*.d/ using dependencies
</ul>
+<p>Will refuse to enable when obsolete init.d scripts, loops,
+duplicate provides etc is detected</p>
+
<h2>Enabling dependency based boot sequencing II</h2>
-<p><pre size="-1">
+<p><pre>
# aptitude install insserv
# dpkg-reconfigure insserv
info: Checking if it is safe to convert to dependency based boot.
<p>Incorrect dependencies give the wrong but predictable and stable
(as in the same all the time) boot and shutdown order.</p>
+<p>Every insserv upload are checked using test suite to make sure the
+generated boot sequence is correct, and that previously detected bugs
+do not show up again.</p>
+
<p>It is possible to enable concurrent booting, running boot scripts
in parallel (CONCURRENCY=startpar in /etc/default/rcS)</p>
</dl>
<p>All of these represent points in time during boot and shutdown.
+Virtual facilities are defined in <tt>/etc/insserv.conf</tt> and
+<tt>/etc/insserv.conf.d/</tt>
<h2>What to list as dependencies (II)</h2>
stopped before <tt>sendsigs</tt> kills all processes during
shutdown.</p>
-XXX More
+<p>A sysadmin can provide overrides in
+<tt>/etc/insserv/overrides/scriptname</tt> if the script settings are
+wrong. The insserv package provides overrides in
+<tt>/usr/share/insserv/overrides/<tt> for packages currently missing
+headers.</p>
+
+<h2>Handling alternatives</h2>
+
+<p>Not quite tested yet.
+
+<p>Should perhaps be handled using virtual facilities in
+/etc/insserv.conf.d/.
+
+<p>Do not listing identical provides in several scripts - break
+installation.
<h2>Status of the dependency based boot system</h2>
<img alt="LSB header progress graph" src="lsb-header-progress.png" width="50%" align="right">
-<p>Release goal for Debian Lenny.
-<br>76% of packages got LSB headers
+<p>Release goal for Lenny.
+<br>76% of packages got LSB headers.
<br>Unsolved in BTS: ~85
<br>Without BTS reports: ~150
-<br>Last package will be fixed 2008-06-13 at the current rate.
+<br>Last package will be fixed 2008-06-15 at the current rate.
<br>Needs better documentation for maintainers.
<br>Should update Debian policy to reflect dependency based boot
sequencing.
<p>Two insserv bugs left to fix:
<ul>
-<li>Will sometimes add unwanted stop symlinks (<a href="http://bugs.debian.org/464017">#464017</a>).
+<li>Might add unwanted stop symlinks (<a href="http://bugs.debian.org/464017">#464017</a>).
<li>Will fail on "fake" loops as well as real loops. (<a href="http://bugs.debian.org/458582">#458582</a>)
</ul></p>
<p>See also wiki pages with documentation and status:
<ul>
-<li>http://wiki.debian.org/LSBInitScripts
-<li>http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot
+<li><a href="http://wiki.debian.org/LSBInitScripts">http://wiki.debian.org/LSBInitScripts</a>
+<li><a href="http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot">http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot</a>
<li>Repository: <tt>svn+ssh://svn.debian.org/svn/initscripts-ng/trunk/src/insserv</tt>
+
</ul>
+<p>There is also slides from my
+<a href="../200706-bootseq/200706-bootseq.html">talk from Debconf
+7</a>.<p>
+
+<p>More man-power is needed to report BTS reports, NMU packages and
+discover dependency errors. Please test the system.
+
<h2>Thank you very much</h2>
<h3>Questions?</h3>