X-Git-Url: https://pere.pagekite.me/gitweb/homepage.git/blobdiff_plain/864756f2f60f29cf2ea397e7445746eb5a582cda..45f7f5e186d8a1bcc88fe9f9794d3aa3333c83ab:/mypapers/200802-bootsequence/200802-bootsequence.html diff --git a/mypapers/200802-bootsequence/200802-bootsequence.html b/mypapers/200802-bootsequence/200802-bootsequence.html index 21e9e045bf..bdd8957556 100644 --- a/mypapers/200802-bootsequence/200802-bootsequence.html +++ b/mypapers/200802-bootsequence/200802-bootsequence.html @@ -6,6 +6,11 @@ +
@@ -55,7 +60,11 @@ This talk is about how all of this can be done with Debian. - how does it work in debian - effect on the boot - insserv + - how to verify the boot sequence + - check script + - dependency graph using dotty - how to test it + - overriding included headers - speed change? - concurrency @@ -104,6 +113,9 @@ The very early boot is done before hard drive partitions is mounted. +Note that because the Linux kernel is becoming more and more event +based, the boot sequence is no longer sequencial.
+
This is equivalent to switching to runlevel 0 (halt) or 6 (reboot), - with a minor exception. All scripts (both start and stop) are - executed with the stop argument. +
This is roughtly equivalent to switching to runlevel 0 (halt) or 6 +(reboot).
+ +Minor exception: all scripts (both start and stop) are executed + with the stop argument, ignoring their start and stop + setting and confusing script writers.
+ +Only stop scripts for services started in the previous runlevel is + executed.
Static checking of current headers: +/usr/share/insserv/check-initd-order [-o] [-k] - report mismatch +in current ordering. + +
Graph of the dependencies: +/usr/share/insserv/check-initd-order -g - for reviewing dependencies + +
+# aptitude install insserv +# dpkg-reconfigure insserv +info: Checking if it is safe to convert to dependency based boot. +info: Backing up existing boot scripts in \ + /var/lib/insserv/bootscripts-20080223T0742.tar.gz +info: Reordering boot system, log to \ + /var/lib/insserv/run-20080223T0742.log +info: Recording new boot sequence in \ + /var/lib/insserv/bootscripts-20080223T0742-after.list +info: Use '/usr/sbin/update-bootsystem-insserv \ + restore' to restore the old boot sequence. +Adding `diversion of /usr/sbin/update-rc.d to \ + /usr/sbin/update-rc.d.distrib by insserv' +success: Boot system successfully converted +# /var/lib/insserv/insserv-seq-changes \ + /var/lib/insserv/bootscripts-20080223T0742.tar.gz +# ++ +
update-rc.d refuse to Insert scripts which create a loop.
+ +update-rc.d require scripts to be inserted in dependency order.
+ +Incorrect dependencies give the wrong boot and shutdown order.
+ +It is possible to enable concurrent booting, running boot scripts + in parallel (CONCURRENCY=startpar in /etc/default/rcS)
+ +Run dpkg-reconfigure insserv and disable it. + +
It is always possible to disable just after it was enabled, before +any new packages are installed.
+To disable it, a backup of the old boot sequence is restored if no +changes has been done to the boot sequence since it was enabled. + +
If restoring is not possible, All postinst scripts for packages +with init.d scripts will be executed again to get them to call +update-rc.d and add the boot scripts again.
$remote_fs is needed by all scripts using files in /usr/. $syslog is needed only by scripts starting services logging to syslog.
-In the common case, the start and stop dependencies are identical. - -
Prefer virtual dependencies over specific dependencies - -XXX More -
Linux Software Base version 3.2 define these virtual facilities: @@ -273,6 +349,23 @@ facility, then that daemon has been started.
All of these represent points in time during boot and shutdown. +
Normally, the start and stop dependencies are the same. + +
Prefer virtual dependencies over specific dependencies. + +
When using specific dependencies, use the string listed in the + provides header of the scripts you depend on. + +
Scripts started in rcS.d/ need extra care. + +
Depend on $remote_fs unless started in rcS.d/. Make sure /usr/ is +available during start and that it is stopped before sendsigs kill all +processes during shutdown.
+ +XXX More +Release goal for Debian Lenny.
Packages with LSB header (in Sid): 654 of 866 (76%)
-
Unsolved BTS reports: XXX
+
Unsolved BTS reports: 85
Packages without BTS reports: ~150
Last package projected fixed 2008-07-19 with the current rate
Need better documentation -
Need debian policy updates +
Should update Debian policy to reflect this new feature. -
Fix insserv bugs +
Two insserv bugs to fix. +
+