1 Title: What should start from /etc/rcS.d/ in Debian? - almost nothing
2 Tags: english, debian, bootsystem
5 <p>In the Debian boot system, several packages include scripts that
6 are started from /etc/rcS.d/. In fact, there is a bite more of them
7 than make sense, and this causes a few problems. What kind of
8 problems, you might ask. There are at least two problems. The first
9 is that it is not possible to recover a machine after switching to
10 runlevel 1. One need to actually reboot to get the machine back to
11 the expected state. The other is that single user boot will sometimes
12 run into problems because some of the subsystems are activated before
13 the root login is presented, causing problems when trying to recover a
14 machine from a problem in that subsystem. A minor additional point is
15 that moving more scripts out of rcS.d/ and into the other rc#.d/
16 directories will increase the amount of scripts that can run in
17 parallel during boot, and thus decrease the boot time.</p>
19 <p>So, which scripts should start from rcS.d/. In short, only the
20 scripts that _have_ to execute before the root login prompt is
21 presented during a single user boot should go there. Everything else
22 should go into the numeric runlevels. This means things like
23 lm-sensors, fuse and x11-common should not run from rcS.d, but from
24 the numeric runlevels. Today in Debian, there are around 115 init.d
25 scripts that are started from rcS.d/, and most of them should be moved
26 out. Do your package have one of them? Please help us make single
27 user and runlevel 1 better by moving it.</p>
29 <p>Scripts setting up the screen, keyboard, system partitions
30 etc. should still be started from rcS.d/, but there is for example no
31 need to have the network enabled before the single user login prompt
34 <p>As always, things are not so easy to fix as they sound. To keep
35 Debian systems working while scripts migrate and during upgrades, the
36 scripts need to be moved from rcS.d/ to rc2.d/ in reverse dependency
37 order, ie the scripts that nothing in rcS.d/ depend on can be moved,
38 and the next ones can only be moved when their dependencies have been
39 moved first. This migration must be done sequentially while we ensure
40 that the package system upgrade packages in the right order to keep
41 the system state correct. This will require some coordination when it
42 comes to network related packages, but most of the packages with
43 scripts that should migrate do not have anything in rcS.d/ depending
44 on them. Some packages have already been updated, like the sudo
45 package, while others are still left to do. I wish I had time to work
46 on this myself, but real live constrains make it unlikely that I will
47 find time to push this forward.</p>