1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" dir=
"ltr">
5 <meta http-equiv=
"Content-Type" content=
"text/html;charset=utf-8" />
6 <title>Petter Reinholdtsen: Entries Tagged bootsystem
</title>
7 <link rel=
"stylesheet" type=
"text/css" media=
"screen" href=
"http://people.skolelinux.org/pere/blog/style.css" />
8 <link rel=
"stylesheet" type=
"text/css" media=
"screen" href=
"http://people.skolelinux.org/pere/blog/vim.css" />
9 <link rel=
"alternate" title=
"RSS Feed" href=
"bootsystem.rss" type=
"application/rss+xml" />
14 <a href=
"http://people.skolelinux.org/pere/blog/">Petter Reinholdtsen
</a>
21 <h3>Entries tagged "bootsystem".
</h3>
25 <a href=
"http://people.skolelinux.org/pere/blog/Debian_boots_quicker_and_quicker.html">Debian boots quicker and quicker
</a>
31 <p>I spent Monday and tuesday this week in London with a lot of the
32 people involved in the boot system on Debian and Ubuntu, to see if we
33 could find more ways to speed up the boot system. This was an Ubuntu
35 <a href=
"https://wiki.ubuntu.com/FoundationsTeam/BootPerformance/DebianUbuntuSprint">developer
36 gathering
</a>. It was quite productive. We also discussed the future
37 of boot systems, and ways to handle the increasing number of boot
38 issues introduced by the Linux kernel becoming more and more
39 asynchronous and event base. The Ubuntu approach using udev and
40 upstart might be a good way forward. Time will show.
</p>
42 <p>Anyway, there are a few ways at the moment to speed up the boot
43 process in Debian. All of these should be applied to get a quick
48 <li>Use dash as /bin/sh.
</li>
50 <li>Disable the init.d/hwclock*.sh scripts and make sure the hardware
53 <li>Install and activate the insserv package to enable
54 <a href=
"http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot">dependency
55 based boot sequencing
</a>, and enable concurrent booting.
</li>
59 These points are based on the Google summer of code work done by
60 <a href=
"http://initscripts-ng.alioth.debian.org/soc2006-bootsystem/">Carlos
63 <p>Support for makefile-style concurrency during boot was uploaded to
64 unstable yesterday. When we tested it, we were able to cut
6 seconds
65 from the boot sequence. It depend on very correct dependency
66 declaration in all init.d scripts, so I expect us to find edge cases
67 where the dependences in some scripts are slightly wrong when we start
70 <p>On our IRC channel for this effort, #pkg-sysvinit, a new idea was
71 introduced by Raphael Geissert today, one that could affect the
72 startup speed as well. Instead of starting some scripts concurrently
73 from rcS.d/ and another set of scripts from rc2.d/, it would be
74 possible to run a of them in the same process. A quick way to test
75 this would be to enable insserv and run 'mv /etc/rc2.d/S* /etc/rcS.d/;
76 insserv'. Will need to test if that work. :)
</p>
82 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>.
87 <div class=
"padding"></div>
91 <a href=
"http://people.skolelinux.org/pere/blog/Taking_over_sysvinit_development.html">Taking over sysvinit development
</a>
97 <p>After several years of frustration with the lack of activity from
98 the existing sysvinit upstream developer, I decided a few weeks ago to
99 take over the package and become the new upstream. The number of
100 patches to track for the Debian package was becoming a burden, and the
101 lack of synchronization between the distribution made it hard to keep
102 the package up to date.
</p>
104 <p>On the new sysvinit team is the SuSe maintainer Dr. Werner Fink,
105 and my Debian co-maintainer Kel Modderman. About
10 days ago, I made
106 a new upstream tarball with version number
2.87dsf (for Debian, SuSe
107 and Fedora), based on the patches currently in use in these
108 distributions. We Debian maintainers plan to move to this tarball as
109 the new upstream as soon as we find time to do the merge. Since the
110 new tarball was created, we agreed with Werner at SuSe to make a new
111 upstream project at
<a href=
"http://savannah.nongnu.org/">Savannah
</a>, and continue
112 development there. The project is registered and currently waiting
113 for approval by the Savannah administrators, and as soon as it is
114 approved, we will import the old versions from svn and continue
115 working on the future release.
</p>
117 <p>It is a bit ironic that this is done now, when some of the involved
118 distributions are moving to upstart as a syvinit replacement.
</p>
124 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/nuug">nuug
</a>.
129 <div class=
"padding"></div>
133 <a href=
"http://people.skolelinux.org/pere/blog/Debian_has_switched_to_dependency_based_boot_sequencing.html">Debian has switched to dependency based boot sequencing
</a>
139 <p>Since this evening, with the upload of sysvinit version
2.87dsf-
2,
140 and the upload of insserv version
1.12.0-
10 yesterday, Debian unstable
141 have been migrated to using dependency based boot sequencing. This
142 conclude work me and others have been doing for the last three days.
143 It feels great to see this finally part of the default Debian
144 installation. Now we just need to weed out the last few problems that
145 are bound to show up, to get everything ready for Squeeze.
</p>
147 <p>The next step is migrating /sbin/init from sysvinit to upstart, and
148 fixing the more fundamental problem of handing the event based
149 non-predictable kernel in the early boot.
</p>
155 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/nuug">nuug
</a>.
160 <div class=
"padding"></div>
164 <a href=
"http://people.skolelinux.org/pere/blog/Parallellizing_the_boot_in_Debian_Squeeze___ready_for_wider_testing.html">Parallellizing the boot in Debian Squeeze - ready for wider testing
</a>
170 <p>These days, the init.d script dependencies in Squeeze are quite
171 complete, so complete that it is actually possible to run all the
172 init.d scripts in parallell based on these dependencies. If you want
173 to test your Squeeze system, make sure
174 <a href=
"http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot">dependency
175 based boot sequencing
</a> is enabled, and add this line to
176 /etc/default/rcS:
</p>
182 <p>That is it. It will cause sysv-rc to use the startpar tool to run
183 scripts in parallel using the dependency information stored in
184 /etc/init.d/.depend.boot, /etc/init.d/.depend.start and
185 /etc/init.d/.depend.stop to order the scripts. Startpar is configured
186 to try to start the kdm and gdm scripts as early as possible, and will
187 start the facilities required by kdm or gdm as early as possible to
188 make this happen.
</p>
190 <p>Give it a try, and see if you like the result. If some services
191 fail to start properly, it is most likely because they have incomplete
192 init.d script dependencies in their startup script (or some of their
193 dependent scripts have incomplete dependencies). Report bugs and get
194 the package maintainers to fix it. :)
</p>
196 <p>Running scripts in parallel could be the default in Debian when we
197 manage to get the init.d script dependencies complete and correct. I
198 expect we will get there in Squeeze+
1, if we get manage to test and
199 fix the remaining issues.
</p>
201 <p>If you report any problems with dependencies in init.d scripts to
202 the BTS, please usertag the report to get it to show up at
203 <a href=
"http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=initscripts-ng-devel@lists.alioth.debian.org">the
204 list of usertagged bugs related to this
</a>.
</p>
210 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>.
215 <div class=
"padding"></div>
219 <a href=
"http://people.skolelinux.org/pere/blog/systemd__an_interesting_alternative_to_upstart.html">systemd, an interesting alternative to upstart
</a>
225 <p>The last few days a new boot system called
226 <a href=
"http://www.freedesktop.org/wiki/Software/systemd">systemd
</a>
228 <a href=
"http://0pointer.de/blog/projects/systemd.html">introduced
</a>
230 to the free software world. I have not yet had time to play around
231 with it, but it seem to be a very interesting alternative to
232 <a href=
"http://upstart.ubuntu.com/">upstart
</a>, and might prove to be
233 a good alternative for Debian when we are able to switch to an event
234 based boot system. Tollef is
235 <a href=
"http://bugs.debian.org/580814">in the process
</a> of getting
236 systemd into Debian, and I look forward to seeing how well it work. I
237 like the fact that systemd handles init.d scripts with dependency
238 information natively, allowing them to run in parallel where upstart
239 at the moment do not.
</p>
241 <p>Unfortunately do systemd have the same problem as upstart regarding
242 platform support. It only work on recent Linux kernels, and also need
243 some new kernel features enabled to function properly. This means
244 kFreeBSD and Hurd ports of Debian will need a port or a different boot
245 system. Not sure how that will be handled if systemd proves to be the
248 <p>In the mean time, based on the
249 <a href=
"http://lists.debian.org/debian-devel/2010/05/msg00122.html">input
250 on debian-devel@
</a> regarding parallel booting in Debian, I have
251 decided to enable full parallel booting as the default in Debian as
252 soon as possible (probably this weekend or early next week), to see if
253 there are any remaining serious bugs in the init.d dependencies. A
254 new version of the sysvinit package implementing this change is
255 already in experimental. If all go well, Squeeze will be released
256 with parallel booting enabled by default.
</p>
262 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/nuug">nuug
</a>.
267 <div class=
"padding"></div>
271 <a href=
"http://people.skolelinux.org/pere/blog/Parallellized_boot_is_now_the_default_in_Debian_unstable.html">Parallellized boot is now the default in Debian/unstable
</a>
277 <p>Since this evening, parallel booting is the default in
278 Debian/unstable for machines using dependency based boot sequencing.
279 Apparently the testing of concurrent booting has been wider than
280 expected, if I am to believe the
281 <a href=
"http://lists.debian.org/debian-devel/2010/05/msg00122.html">input
282 on debian-devel@
</a>, and I concluded a few days ago to move forward
283 with the feature this weekend, to give us some time to detect any
284 remaining problems before Squeeze is frozen. If serious problems are
285 detected, it is simple to change the default back to sequential boot.
286 The upload of the new sysvinit package also activate a new upstream
289 More information about
290 <a href=
"http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot">dependency
291 based boot sequencing
</a> is available from the Debian wiki. It is
292 currently possible to disable parallel booting when one run into
293 problems caused by it, by adding this line to /etc/default/rcS:
</p>
299 <p>If you report any problems with dependencies in init.d scripts to
300 the BTS, please usertag the report to get it to show up at
301 <a href=
"http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=initscripts-ng-devel@lists.alioth.debian.org">the
302 list of usertagged bugs related to this
</a>.
</p>
308 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>.
313 <div class=
"padding"></div>
317 <a href=
"http://people.skolelinux.org/pere/blog/Parallellized_boot_seem_to_hold_up_well_in_Debian_testing.html">Parallellized boot seem to hold up well in Debian/testing
</a>
323 <p>A few days ago, parallel booting was enabled in Debian/testing.
324 The feature seem to hold up pretty well, but three fairly serious
325 issues are known and should be solved:
329 <li>The wicd package seen to
330 <a href=
"http://bugs.debian.org/508289">break NFS mounting
</a> and
331 <a href=
"http://bugs.debian.org/581586">network setup
</a> when
332 parallel booting is enabled. No idea why, but the wicd maintainer
333 seem to be on the case.
</li>
335 <li>The nvidia X driver seem to
336 <a href=
"http://bugs.debian.org/583312">have a race condition
</a>
337 triggered more easily when parallel booting is in effect. The
338 maintainer is on the case.
</li>
340 <li>The sysv-rc package fail to properly enable dependency based boot
341 sequencing (the shutdown is broken) when old file-rc users
342 <a href=
"http://bugs.debian.org/575080">try to switch back
</a> to
343 sysv-rc. One way to solve it would be for file-rc to create
344 /etc/init.d/.legacy-bootordering, and another is to try to make
345 sysv-rc more robust. Will investigate some more and probably upload a
346 workaround in sysv-rc to help those trying to move from file-rc to
347 sysv-rc get a working shutdown.
</li>
351 <p>All in all not many surprising issues, and all of them seem
352 solvable before Squeeze is released. In addition to these there are
353 some packages with bugs in their dependencies and run level settings,
354 which I expect will be fixed in a reasonable time span.
</p>
356 <p>If you report any problems with dependencies in init.d scripts to
357 the BTS, please usertag the report to get it to show up at
358 <a href=
"http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=initscripts-ng-devel@lists.alioth.debian.org">the
359 list of usertagged bugs related to this
</a>.
</p>
361 <p>Update: Correct bug number to file-rc issue.
</p>
367 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>.
372 <div class=
"padding"></div>
376 <a href=
"http://people.skolelinux.org/pere/blog/KDM_fail_at_boot_with_NVidia_cards___and_no_one_try_to_fix_it_.html">KDM fail at boot with NVidia cards - and no one try to fix it?
</a>
382 <p>It is strange to watch how a bug in Debian causing KDM to fail to
383 start at boot when an NVidia video card is used is handled. The
384 problem seem to be that the nvidia X.org driver uses a long time to
385 initialize, and this duration is longer than kdm is configured to
388 <p>I came across two bugs related to this issue,
389 <a href=
"http://bugs.debian.org/583312">#
583312</a> initially filed
390 against initscripts and passed on to nvidia-glx when it became obvious
391 that the nvidia drivers were involved, and
392 <a href=
"http://bugs.debian.org/524751">#
524751</a> initially filed against
393 kdm and passed on to src:nvidia-graphics-drivers for unknown reasons.
</p>
395 <p>To me, it seem that no-one is interested in actually solving the
396 problem nvidia video card owners experience and make sure the Debian
397 distribution work out of the box for these users. The nvidia driver
398 maintainers expect kdm to be set up to wait longer, while kdm expect
399 the nvidia driver maintainers to fix the driver to start faster, and
400 while they wait for each other I guess the users end up switching to a
401 distribution that work for them. I have no idea what the solution is,
402 but I am pretty sure that waiting for each other is not it.
</p>
404 <p>I wonder why we end up handling bugs this way.
</p>
410 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>.
415 <div class=
"padding"></div>
419 <a href=
"http://people.skolelinux.org/pere/blog/Upstart_or_sysvinit___as_init_d_scripts_see_it.html">Upstart or sysvinit - as init.d scripts see it
</a>
425 <p>If Debian is to migrate to upstart on Linux, I expect some init.d
426 scripts to migrate (some of) their operations to upstart job while
427 keeping the init.d for hurd and kfreebsd. The packages with such
428 needs will need a way to get their init.d scripts to behave
429 differently when used with sysvinit and with upstart. Because of
430 this, I had a look at the environment variables set when a init.d
431 script is running under upstart, and when it is not.
</p>
433 <p>With upstart, I notice these environment variables are set when a
434 script is started from rcS.d/ (ignoring some irrelevant ones like
443 UPSTART_EVENTS=startup
445 UPSTART_JOB=rc-sysinit
448 <p>With sysvinit, these environment variables are set for the same
452 INIT_VERSION=sysvinit-
2.88
459 <p>The RUNLEVEL and PREVLEVEL environment variables passed on from
460 sysvinit are not set by upstart. Not sure if it is intentional or not
461 to not be compatible with sysvinit in this regard.
</p>
463 <p>For scripts needing to behave differently when upstart is used,
464 looking for the UPSTART_JOB environment variable seem to be a good
471 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>.
476 <div class=
"padding"></div>
480 <a href=
"http://people.skolelinux.org/pere/blog/Automatic_upgrade_testing_from_Lenny_to_Squeeze.html">Automatic upgrade testing from Lenny to Squeeze
</a>
486 <p>The last few days I have done some upgrade testing in Debian, to
487 see if the upgrade from Lenny to Squeeze will go smoothly. A few bugs
488 have been discovered and reported in the process
489 (
<a href=
"http://bugs.debian.org/585410">#
585410</a> in nagios3-cgi,
490 <a href=
"http://bugs.debian.org/584879">#
584879</a> already fixed in
491 enscript and
<a href=
"http://bugs.debian.org/584861">#
584861</a> in
492 kdebase-workspace-data), and to get a more regular testing going on, I
493 am working on a script to automate the test.
</p>
495 <p>The idea is to create a Lenny chroot and use tasksel to install a
496 Gnome or KDE desktop installation inside the chroot before upgrading
497 it. To ensure no services are started in the chroot, a policy-rc.d
498 script is inserted. To make sure tasksel believe it is to install a
499 desktop on a laptop, the tasksel tests are replaced in the chroot
500 (only acceptable because this is a throw-away chroot).
</p>
502 <p>A naive upgrade from Lenny to Squeeze using aptitude dist-upgrade
503 currently always fail because udev refuses to upgrade with the kernel
504 in Lenny, so to avoid that problem the file /etc/udev/kernel-upgrade
505 is created. The bug report
506 <a href=
"http://bugs.debian.org/566000">#
566000</a> make me suspect
507 this problem do not trigger in a chroot, but I touch the file anyway
508 to make sure the upgrade go well. Testing on virtual and real
509 hardware have failed me because of udev so far, and creating this file
510 do the trick in such settings anyway. This is a
511 <a href=
"http://www.linuxquestions.org/questions/debian-26/failed-dist-upgrade-due-to-udev-config_sysfs_deprecated-nonsense-804130/">known
512 issue
</a> and the current udev behaviour is intended by the udev
513 maintainer because he lack the resources to rewrite udev to keep
514 working with old kernels or something like that. I really wish the
515 udev upstream would keep udev backwards compatible, to avoid such
516 upgrade problem, but given that they fail to do so, I guess
517 documenting the way out of this mess is the best option we got for
520 <p>Anyway, back to the task at hand, testing upgrades. This test
521 script, which I call
<tt>upgrade-test
</tt> for now, is doing the
539 mirror=http://ftp.skolelinux.org/debian
540 tmpdir=chroot-$from-upgrade-$to-$desktop
542 debootstrap $from $tmpdir $mirror
543 chroot $tmpdir aptitude update
544 cat
> $tmpdir/usr/sbin/policy-rc.d
<<EOF
548 chmod a+rx $tmpdir/usr/sbin/policy-rc.d
552 mount -t proc proc $tmpdir/proc
553 # Make sure proc is unmounted also on failure
554 trap exit_cleanup EXIT INT
556 chroot $tmpdir aptitude -y install debconf-utils
558 # Make sure tasksel autoselection trigger. It need the test scripts
559 # to return the correct answers.
560 echo tasksel tasksel/desktop multiselect $desktop | \
561 chroot $tmpdir debconf-set-selections
563 # Include the desktop and laptop task
564 for test in desktop laptop ; do
565 echo
> $tmpdir/usr/lib/tasksel/tests/$test
<<EOF
569 chmod a+rx $tmpdir/usr/lib/tasksel/tests/$test
572 DEBIAN_FRONTEND=noninteractive
573 DEBIAN_PRIORITY=critical
574 export DEBIAN_FRONTEND DEBIAN_PRIORITY
575 chroot $tmpdir tasksel --new-install
577 echo deb $mirror $to main
> $tmpdir/etc/apt/sources.list
578 chroot $tmpdir aptitude update
579 touch $tmpdir/etc/udev/kernel-upgrade
580 chroot $tmpdir aptitude -y dist-upgrade
584 <p>I suspect it would be useful to test upgrades with both apt-get and
585 with aptitude, but I have not had time to look at how they behave
586 differently so far. I hope to get a cron job running to do the test
587 regularly and post the result on the web. The Gnome upgrade currently
588 work, while the KDE upgrade fail because of the bug in
589 kdebase-workspace-data
</p>
591 <p>I am not quite sure what kind of extract from the huge upgrade logs
592 (KDE
167 KiB, Gnome
516 KiB) it make sense to include in this blog
593 post, so I will refrain from trying. I can report that for Gnome,
594 aptitude report
760 packages upgraded,
448 newly installed,
129 to
595 remove and
1 not upgraded and
1024MB need to be downloaded while for
596 KDE the same numbers are
702 packages upgraded,
507 newly installed,
597 193 to remove and
0 not upgraded and
1117MB need to be downloaded
</p>
599 <p>I am very happy to notice that the Gnome desktop + laptop upgrade
600 is able to migrate to dependency based boot sequencing and parallel
601 booting without a hitch. Was unsure if there were still bugs with
602 packages failing to clean up their obsolete init.d script during
603 upgrades, and no such problem seem to affect the Gnome desktop+laptop
610 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>.
615 <div class=
"padding"></div>
619 <a href=
"http://people.skolelinux.org/pere/blog/What_should_start_from__etc_rcS_d__in_Debian____almost_nothing.html">What should start from /etc/rcS.d/ in Debian? - almost nothing
</a>
625 <p>In the Debian boot system, several packages include scripts that
626 are started from /etc/rcS.d/. In fact, there is a bite more of them
627 than make sense, and this causes a few problems. What kind of
628 problems, you might ask. There are at least two problems. The first
629 is that it is not possible to recover a machine after switching to
630 runlevel
1. One need to actually reboot to get the machine back to
631 the expected state. The other is that single user boot will sometimes
632 run into problems because some of the subsystems are activated before
633 the root login is presented, causing problems when trying to recover a
634 machine from a problem in that subsystem. A minor additional point is
635 that moving more scripts out of rcS.d/ and into the other rc#.d/
636 directories will increase the amount of scripts that can run in
637 parallel during boot, and thus decrease the boot time.
</p>
639 <p>So, which scripts should start from rcS.d/. In short, only the
640 scripts that _have_ to execute before the root login prompt is
641 presented during a single user boot should go there. Everything else
642 should go into the numeric runlevels. This means things like
643 lm-sensors, fuse and x11-common should not run from rcS.d, but from
644 the numeric runlevels. Today in Debian, there are around
115 init.d
645 scripts that are started from rcS.d/, and most of them should be moved
646 out. Do your package have one of them? Please help us make single
647 user and runlevel
1 better by moving it.
</p>
649 <p>Scripts setting up the screen, keyboard, system partitions
650 etc. should still be started from rcS.d/, but there is for example no
651 need to have the network enabled before the single user login prompt
654 <p>As always, things are not so easy to fix as they sound. To keep
655 Debian systems working while scripts migrate and during upgrades, the
656 scripts need to be moved from rcS.d/ to rc2.d/ in reverse dependency
657 order, ie the scripts that nothing in rcS.d/ depend on can be moved,
658 and the next ones can only be moved when their dependencies have been
659 moved first. This migration must be done sequentially while we ensure
660 that the package system upgrade packages in the right order to keep
661 the system state correct. This will require some coordination when it
662 comes to network related packages, but most of the packages with
663 scripts that should migrate do not have anything in rcS.d/ depending
664 on them. Some packages have already been updated, like the sudo
665 package, while others are still left to do. I wish I had time to work
666 on this myself, but real live constrains make it unlikely that I will
667 find time to push this forward.
</p>
673 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>.
678 <div class=
"padding"></div>
682 <a href=
"http://people.skolelinux.org/pere/blog/How_is_booting_into_runlevel_1_different_from_single_user_boots_.html">How is booting into runlevel
1 different from single user boots?
</a>
688 <p>Wouter Verhelst have some
689 <a href=
"http://grep.be/blog/en/retorts/pere_kubuntu_boot">interesting
690 comments and opinions
</a> on my blog post on
691 <a href=
"http://people.skolelinux.org/pere/blog/What_should_start_from__etc_rcS_d__in_Debian____almost_nothing.html">the
692 need to clean up /etc/rcS.d/ in Debian
</a> and my blog post about
693 <a href=
"http://people.skolelinux.org/pere/blog/What_is_missing_in_the_Debian_desktop__or_why_my_parents_use_Kubuntu.html">the
694 default KDE desktop in Debian
</a>. I only have time to address one
695 small piece of his comment now, and though it best to address the
696 misunderstanding he bring forward:
</p>
699 Currently, a system admin has four options: [...] boot to a
700 single-user system (by adding 'single' to the kernel command line;
701 this runs rcS and rc1 scripts)
704 <p>This make me believe Wouter believe booting into single user mode
705 and booting into runlevel
1 is the same. I am not surprised he
706 believe this, because it would make sense and is a quite sensible
707 thing to believe. But because the boot in Debian is slightly broken,
708 runlevel
1 do not work properly and it isn't the same as single user
709 mode. I'll try to explain what is actually happing, but it is a bit
712 <p>Single user mode is defined like this in /etc/inittab:
713 "
<tt>~~:S:wait:/sbin/sulogin
</tt>". This means the only thing that is
714 executed in single user mode is sulogin. Single user mode is a boot
715 state "between
" the runlevels, and when booting into single user mode,
716 only the scripts in /etc/rcS.d/ are executed before the init process
717 enters the single user state. When switching to runlevel 1, the state
718 is in fact not ending in runlevel 1, but it passes through runlevel 1
719 and end up in the single user mode (see /etc/rc1.d/S03single, which
720 runs "init -t1 S
" to switch to single user mode at the end of runlevel
721 1. It is confusing that the 'S' (single user) init mode is not the
722 mode enabled by /etc/rcS.d/ (which is more like the initial boot
725 <p>This summary might make it clearer. When booting for the first
726 time into single user mode, the following commands are executed:
727 "<tt>/etc/init.d/rc S; /sbin/sulogin
</tt>". When booting into
728 runlevel 1, the following commands are executed: "<tt>/etc/init.d/rc
729 S; /etc/init.d/rc
1; /sbin/sulogin
</tt>". A problem show up when
730 trying to continue after visiting single user mode. Not all services
731 are started again as they should, causing the machine to end up in an
732 unpredicatble state. This is why Debian admins recommend rebooting
733 after visiting single user mode.</p>
735 <p>A similar problem with runlevel 1 is caused by the amount of
736 scripts executed from /etc/rcS.d/. When switching from say runlevel 2
737 to runlevel 1, the services started from /etc/rcS.d/ are not properly
738 stopped when passing through the scripts in /etc/rc1.d/, and not
739 started again when switching away from runlevel 1 to the runlevels
740 2-5. I believe the problem is best fixed by moving all the scripts
741 out of /etc/rcS.d/ that are not <strong>required</strong> to get a
742 functioning single user mode during boot.</p>
744 <p>I have spent several years investigating the Debian boot system,
745 and discovered this problem a few years ago. I suspect it originates
746 from when sysvinit was introduced into Debian, a long time ago.</p>
752 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bootsystem
">bootsystem</a>, <a href="http://people.skolelinux.org/pere/blog/tags/debian
">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english
">english</a>.
757 <div class="padding
"></div>
759 <p style="text-align: right;
"><a href="bootsystem.rss
"><img src="http://people.skolelinux.org/pere/blog/xml.gif
" alt="RSS Feed
" width="36" height="14" /></a></p>
770 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2012/
01/
">January (7)</a></li>
772 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2012/
02/
">February (10)</a></li>
774 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2012/
03/
">March (17)</a></li>
776 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2012/
04/
">April (4)</a></li>
783 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2011/
01/
">January (16)</a></li>
785 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2011/
02/
">February (6)</a></li>
787 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2011/
03/
">March (6)</a></li>
789 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2011/
04/
">April (7)</a></li>
791 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2011/
05/
">May (3)</a></li>
793 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2011/
06/
">June (2)</a></li>
795 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2011/
07/
">July (7)</a></li>
797 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2011/
08/
">August (6)</a></li>
799 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2011/
09/
">September (4)</a></li>
801 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2011/
10/
">October (2)</a></li>
803 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2011/
11/
">November (3)</a></li>
805 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2011/
12/
">December (1)</a></li>
812 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2010/
01/
">January (2)</a></li>
814 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2010/
02/
">February (1)</a></li>
816 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2010/
03/
">March (3)</a></li>
818 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2010/
04/
">April (3)</a></li>
820 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2010/
05/
">May (9)</a></li>
822 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2010/
06/
">June (14)</a></li>
824 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2010/
07/
">July (12)</a></li>
826 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2010/
08/
">August (13)</a></li>
828 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2010/
09/
">September (7)</a></li>
830 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2010/
10/
">October (9)</a></li>
832 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2010/
11/
">November (13)</a></li>
834 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2010/
12/
">December (12)</a></li>
841 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2009/
01/
">January (8)</a></li>
843 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2009/
02/
">February (8)</a></li>
845 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2009/
03/
">March (12)</a></li>
847 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2009/
04/
">April (10)</a></li>
849 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2009/
05/
">May (9)</a></li>
851 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2009/
06/
">June (3)</a></li>
853 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2009/
07/
">July (4)</a></li>
855 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2009/
08/
">August (3)</a></li>
857 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2009/
09/
">September (1)</a></li>
859 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2009/
10/
">October (2)</a></li>
861 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2009/
11/
">November (3)</a></li>
863 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2009/
12/
">December (3)</a></li>
870 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2008/
11/
">November (5)</a></li>
872 <li><a href="http://people.skolelinux.org/pere/blog/archive/
2008/
12/
">December (7)</a></li>
883 <li><a href="http://people.skolelinux.org/pere/blog/tags/
3d-printer
">3d-printer (13)</a></li>
885 <li><a href="http://people.skolelinux.org/pere/blog/tags/amiga
">amiga (1)</a></li>
887 <li><a href="http://people.skolelinux.org/pere/blog/tags/aros
">aros (1)</a></li>
889 <li><a href="http://people.skolelinux.org/pere/blog/tags/bitcoin
">bitcoin (2)</a></li>
891 <li><a href="http://people.skolelinux.org/pere/blog/tags/bootsystem
">bootsystem (12)</a></li>
893 <li><a href="http://people.skolelinux.org/pere/blog/tags/bsa
">bsa (2)</a></li>
895 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian
">debian (54)</a></li>
897 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian edu
">debian edu (97)</a></li>
899 <li><a href="http://people.skolelinux.org/pere/blog/tags/digistan
">digistan (7)</a></li>
901 <li><a href="http://people.skolelinux.org/pere/blog/tags/english
">english (121)</a></li>
903 <li><a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami
">fiksgatami (15)</a></li>
905 <li><a href="http://people.skolelinux.org/pere/blog/tags/fildeling
">fildeling (12)</a></li>
907 <li><a href="http://people.skolelinux.org/pere/blog/tags/intervju
">intervju (22)</a></li>
909 <li><a href="http://people.skolelinux.org/pere/blog/tags/kart
">kart (15)</a></li>
911 <li><a href="http://people.skolelinux.org/pere/blog/tags/ldap
">ldap (8)</a></li>
913 <li><a href="http://people.skolelinux.org/pere/blog/tags/lenker
">lenker (4)</a></li>
915 <li><a href="http://people.skolelinux.org/pere/blog/tags/ltsp
">ltsp (1)</a></li>
917 <li><a href="http://people.skolelinux.org/pere/blog/tags/multimedia
">multimedia (14)</a></li>
919 <li><a href="http://people.skolelinux.org/pere/blog/tags/norsk
">norsk (156)</a></li>
921 <li><a href="http://people.skolelinux.org/pere/blog/tags/nuug
">nuug (120)</a></li>
923 <li><a href="http://people.skolelinux.org/pere/blog/tags/open311
">open311 (2)</a></li>
925 <li><a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett
">opphavsrett (24)</a></li>
927 <li><a href="http://people.skolelinux.org/pere/blog/tags/personvern
">personvern (46)</a></li>
929 <li><a href="http://people.skolelinux.org/pere/blog/tags/raid
">raid (1)</a></li>
931 <li><a href="http://people.skolelinux.org/pere/blog/tags/reprap
">reprap (11)</a></li>
933 <li><a href="http://people.skolelinux.org/pere/blog/tags/rfid
">rfid (2)</a></li>
935 <li><a href="http://people.skolelinux.org/pere/blog/tags/robot
">robot (4)</a></li>
937 <li><a href="http://people.skolelinux.org/pere/blog/tags/rss
">rss (1)</a></li>
939 <li><a href="http://people.skolelinux.org/pere/blog/tags/ruter
">ruter (4)</a></li>
941 <li><a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet
">sikkerhet (23)</a></li>
943 <li><a href="http://people.skolelinux.org/pere/blog/tags/sitesummary
">sitesummary (4)</a></li>
945 <li><a href="http://people.skolelinux.org/pere/blog/tags/standard
">standard (24)</a></li>
947 <li><a href="http://people.skolelinux.org/pere/blog/tags/stavekontroll
">stavekontroll (1)</a></li>
949 <li><a href="http://people.skolelinux.org/pere/blog/tags/stortinget
">stortinget (3)</a></li>
951 <li><a href="http://people.skolelinux.org/pere/blog/tags/surveillance
">surveillance (9)</a></li>
953 <li><a href="http://people.skolelinux.org/pere/blog/tags/valg
">valg (6)</a></li>
955 <li><a href="http://people.skolelinux.org/pere/blog/tags/video
">video (23)</a></li>
957 <li><a href="http://people.skolelinux.org/pere/blog/tags/vitenskap
">vitenskap (1)</a></li>
959 <li><a href="http://people.skolelinux.org/pere/blog/tags/web
">web (18)</a></li>
965 <p style="text-align: right
">
966 Created by <a href="http://steve.org.uk/Software/chronicle
">Chronicle v4.4</a>