]> pere.pagekite.me Git - homepage.git/blob - blog/tags/bootsystem/index.html
790b78b127d886309010def92df77f0f37ce6a8c
[homepage.git] / blog / tags / bootsystem / index.html
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">
4 <head>
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" />
10 </head>
11 <body>
12 <div class="title">
13 <h1>
14 <a href="http://people.skolelinux.org/pere/blog/">Petter Reinholdtsen</a>
15
16 </h1>
17
18 </div>
19
20
21 <h3>Entries tagged "bootsystem".</h3>
22
23 <div class="entry">
24 <div class="title">
25 <a href="http://people.skolelinux.org/pere/blog/How_to_stay_with_sysvinit_in_Debian_Jessie.html">How to stay with sysvinit in Debian Jessie</a>
26 </div>
27 <div class="date">
28 22nd November 2014
29 </div>
30 <div class="body">
31 <p>By now, it is well known that Debian Jessie will not be using
32 sysvinit as its boot system by default. But how can one keep using
33 sysvinit in Jessie? It is fairly easy, and here are a few recipes,
34 courtesy of
35 <a href="http://www.vitavonni.de/blog/201410/2014102101-avoiding-systemd.html">Erich
36 Schubert</a> and
37 <a href="http://smcv.pseudorandom.co.uk/2014/still_universal/">Simon
38 McVittie</a>.
39
40 <p>If you already are using Wheezy and want to upgrade to Jessie and
41 keep sysvinit as your boot system, create a file
42 <tt>/etc/apt/preferences.d/use-sysvinit</tt> with this content before
43 you upgrade:</p>
44
45 <p><blockquote><pre>
46 Package: systemd-sysv
47 Pin: release o=Debian
48 Pin-Priority: -1
49 </pre></blockquote><p>
50
51 <p>This file content will tell apt and aptitude to not consider
52 installing systemd-sysv as part of any installation and upgrade
53 solution when resolving dependencies, and thus tell it to avoid
54 systemd as a default boot system. The end result should be that the
55 upgraded system keep using sysvinit.</p>
56
57 <p>If you are installing Jessie for the first time, there is no way to
58 get sysvinit installed by default (debootstrap used by
59 debian-installer have no option for this), but one can tell the
60 installer to switch to sysvinit before the first boot. Either by
61 using a kernel argument to the installer, or by adding a line to the
62 preseed file used. First, the kernel command line argument:
63
64 <p><blockquote><pre>
65 preseed/late_command="in-target apt-get install --purge -y sysvinit-core"
66 </pre></blockquote><p>
67
68 <p>Next, the line to use in a preseed file:</p>
69
70 <p><blockquote><pre>
71 d-i preseed/late_command string in-target apt-get install -y sysvinit-core
72 </pre></blockquote><p>
73
74 <p>One can of course also do this after the first boot by installing
75 the sysvinit-core package.</p>
76
77 <p>I recommend only using sysvinit if you really need it, as the
78 sysvinit boot sequence in Debian have several hardware specific bugs
79 on Linux caused by the fact that it is unpredictable when hardware
80 devices show up during boot. But on the other hand, the new default
81 boot system still have a few rough edges I hope will be fixed before
82 Jessie is released.</p>
83
84 <p>Update 2014-11-26: Inspired by
85 <ahref="https://www.mirbsd.org/permalinks/wlog-10-tg_e20141125-tg.htm#e20141125-tg_wlog-10-tg">a
86 blog post by Torsten Glaser</a>, added --purge to the preseed
87 line.</p>
88
89 </div>
90 <div class="tags">
91
92
93 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>.
94
95
96 </div>
97 </div>
98 <div class="padding"></div>
99
100 <div class="entry">
101 <div class="title">
102 <a href="http://people.skolelinux.org/pere/blog/Testing_sysvinit_from_experimental_in_Debian_Hurd.html">Testing sysvinit from experimental in Debian Hurd</a>
103 </div>
104 <div class="date">
105 3rd February 2014
106 </div>
107 <div class="body">
108 <p>A few days ago I decided to try to help the Hurd people to get
109 their changes into sysvinit, to allow them to use the normal sysvinit
110 boot system instead of their old one. This follow up on the
111 <a href="https://teythoon.cryptobitch.de//categories/gsoc.html">great
112 Google Summer of Code work</a> done last summer by Justus Winter to
113 get Debian on Hurd working more like Debian on Linux. To get started,
114 I downloaded a prebuilt hard disk image from
115 <a href="http://ftp.debian-ports.org/debian-cd/hurd-i386/current/debian-hurd.img.tar.gz">http://ftp.debian-ports.org/debian-cd/hurd-i386/current/debian-hurd.img.tar.gz</a>,
116 and started it using virt-manager.</p>
117
118 <p>The first think I had to do after logging in (root without any
119 password) was to get the network operational. I followed
120 <a href="https://www.debian.org/ports/hurd/hurd-install">the
121 instructions on the Debian GNU/Hurd ports page</a> and ran these
122 commands as root to get the machine to accept a IP address from the
123 kvm internal DHCP server:</p>
124
125 <p><blockquote><pre>
126 settrans -fgap /dev/netdde /hurd/netdde
127 kill $(ps -ef|awk '/[p]finet/ { print $2}')
128 kill $(ps -ef|awk '/[d]evnode/ { print $2}')
129 dhclient /dev/eth0
130 </pre></blockquote></p>
131
132 <p>After this, the machine had internet connectivity, and I could
133 upgrade it and install the sysvinit packages from experimental and
134 enable it as the default boot system in Hurd.</p>
135
136 <p>But before I did that, I set a password on the root user, as ssh is
137 running on the machine it for ssh login to work a password need to be
138 set. Also, note that a bug somewhere in openssh on Hurd block
139 compression from working. Remember to turn that off on the client
140 side.</p>
141
142 <p>Run these commands as root to upgrade and test the new sysvinit
143 stuff:</p>
144
145 <p><blockquote><pre>
146 cat > /etc/apt/sources.list.d/experimental.list &lt;&lt;EOF
147 deb http://http.debian.net/debian/ experimental main
148 EOF
149 apt-get update
150 apt-get dist-upgrade
151 apt-get install -t experimental initscripts sysv-rc sysvinit \
152 sysvinit-core sysvinit-utils
153 update-alternatives --config runsystem
154 </pre></blockquote></p>
155
156 <p>To reboot after switching boot system, you have to use
157 <tt>reboot-hurd</tt> instead of just <tt>reboot</tt>, as there is not
158 yet a sysvinit process able to receive the signals from the normal
159 'reboot' command. After switching to sysvinit as the boot system,
160 upgrading every package and rebooting, the network come up with DHCP
161 after boot as it should, and the settrans/pkill hack mentioned at the
162 start is no longer needed. But for some strange reason, there are no
163 longer any login prompt in the virtual console, so I logged in using
164 ssh instead.
165
166 <p>Note that there are some race conditions in Hurd making the boot
167 fail some times. No idea what the cause is, but hope the Hurd porters
168 figure it out. At least Justus said on IRC (#debian-hurd on
169 irc.debian.org) that they are aware of the problem. A way to reduce
170 the impact is to upgrade to the Hurd packages built by Justus by
171 adding this repository to the machine:</p>
172
173 <p><blockquote><pre>
174 cat > /etc/apt/sources.list.d/hurd-ci.list &lt;&lt;EOF
175 deb http://darnassus.sceen.net/~teythoon/hurd-ci/ sid main
176 EOF
177 </pre></blockquote></p>
178
179 <p>At the moment the prebuilt virtual machine get some packages from
180 http://ftp.debian-ports.org/debian, because some of the packages in
181 unstable do not yet include the required patches that are lingering in
182 BTS. This is the completely list of "unofficial" packages installed:</p>
183
184 <p><blockquote><pre>
185 # aptitude search '?narrow(?version(CURRENT),?origin(Debian Ports))'
186 i emacs - GNU Emacs editor (metapackage)
187 i gdb - GNU Debugger
188 i hurd-recommended - Miscellaneous translators
189 i isc-dhcp-client - ISC DHCP client
190 i isc-dhcp-common - common files used by all the isc-dhcp* packages
191 i libc-bin - Embedded GNU C Library: Binaries
192 i libc-dev-bin - Embedded GNU C Library: Development binaries
193 i libc0.3 - Embedded GNU C Library: Shared libraries
194 i A libc0.3-dbg - Embedded GNU C Library: detached debugging symbols
195 i libc0.3-dev - Embedded GNU C Library: Development Libraries and Hea
196 i multiarch-support - Transitional package to ensure multiarch compatibilit
197 i A x11-common - X Window System (X.Org) infrastructure
198 i xorg - X.Org X Window System
199 i A xserver-xorg - X.Org X server
200 i A xserver-xorg-input-all - X.Org X server -- input driver metapackage
201 #
202 </pre></blockquote></p>
203
204 <p>All in all, testing hurd has been an interesting experience. :)
205 X.org did not work out of the box and I never took the time to follow
206 the porters instructions to fix it. This time I was interested in the
207 command line stuff.<p>
208
209 </div>
210 <div class="tags">
211
212
213 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>.
214
215
216 </div>
217 </div>
218 <div class="padding"></div>
219
220 <div class="entry">
221 <div class="title">
222 <a href="http://people.skolelinux.org/pere/blog/Debian_init_d_boot_script_example_for_rsyslog.html">Debian init.d boot script example for rsyslog</a>
223 </div>
224 <div class="date">
225 2nd November 2013
226 </div>
227 <div class="body">
228 <p>If one of the points of switching to a new init system in Debian is
229 <a href="http://thomas.goirand.fr/blog/?p=147">to get rid of huge
230 init.d scripts</a>, I doubt we need to switch away from sysvinit and
231 init.d scripts at all. Here is an example init.d script, ie a rewrite
232 of /etc/init.d/rsyslog:</p>
233
234 <p><pre>
235 #!/lib/init/init-d-script
236 ### BEGIN INIT INFO
237 # Provides: rsyslog
238 # Required-Start: $remote_fs $time
239 # Required-Stop: umountnfs $time
240 # X-Stop-After: sendsigs
241 # Default-Start: 2 3 4 5
242 # Default-Stop: 0 1 6
243 # Short-Description: enhanced syslogd
244 # Description: Rsyslog is an enhanced multi-threaded syslogd.
245 # It is quite compatible to stock sysklogd and can be
246 # used as a drop-in replacement.
247 ### END INIT INFO
248 DESC="enhanced syslogd"
249 DAEMON=/usr/sbin/rsyslogd
250 </pre></p>
251
252 <p>Pretty minimalistic to me... For the record, the original sysv-rc
253 script was 137 lines, and the above is just 15 lines, most of it meta
254 info/comments.</p>
255
256 <p>How to do this, you ask? Well, one create a new script
257 /lib/init/init-d-script looking something like this:
258
259 <p><pre>
260 #!/bin/sh
261
262 # Define LSB log_* functions.
263 # Depend on lsb-base (>= 3.2-14) to ensure that this file is present
264 # and status_of_proc is working.
265 . /lib/lsb/init-functions
266
267 #
268 # Function that starts the daemon/service
269
270 #
271 do_start()
272 {
273 # Return
274 # 0 if daemon has been started
275 # 1 if daemon was already running
276 # 2 if daemon could not be started
277 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
278 || return 1
279 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
280 $DAEMON_ARGS \
281 || return 2
282 # Add code here, if necessary, that waits for the process to be ready
283 # to handle requests from services started subsequently which depend
284 # on this one. As a last resort, sleep for some time.
285 }
286
287 #
288 # Function that stops the daemon/service
289 #
290 do_stop()
291 {
292 # Return
293 # 0 if daemon has been stopped
294 # 1 if daemon was already stopped
295 # 2 if daemon could not be stopped
296 # other if a failure occurred
297 start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
298 RETVAL="$?"
299 [ "$RETVAL" = 2 ] && return 2
300 # Wait for children to finish too if this is a daemon that forks
301 # and if the daemon is only ever run from this initscript.
302 # If the above conditions are not satisfied then add some other code
303 # that waits for the process to drop all resources that could be
304 # needed by services started subsequently. A last resort is to
305 # sleep for some time.
306 start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
307 [ "$?" = 2 ] && return 2
308 # Many daemons don't delete their pidfiles when they exit.
309 rm -f $PIDFILE
310 return "$RETVAL"
311 }
312
313 #
314 # Function that sends a SIGHUP to the daemon/service
315 #
316 do_reload() {
317 #
318 # If the daemon can reload its configuration without
319 # restarting (for example, when it is sent a SIGHUP),
320 # then implement that here.
321 #
322 start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
323 return 0
324 }
325
326 SCRIPTNAME=$1
327 scriptbasename="$(basename $1)"
328 echo "SN: $scriptbasename"
329 if [ "$scriptbasename" != "init-d-library" ] ; then
330 script="$1"
331 shift
332 . $script
333 else
334 exit 0
335 fi
336
337 NAME=$(basename $DAEMON)
338 PIDFILE=/var/run/$NAME.pid
339
340 # Exit if the package is not installed
341 #[ -x "$DAEMON" ] || exit 0
342
343 # Read configuration variable file if it is present
344 [ -r /etc/default/$NAME ] && . /etc/default/$NAME
345
346 # Load the VERBOSE setting and other rcS variables
347 . /lib/init/vars.sh
348
349 case "$1" in
350 start)
351 [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
352 do_start
353 case "$?" in
354 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
355 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
356 esac
357 ;;
358 stop)
359 [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
360 do_stop
361 case "$?" in
362 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
363 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
364 esac
365 ;;
366 status)
367 status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
368 ;;
369 #reload|force-reload)
370 #
371 # If do_reload() is not implemented then leave this commented out
372 # and leave 'force-reload' as an alias for 'restart'.
373 #
374 #log_daemon_msg "Reloading $DESC" "$NAME"
375 #do_reload
376 #log_end_msg $?
377 #;;
378 restart|force-reload)
379 #
380 # If the "reload" option is implemented then remove the
381 # 'force-reload' alias
382 #
383 log_daemon_msg "Restarting $DESC" "$NAME"
384 do_stop
385 case "$?" in
386 0|1)
387 do_start
388 case "$?" in
389 0) log_end_msg 0 ;;
390 1) log_end_msg 1 ;; # Old process is still running
391 *) log_end_msg 1 ;; # Failed to start
392 esac
393 ;;
394 *)
395 # Failed to stop
396 log_end_msg 1
397 ;;
398 esac
399 ;;
400 *)
401 echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
402 exit 3
403 ;;
404 esac
405
406 :
407 </pre></p>
408
409 <p>It is based on /etc/init.d/skeleton, and could be improved quite a
410 lot. I did not really polish the approach, so it might not always
411 work out of the box, but you get the idea. I did not try very hard to
412 optimize it nor make it more robust either.</p>
413
414 <p>A better argument for switching init system in Debian than reducing
415 the size of init scripts (which is a good thing to do anyway), is to
416 get boot system that is able to handle the kernel events sensibly and
417 robustly, and do not depend on the boot to run sequentially. The boot
418 and the kernel have not behaved sequentially in years.</p>
419
420 </div>
421 <div class="tags">
422
423
424 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>.
425
426
427 </div>
428 </div>
429 <div class="padding"></div>
430
431 <div class="entry">
432 <div class="title">
433 <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>
434 </div>
435 <div class="date">
436 4th August 2011
437 </div>
438 <div class="body">
439 <p>Wouter Verhelst have some
440 <a href="http://grep.be/blog/en/retorts/pere_kubuntu_boot">interesting
441 comments and opinions</a> on my blog post on
442 <a href="http://people.skolelinux.org/pere/blog/What_should_start_from__etc_rcS_d__in_Debian____almost_nothing.html">the
443 need to clean up /etc/rcS.d/ in Debian</a> and my blog post about
444 <a href="http://people.skolelinux.org/pere/blog/What_is_missing_in_the_Debian_desktop__or_why_my_parents_use_Kubuntu.html">the
445 default KDE desktop in Debian</a>. I only have time to address one
446 small piece of his comment now, and though it best to address the
447 misunderstanding he bring forward:</p>
448
449 <p><blockquote>
450 Currently, a system admin has four options: [...] boot to a
451 single-user system (by adding 'single' to the kernel command line;
452 this runs rcS and rc1 scripts)
453 </blockquote></p>
454
455 <p>This make me believe Wouter believe booting into single user mode
456 and booting into runlevel 1 is the same. I am not surprised he
457 believe this, because it would make sense and is a quite sensible
458 thing to believe. But because the boot in Debian is slightly broken,
459 runlevel 1 do not work properly and it isn't the same as single user
460 mode. I'll try to explain what is actually happing, but it is a bit
461 hard to explain.</p>
462
463 <p>Single user mode is defined like this in /etc/inittab:
464 "<tt>~~:S:wait:/sbin/sulogin</tt>". This means the only thing that is
465 executed in single user mode is sulogin. Single user mode is a boot
466 state "between" the runlevels, and when booting into single user mode,
467 only the scripts in /etc/rcS.d/ are executed before the init process
468 enters the single user state. When switching to runlevel 1, the state
469 is in fact not ending in runlevel 1, but it passes through runlevel 1
470 and end up in the single user mode (see /etc/rc1.d/S03single, which
471 runs "init -t1 S" to switch to single user mode at the end of runlevel
472 1. It is confusing that the 'S' (single user) init mode is not the
473 mode enabled by /etc/rcS.d/ (which is more like the initial boot
474 mode).</p>
475
476 <p>This summary might make it clearer. When booting for the first
477 time into single user mode, the following commands are executed:
478 "<tt>/etc/init.d/rc S; /sbin/sulogin</tt>". When booting into
479 runlevel 1, the following commands are executed: "<tt>/etc/init.d/rc
480 S; /etc/init.d/rc 1; /sbin/sulogin</tt>". A problem show up when
481 trying to continue after visiting single user mode. Not all services
482 are started again as they should, causing the machine to end up in an
483 unpredicatble state. This is why Debian admins recommend rebooting
484 after visiting single user mode.</p>
485
486 <p>A similar problem with runlevel 1 is caused by the amount of
487 scripts executed from /etc/rcS.d/. When switching from say runlevel 2
488 to runlevel 1, the services started from /etc/rcS.d/ are not properly
489 stopped when passing through the scripts in /etc/rc1.d/, and not
490 started again when switching away from runlevel 1 to the runlevels
491 2-5. I believe the problem is best fixed by moving all the scripts
492 out of /etc/rcS.d/ that are not <strong>required</strong> to get a
493 functioning single user mode during boot.</p>
494
495 <p>I have spent several years investigating the Debian boot system,
496 and discovered this problem a few years ago. I suspect it originates
497 from when sysvinit was introduced into Debian, a long time ago.</p>
498
499 </div>
500 <div class="tags">
501
502
503 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>.
504
505
506 </div>
507 </div>
508 <div class="padding"></div>
509
510 <div class="entry">
511 <div class="title">
512 <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>
513 </div>
514 <div class="date">
515 30th July 2011
516 </div>
517 <div class="body">
518 <p>In the Debian boot system, several packages include scripts that
519 are started from /etc/rcS.d/. In fact, there is a bite more of them
520 than make sense, and this causes a few problems. What kind of
521 problems, you might ask. There are at least two problems. The first
522 is that it is not possible to recover a machine after switching to
523 runlevel 1. One need to actually reboot to get the machine back to
524 the expected state. The other is that single user boot will sometimes
525 run into problems because some of the subsystems are activated before
526 the root login is presented, causing problems when trying to recover a
527 machine from a problem in that subsystem. A minor additional point is
528 that moving more scripts out of rcS.d/ and into the other rc#.d/
529 directories will increase the amount of scripts that can run in
530 parallel during boot, and thus decrease the boot time.</p>
531
532 <p>So, which scripts should start from rcS.d/. In short, only the
533 scripts that _have_ to execute before the root login prompt is
534 presented during a single user boot should go there. Everything else
535 should go into the numeric runlevels. This means things like
536 lm-sensors, fuse and x11-common should not run from rcS.d, but from
537 the numeric runlevels. Today in Debian, there are around 115 init.d
538 scripts that are started from rcS.d/, and most of them should be moved
539 out. Do your package have one of them? Please help us make single
540 user and runlevel 1 better by moving it.</p>
541
542 <p>Scripts setting up the screen, keyboard, system partitions
543 etc. should still be started from rcS.d/, but there is for example no
544 need to have the network enabled before the single user login prompt
545 is presented.</p>
546
547 <p>As always, things are not so easy to fix as they sound. To keep
548 Debian systems working while scripts migrate and during upgrades, the
549 scripts need to be moved from rcS.d/ to rc2.d/ in reverse dependency
550 order, ie the scripts that nothing in rcS.d/ depend on can be moved,
551 and the next ones can only be moved when their dependencies have been
552 moved first. This migration must be done sequentially while we ensure
553 that the package system upgrade packages in the right order to keep
554 the system state correct. This will require some coordination when it
555 comes to network related packages, but most of the packages with
556 scripts that should migrate do not have anything in rcS.d/ depending
557 on them. Some packages have already been updated, like the sudo
558 package, while others are still left to do. I wish I had time to work
559 on this myself, but real live constrains make it unlikely that I will
560 find time to push this forward.</p>
561
562 </div>
563 <div class="tags">
564
565
566 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>.
567
568
569 </div>
570 </div>
571 <div class="padding"></div>
572
573 <div class="entry">
574 <div class="title">
575 <a href="http://people.skolelinux.org/pere/blog/Automatic_upgrade_testing_from_Lenny_to_Squeeze.html">Automatic upgrade testing from Lenny to Squeeze</a>
576 </div>
577 <div class="date">
578 11th June 2010
579 </div>
580 <div class="body">
581 <p>The last few days I have done some upgrade testing in Debian, to
582 see if the upgrade from Lenny to Squeeze will go smoothly. A few bugs
583 have been discovered and reported in the process
584 (<a href="http://bugs.debian.org/585410">#585410</a> in nagios3-cgi,
585 <a href="http://bugs.debian.org/584879">#584879</a> already fixed in
586 enscript and <a href="http://bugs.debian.org/584861">#584861</a> in
587 kdebase-workspace-data), and to get a more regular testing going on, I
588 am working on a script to automate the test.</p>
589
590 <p>The idea is to create a Lenny chroot and use tasksel to install a
591 Gnome or KDE desktop installation inside the chroot before upgrading
592 it. To ensure no services are started in the chroot, a policy-rc.d
593 script is inserted. To make sure tasksel believe it is to install a
594 desktop on a laptop, the tasksel tests are replaced in the chroot
595 (only acceptable because this is a throw-away chroot).</p>
596
597 <p>A naive upgrade from Lenny to Squeeze using aptitude dist-upgrade
598 currently always fail because udev refuses to upgrade with the kernel
599 in Lenny, so to avoid that problem the file /etc/udev/kernel-upgrade
600 is created. The bug report
601 <a href="http://bugs.debian.org/566000">#566000</a> make me suspect
602 this problem do not trigger in a chroot, but I touch the file anyway
603 to make sure the upgrade go well. Testing on virtual and real
604 hardware have failed me because of udev so far, and creating this file
605 do the trick in such settings anyway. This is a
606 <a href="http://www.linuxquestions.org/questions/debian-26/failed-dist-upgrade-due-to-udev-config_sysfs_deprecated-nonsense-804130/">known
607 issue</a> and the current udev behaviour is intended by the udev
608 maintainer because he lack the resources to rewrite udev to keep
609 working with old kernels or something like that. I really wish the
610 udev upstream would keep udev backwards compatible, to avoid such
611 upgrade problem, but given that they fail to do so, I guess
612 documenting the way out of this mess is the best option we got for
613 Debian Squeeze.</p>
614
615 <p>Anyway, back to the task at hand, testing upgrades. This test
616 script, which I call <tt>upgrade-test</tt> for now, is doing the
617 trick:</p>
618
619 <blockquote><pre>
620 #!/bin/sh
621 set -ex
622
623 if [ "$1" ] ; then
624 desktop=$1
625 else
626 desktop=gnome
627 fi
628
629 from=lenny
630 to=squeeze
631
632 exec &lt; /dev/null
633 unset LANG
634 mirror=http://ftp.skolelinux.org/debian
635 tmpdir=chroot-$from-upgrade-$to-$desktop
636 fuser -mv .
637 debootstrap $from $tmpdir $mirror
638 chroot $tmpdir aptitude update
639 cat > $tmpdir/usr/sbin/policy-rc.d &lt;&lt;EOF
640 #!/bin/sh
641 exit 101
642 EOF
643 chmod a+rx $tmpdir/usr/sbin/policy-rc.d
644 exit_cleanup() {
645 umount $tmpdir/proc
646 }
647 mount -t proc proc $tmpdir/proc
648 # Make sure proc is unmounted also on failure
649 trap exit_cleanup EXIT INT
650
651 chroot $tmpdir aptitude -y install debconf-utils
652
653 # Make sure tasksel autoselection trigger. It need the test scripts
654 # to return the correct answers.
655 echo tasksel tasksel/desktop multiselect $desktop | \
656 chroot $tmpdir debconf-set-selections
657
658 # Include the desktop and laptop task
659 for test in desktop laptop ; do
660 echo > $tmpdir/usr/lib/tasksel/tests/$test &lt;&lt;EOF
661 #!/bin/sh
662 exit 2
663 EOF
664 chmod a+rx $tmpdir/usr/lib/tasksel/tests/$test
665 done
666
667 DEBIAN_FRONTEND=noninteractive
668 DEBIAN_PRIORITY=critical
669 export DEBIAN_FRONTEND DEBIAN_PRIORITY
670 chroot $tmpdir tasksel --new-install
671
672 echo deb $mirror $to main > $tmpdir/etc/apt/sources.list
673 chroot $tmpdir aptitude update
674 touch $tmpdir/etc/udev/kernel-upgrade
675 chroot $tmpdir aptitude -y dist-upgrade
676 fuser -mv
677 </pre></blockquote>
678
679 <p>I suspect it would be useful to test upgrades with both apt-get and
680 with aptitude, but I have not had time to look at how they behave
681 differently so far. I hope to get a cron job running to do the test
682 regularly and post the result on the web. The Gnome upgrade currently
683 work, while the KDE upgrade fail because of the bug in
684 kdebase-workspace-data</p>
685
686 <p>I am not quite sure what kind of extract from the huge upgrade logs
687 (KDE 167 KiB, Gnome 516 KiB) it make sense to include in this blog
688 post, so I will refrain from trying. I can report that for Gnome,
689 aptitude report 760 packages upgraded, 448 newly installed, 129 to
690 remove and 1 not upgraded and 1024MB need to be downloaded while for
691 KDE the same numbers are 702 packages upgraded, 507 newly installed,
692 193 to remove and 0 not upgraded and 1117MB need to be downloaded</p>
693
694 <p>I am very happy to notice that the Gnome desktop + laptop upgrade
695 is able to migrate to dependency based boot sequencing and parallel
696 booting without a hitch. Was unsure if there were still bugs with
697 packages failing to clean up their obsolete init.d script during
698 upgrades, and no such problem seem to affect the Gnome desktop+laptop
699 packages.</p>
700
701 </div>
702 <div class="tags">
703
704
705 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>.
706
707
708 </div>
709 </div>
710 <div class="padding"></div>
711
712 <div class="entry">
713 <div class="title">
714 <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>
715 </div>
716 <div class="date">
717 6th June 2010
718 </div>
719 <div class="body">
720 <p>If Debian is to migrate to upstart on Linux, I expect some init.d
721 scripts to migrate (some of) their operations to upstart job while
722 keeping the init.d for hurd and kfreebsd. The packages with such
723 needs will need a way to get their init.d scripts to behave
724 differently when used with sysvinit and with upstart. Because of
725 this, I had a look at the environment variables set when a init.d
726 script is running under upstart, and when it is not.</p>
727
728 <p>With upstart, I notice these environment variables are set when a
729 script is started from rcS.d/ (ignoring some irrelevant ones like
730 COLUMNS):</p>
731
732 <blockquote><pre>
733 DEFAULT_RUNLEVEL=2
734 previous=N
735 PREVLEVEL=
736 RUNLEVEL=
737 runlevel=S
738 UPSTART_EVENTS=startup
739 UPSTART_INSTANCE=
740 UPSTART_JOB=rc-sysinit
741 </pre></blockquote>
742
743 <p>With sysvinit, these environment variables are set for the same
744 script.</p>
745
746 <blockquote><pre>
747 INIT_VERSION=sysvinit-2.88
748 previous=N
749 PREVLEVEL=N
750 RUNLEVEL=S
751 runlevel=S
752 </pre></blockquote>
753
754 <p>The RUNLEVEL and PREVLEVEL environment variables passed on from
755 sysvinit are not set by upstart. Not sure if it is intentional or not
756 to not be compatible with sysvinit in this regard.</p>
757
758 <p>For scripts needing to behave differently when upstart is used,
759 looking for the UPSTART_JOB environment variable seem to be a good
760 choice.</p>
761
762 </div>
763 <div class="tags">
764
765
766 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>.
767
768
769 </div>
770 </div>
771 <div class="padding"></div>
772
773 <div class="entry">
774 <div class="title">
775 <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>
776 </div>
777 <div class="date">
778 1st June 2010
779 </div>
780 <div class="body">
781 <p>It is strange to watch how a bug in Debian causing KDM to fail to
782 start at boot when an NVidia video card is used is handled. The
783 problem seem to be that the nvidia X.org driver uses a long time to
784 initialize, and this duration is longer than kdm is configured to
785 wait.</p>
786
787 <p>I came across two bugs related to this issue,
788 <a href="http://bugs.debian.org/583312">#583312</a> initially filed
789 against initscripts and passed on to nvidia-glx when it became obvious
790 that the nvidia drivers were involved, and
791 <a href="http://bugs.debian.org/524751">#524751</a> initially filed against
792 kdm and passed on to src:nvidia-graphics-drivers for unknown reasons.</p>
793
794 <p>To me, it seem that no-one is interested in actually solving the
795 problem nvidia video card owners experience and make sure the Debian
796 distribution work out of the box for these users. The nvidia driver
797 maintainers expect kdm to be set up to wait longer, while kdm expect
798 the nvidia driver maintainers to fix the driver to start faster, and
799 while they wait for each other I guess the users end up switching to a
800 distribution that work for them. I have no idea what the solution is,
801 but I am pretty sure that waiting for each other is not it.</p>
802
803 <p>I wonder why we end up handling bugs this way.</p>
804
805 </div>
806 <div class="tags">
807
808
809 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>.
810
811
812 </div>
813 </div>
814 <div class="padding"></div>
815
816 <div class="entry">
817 <div class="title">
818 <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>
819 </div>
820 <div class="date">
821 27th May 2010
822 </div>
823 <div class="body">
824 <p>A few days ago, parallel booting was enabled in Debian/testing.
825 The feature seem to hold up pretty well, but three fairly serious
826 issues are known and should be solved:
827
828 <p><ul>
829
830 <li>The wicd package seen to
831 <a href="http://bugs.debian.org/508289">break NFS mounting</a> and
832 <a href="http://bugs.debian.org/581586">network setup</a> when
833 parallel booting is enabled. No idea why, but the wicd maintainer
834 seem to be on the case.</li>
835
836 <li>The nvidia X driver seem to
837 <a href="http://bugs.debian.org/583312">have a race condition</a>
838 triggered more easily when parallel booting is in effect. The
839 maintainer is on the case.</li>
840
841 <li>The sysv-rc package fail to properly enable dependency based boot
842 sequencing (the shutdown is broken) when old file-rc users
843 <a href="http://bugs.debian.org/575080">try to switch back</a> to
844 sysv-rc. One way to solve it would be for file-rc to create
845 /etc/init.d/.legacy-bootordering, and another is to try to make
846 sysv-rc more robust. Will investigate some more and probably upload a
847 workaround in sysv-rc to help those trying to move from file-rc to
848 sysv-rc get a working shutdown.</li>
849
850 </ul></p>
851
852 <p>All in all not many surprising issues, and all of them seem
853 solvable before Squeeze is released. In addition to these there are
854 some packages with bugs in their dependencies and run level settings,
855 which I expect will be fixed in a reasonable time span.</p>
856
857 <p>If you report any problems with dependencies in init.d scripts to
858 the BTS, please usertag the report to get it to show up at
859 <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=initscripts-ng-devel@lists.alioth.debian.org">the
860 list of usertagged bugs related to this</a>.</p>
861
862 <p>Update: Correct bug number to file-rc issue.</p>
863
864 </div>
865 <div class="tags">
866
867
868 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>.
869
870
871 </div>
872 </div>
873 <div class="padding"></div>
874
875 <div class="entry">
876 <div class="title">
877 <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>
878 </div>
879 <div class="date">
880 14th May 2010
881 </div>
882 <div class="body">
883 <p>Since this evening, parallel booting is the default in
884 Debian/unstable for machines using dependency based boot sequencing.
885 Apparently the testing of concurrent booting has been wider than
886 expected, if I am to believe the
887 <a href="http://lists.debian.org/debian-devel/2010/05/msg00122.html">input
888 on debian-devel@</a>, and I concluded a few days ago to move forward
889 with the feature this weekend, to give us some time to detect any
890 remaining problems before Squeeze is frozen. If serious problems are
891 detected, it is simple to change the default back to sequential boot.
892 The upload of the new sysvinit package also activate a new upstream
893 version.</p>
894
895 More information about
896 <a href="http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot">dependency
897 based boot sequencing</a> is available from the Debian wiki. It is
898 currently possible to disable parallel booting when one run into
899 problems caused by it, by adding this line to /etc/default/rcS:</p>
900
901 <blockquote><pre>
902 CONCURRENCY=none
903 </pre></blockquote>
904
905 <p>If you report any problems with dependencies in init.d scripts to
906 the BTS, please usertag the report to get it to show up at
907 <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=initscripts-ng-devel@lists.alioth.debian.org">the
908 list of usertagged bugs related to this</a>.</p>
909
910 </div>
911 <div class="tags">
912
913
914 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>.
915
916
917 </div>
918 </div>
919 <div class="padding"></div>
920
921 <div class="entry">
922 <div class="title">
923 <a href="http://people.skolelinux.org/pere/blog/systemd__an_interesting_alternative_to_upstart.html">systemd, an interesting alternative to upstart</a>
924 </div>
925 <div class="date">
926 13th May 2010
927 </div>
928 <div class="body">
929 <p>The last few days a new boot system called
930 <a href="http://www.freedesktop.org/wiki/Software/systemd">systemd</a>
931 has been
932 <a href="http://0pointer.de/blog/projects/systemd.html">introduced</a>
933
934 to the free software world. I have not yet had time to play around
935 with it, but it seem to be a very interesting alternative to
936 <a href="http://upstart.ubuntu.com/">upstart</a>, and might prove to be
937 a good alternative for Debian when we are able to switch to an event
938 based boot system. Tollef is
939 <a href="http://bugs.debian.org/580814">in the process</a> of getting
940 systemd into Debian, and I look forward to seeing how well it work. I
941 like the fact that systemd handles init.d scripts with dependency
942 information natively, allowing them to run in parallel where upstart
943 at the moment do not.</p>
944
945 <p>Unfortunately do systemd have the same problem as upstart regarding
946 platform support. It only work on recent Linux kernels, and also need
947 some new kernel features enabled to function properly. This means
948 kFreeBSD and Hurd ports of Debian will need a port or a different boot
949 system. Not sure how that will be handled if systemd proves to be the
950 way forward.</p>
951
952 <p>In the mean time, based on the
953 <a href="http://lists.debian.org/debian-devel/2010/05/msg00122.html">input
954 on debian-devel@</a> regarding parallel booting in Debian, I have
955 decided to enable full parallel booting as the default in Debian as
956 soon as possible (probably this weekend or early next week), to see if
957 there are any remaining serious bugs in the init.d dependencies. A
958 new version of the sysvinit package implementing this change is
959 already in experimental. If all go well, Squeeze will be released
960 with parallel booting enabled by default.</p>
961
962 </div>
963 <div class="tags">
964
965
966 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>.
967
968
969 </div>
970 </div>
971 <div class="padding"></div>
972
973 <div class="entry">
974 <div class="title">
975 <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>
976 </div>
977 <div class="date">
978 6th May 2010
979 </div>
980 <div class="body">
981 <p>These days, the init.d script dependencies in Squeeze are quite
982 complete, so complete that it is actually possible to run all the
983 init.d scripts in parallell based on these dependencies. If you want
984 to test your Squeeze system, make sure
985 <a href="http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot">dependency
986 based boot sequencing</a> is enabled, and add this line to
987 /etc/default/rcS:</p>
988
989 <blockquote><pre>
990 CONCURRENCY=makefile
991 </pre></blockquote>
992
993 <p>That is it. It will cause sysv-rc to use the startpar tool to run
994 scripts in parallel using the dependency information stored in
995 /etc/init.d/.depend.boot, /etc/init.d/.depend.start and
996 /etc/init.d/.depend.stop to order the scripts. Startpar is configured
997 to try to start the kdm and gdm scripts as early as possible, and will
998 start the facilities required by kdm or gdm as early as possible to
999 make this happen.</p>
1000
1001 <p>Give it a try, and see if you like the result. If some services
1002 fail to start properly, it is most likely because they have incomplete
1003 init.d script dependencies in their startup script (or some of their
1004 dependent scripts have incomplete dependencies). Report bugs and get
1005 the package maintainers to fix it. :)</p>
1006
1007 <p>Running scripts in parallel could be the default in Debian when we
1008 manage to get the init.d script dependencies complete and correct. I
1009 expect we will get there in Squeeze+1, if we get manage to test and
1010 fix the remaining issues.</p>
1011
1012 <p>If you report any problems with dependencies in init.d scripts to
1013 the BTS, please usertag the report to get it to show up at
1014 <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=initscripts-ng-devel@lists.alioth.debian.org">the
1015 list of usertagged bugs related to this</a>.</p>
1016
1017 </div>
1018 <div class="tags">
1019
1020
1021 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>.
1022
1023
1024 </div>
1025 </div>
1026 <div class="padding"></div>
1027
1028 <div class="entry">
1029 <div class="title">
1030 <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>
1031 </div>
1032 <div class="date">
1033 27th July 2009
1034 </div>
1035 <div class="body">
1036 <p>Since this evening, with the upload of sysvinit version 2.87dsf-2,
1037 and the upload of insserv version 1.12.0-10 yesterday, Debian unstable
1038 have been migrated to using dependency based boot sequencing. This
1039 conclude work me and others have been doing for the last three days.
1040 It feels great to see this finally part of the default Debian
1041 installation. Now we just need to weed out the last few problems that
1042 are bound to show up, to get everything ready for Squeeze.</p>
1043
1044 <p>The next step is migrating /sbin/init from sysvinit to upstart, and
1045 fixing the more fundamental problem of handing the event based
1046 non-predictable kernel in the early boot.</p>
1047
1048 </div>
1049 <div class="tags">
1050
1051
1052 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>.
1053
1054
1055 </div>
1056 </div>
1057 <div class="padding"></div>
1058
1059 <div class="entry">
1060 <div class="title">
1061 <a href="http://people.skolelinux.org/pere/blog/Taking_over_sysvinit_development.html">Taking over sysvinit development</a>
1062 </div>
1063 <div class="date">
1064 22nd July 2009
1065 </div>
1066 <div class="body">
1067 <p>After several years of frustration with the lack of activity from
1068 the existing sysvinit upstream developer, I decided a few weeks ago to
1069 take over the package and become the new upstream. The number of
1070 patches to track for the Debian package was becoming a burden, and the
1071 lack of synchronization between the distribution made it hard to keep
1072 the package up to date.</p>
1073
1074 <p>On the new sysvinit team is the SuSe maintainer Dr. Werner Fink,
1075 and my Debian co-maintainer Kel Modderman. About 10 days ago, I made
1076 a new upstream tarball with version number 2.87dsf (for Debian, SuSe
1077 and Fedora), based on the patches currently in use in these
1078 distributions. We Debian maintainers plan to move to this tarball as
1079 the new upstream as soon as we find time to do the merge. Since the
1080 new tarball was created, we agreed with Werner at SuSe to make a new
1081 upstream project at <a href="http://savannah.nongnu.org/">Savannah</a>, and continue
1082 development there. The project is registered and currently waiting
1083 for approval by the Savannah administrators, and as soon as it is
1084 approved, we will import the old versions from svn and continue
1085 working on the future release.</p>
1086
1087 <p>It is a bit ironic that this is done now, when some of the involved
1088 distributions are moving to upstart as a syvinit replacement.</p>
1089
1090 </div>
1091 <div class="tags">
1092
1093
1094 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>.
1095
1096
1097 </div>
1098 </div>
1099 <div class="padding"></div>
1100
1101 <div class="entry">
1102 <div class="title">
1103 <a href="http://people.skolelinux.org/pere/blog/Debian_boots_quicker_and_quicker.html">Debian boots quicker and quicker</a>
1104 </div>
1105 <div class="date">
1106 24th June 2009
1107 </div>
1108 <div class="body">
1109 <p>I spent Monday and tuesday this week in London with a lot of the
1110 people involved in the boot system on Debian and Ubuntu, to see if we
1111 could find more ways to speed up the boot system. This was an Ubuntu
1112 funded
1113 <a href="https://wiki.ubuntu.com/FoundationsTeam/BootPerformance/DebianUbuntuSprint">developer
1114 gathering</a>. It was quite productive. We also discussed the future
1115 of boot systems, and ways to handle the increasing number of boot
1116 issues introduced by the Linux kernel becoming more and more
1117 asynchronous and event base. The Ubuntu approach using udev and
1118 upstart might be a good way forward. Time will show.</p>
1119
1120 <p>Anyway, there are a few ways at the moment to speed up the boot
1121 process in Debian. All of these should be applied to get a quick
1122 boot:</p>
1123
1124 <ul>
1125
1126 <li>Use dash as /bin/sh.</li>
1127
1128 <li>Disable the init.d/hwclock*.sh scripts and make sure the hardware
1129 clock is in UTC.</li>
1130
1131 <li>Install and activate the insserv package to enable
1132 <a href="http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot">dependency
1133 based boot sequencing</a>, and enable concurrent booting.</li>
1134
1135 </ul>
1136
1137 These points are based on the Google summer of code work done by
1138 <a href="http://initscripts-ng.alioth.debian.org/soc2006-bootsystem/">Carlos
1139 Villegas</a>.
1140
1141 <p>Support for makefile-style concurrency during boot was uploaded to
1142 unstable yesterday. When we tested it, we were able to cut 6 seconds
1143 from the boot sequence. It depend on very correct dependency
1144 declaration in all init.d scripts, so I expect us to find edge cases
1145 where the dependences in some scripts are slightly wrong when we start
1146 using this.</p>
1147
1148 <p>On our IRC channel for this effort, #pkg-sysvinit, a new idea was
1149 introduced by Raphael Geissert today, one that could affect the
1150 startup speed as well. Instead of starting some scripts concurrently
1151 from rcS.d/ and another set of scripts from rc2.d/, it would be
1152 possible to run a of them in the same process. A quick way to test
1153 this would be to enable insserv and run 'mv /etc/rc2.d/S* /etc/rcS.d/;
1154 insserv'. Will need to test if that work. :)</p>
1155
1156 </div>
1157 <div class="tags">
1158
1159
1160 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>.
1161
1162
1163 </div>
1164 </div>
1165 <div class="padding"></div>
1166
1167 <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>
1168 <div id="sidebar">
1169
1170
1171
1172 <h2>Archive</h2>
1173 <ul>
1174
1175 <li>2016
1176 <ul>
1177
1178 <li><a href="http://people.skolelinux.org/pere/blog/archive/2016/01/">January (3)</a></li>
1179
1180 <li><a href="http://people.skolelinux.org/pere/blog/archive/2016/02/">February (2)</a></li>
1181
1182 <li><a href="http://people.skolelinux.org/pere/blog/archive/2016/03/">March (3)</a></li>
1183
1184 <li><a href="http://people.skolelinux.org/pere/blog/archive/2016/04/">April (8)</a></li>
1185
1186 <li><a href="http://people.skolelinux.org/pere/blog/archive/2016/05/">May (8)</a></li>
1187
1188 <li><a href="http://people.skolelinux.org/pere/blog/archive/2016/06/">June (2)</a></li>
1189
1190 <li><a href="http://people.skolelinux.org/pere/blog/archive/2016/07/">July (1)</a></li>
1191
1192 </ul></li>
1193
1194 <li>2015
1195 <ul>
1196
1197 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/01/">January (7)</a></li>
1198
1199 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/02/">February (6)</a></li>
1200
1201 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/03/">March (1)</a></li>
1202
1203 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/04/">April (4)</a></li>
1204
1205 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/05/">May (3)</a></li>
1206
1207 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/06/">June (4)</a></li>
1208
1209 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/07/">July (6)</a></li>
1210
1211 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/08/">August (2)</a></li>
1212
1213 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/09/">September (2)</a></li>
1214
1215 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/10/">October (9)</a></li>
1216
1217 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/11/">November (6)</a></li>
1218
1219 <li><a href="http://people.skolelinux.org/pere/blog/archive/2015/12/">December (3)</a></li>
1220
1221 </ul></li>
1222
1223 <li>2014
1224 <ul>
1225
1226 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/01/">January (2)</a></li>
1227
1228 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/02/">February (3)</a></li>
1229
1230 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/03/">March (8)</a></li>
1231
1232 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/04/">April (7)</a></li>
1233
1234 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/05/">May (1)</a></li>
1235
1236 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/06/">June (2)</a></li>
1237
1238 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/07/">July (2)</a></li>
1239
1240 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/08/">August (2)</a></li>
1241
1242 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/09/">September (5)</a></li>
1243
1244 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/10/">October (6)</a></li>
1245
1246 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/11/">November (3)</a></li>
1247
1248 <li><a href="http://people.skolelinux.org/pere/blog/archive/2014/12/">December (5)</a></li>
1249
1250 </ul></li>
1251
1252 <li>2013
1253 <ul>
1254
1255 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/01/">January (11)</a></li>
1256
1257 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/02/">February (9)</a></li>
1258
1259 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/03/">March (9)</a></li>
1260
1261 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/04/">April (6)</a></li>
1262
1263 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/05/">May (9)</a></li>
1264
1265 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/06/">June (10)</a></li>
1266
1267 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/07/">July (7)</a></li>
1268
1269 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/08/">August (3)</a></li>
1270
1271 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/09/">September (5)</a></li>
1272
1273 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/10/">October (7)</a></li>
1274
1275 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/11/">November (9)</a></li>
1276
1277 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/12/">December (3)</a></li>
1278
1279 </ul></li>
1280
1281 <li>2012
1282 <ul>
1283
1284 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/01/">January (7)</a></li>
1285
1286 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/02/">February (10)</a></li>
1287
1288 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/03/">March (17)</a></li>
1289
1290 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/04/">April (12)</a></li>
1291
1292 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/05/">May (12)</a></li>
1293
1294 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/06/">June (20)</a></li>
1295
1296 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/07/">July (17)</a></li>
1297
1298 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/08/">August (6)</a></li>
1299
1300 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/09/">September (9)</a></li>
1301
1302 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/10/">October (17)</a></li>
1303
1304 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/11/">November (10)</a></li>
1305
1306 <li><a href="http://people.skolelinux.org/pere/blog/archive/2012/12/">December (7)</a></li>
1307
1308 </ul></li>
1309
1310 <li>2011
1311 <ul>
1312
1313 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/01/">January (16)</a></li>
1314
1315 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/02/">February (6)</a></li>
1316
1317 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/03/">March (6)</a></li>
1318
1319 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/04/">April (7)</a></li>
1320
1321 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/05/">May (3)</a></li>
1322
1323 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/06/">June (2)</a></li>
1324
1325 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/07/">July (7)</a></li>
1326
1327 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/08/">August (6)</a></li>
1328
1329 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/09/">September (4)</a></li>
1330
1331 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/10/">October (2)</a></li>
1332
1333 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/11/">November (3)</a></li>
1334
1335 <li><a href="http://people.skolelinux.org/pere/blog/archive/2011/12/">December (1)</a></li>
1336
1337 </ul></li>
1338
1339 <li>2010
1340 <ul>
1341
1342 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/01/">January (2)</a></li>
1343
1344 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/02/">February (1)</a></li>
1345
1346 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/03/">March (3)</a></li>
1347
1348 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/04/">April (3)</a></li>
1349
1350 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/05/">May (9)</a></li>
1351
1352 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/06/">June (14)</a></li>
1353
1354 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/07/">July (12)</a></li>
1355
1356 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/08/">August (13)</a></li>
1357
1358 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/09/">September (7)</a></li>
1359
1360 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/10/">October (9)</a></li>
1361
1362 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/11/">November (13)</a></li>
1363
1364 <li><a href="http://people.skolelinux.org/pere/blog/archive/2010/12/">December (12)</a></li>
1365
1366 </ul></li>
1367
1368 <li>2009
1369 <ul>
1370
1371 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/01/">January (8)</a></li>
1372
1373 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/02/">February (8)</a></li>
1374
1375 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/03/">March (12)</a></li>
1376
1377 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/04/">April (10)</a></li>
1378
1379 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/05/">May (9)</a></li>
1380
1381 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/06/">June (3)</a></li>
1382
1383 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/07/">July (4)</a></li>
1384
1385 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/08/">August (3)</a></li>
1386
1387 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/09/">September (1)</a></li>
1388
1389 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/10/">October (2)</a></li>
1390
1391 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/11/">November (3)</a></li>
1392
1393 <li><a href="http://people.skolelinux.org/pere/blog/archive/2009/12/">December (3)</a></li>
1394
1395 </ul></li>
1396
1397 <li>2008
1398 <ul>
1399
1400 <li><a href="http://people.skolelinux.org/pere/blog/archive/2008/11/">November (5)</a></li>
1401
1402 <li><a href="http://people.skolelinux.org/pere/blog/archive/2008/12/">December (7)</a></li>
1403
1404 </ul></li>
1405
1406 </ul>
1407
1408
1409
1410 <h2>Tags</h2>
1411 <ul>
1412
1413 <li><a href="http://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer (13)</a></li>
1414
1415 <li><a href="http://people.skolelinux.org/pere/blog/tags/amiga">amiga (1)</a></li>
1416
1417 <li><a href="http://people.skolelinux.org/pere/blog/tags/aros">aros (1)</a></li>
1418
1419 <li><a href="http://people.skolelinux.org/pere/blog/tags/bankid">bankid (4)</a></li>
1420
1421 <li><a href="http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin (9)</a></li>
1422
1423 <li><a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem (15)</a></li>
1424
1425 <li><a href="http://people.skolelinux.org/pere/blog/tags/bsa">bsa (2)</a></li>
1426
1427 <li><a href="http://people.skolelinux.org/pere/blog/tags/chrpath">chrpath (2)</a></li>
1428
1429 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian">debian (132)</a></li>
1430
1431 <li><a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (157)</a></li>
1432
1433 <li><a href="http://people.skolelinux.org/pere/blog/tags/digistan">digistan (10)</a></li>
1434
1435 <li><a href="http://people.skolelinux.org/pere/blog/tags/dld">dld (15)</a></li>
1436
1437 <li><a href="http://people.skolelinux.org/pere/blog/tags/docbook">docbook (22)</a></li>
1438
1439 <li><a href="http://people.skolelinux.org/pere/blog/tags/drivstoffpriser">drivstoffpriser (4)</a></li>
1440
1441 <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (322)</a></li>
1442
1443 <li><a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (23)</a></li>
1444
1445 <li><a href="http://people.skolelinux.org/pere/blog/tags/fildeling">fildeling (12)</a></li>
1446
1447 <li><a href="http://people.skolelinux.org/pere/blog/tags/freeculture">freeculture (27)</a></li>
1448
1449 <li><a href="http://people.skolelinux.org/pere/blog/tags/freedombox">freedombox (9)</a></li>
1450
1451 <li><a href="http://people.skolelinux.org/pere/blog/tags/frikanalen">frikanalen (17)</a></li>
1452
1453 <li><a href="http://people.skolelinux.org/pere/blog/tags/h264">h264 (20)</a></li>
1454
1455 <li><a href="http://people.skolelinux.org/pere/blog/tags/intervju">intervju (42)</a></li>
1456
1457 <li><a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram (12)</a></li>
1458
1459 <li><a href="http://people.skolelinux.org/pere/blog/tags/kart">kart (19)</a></li>
1460
1461 <li><a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap (9)</a></li>
1462
1463 <li><a href="http://people.skolelinux.org/pere/blog/tags/lenker">lenker (8)</a></li>
1464
1465 <li><a href="http://people.skolelinux.org/pere/blog/tags/lsdvd">lsdvd (2)</a></li>
1466
1467 <li><a href="http://people.skolelinux.org/pere/blog/tags/ltsp">ltsp (1)</a></li>
1468
1469 <li><a href="http://people.skolelinux.org/pere/blog/tags/mesh network">mesh network (8)</a></li>
1470
1471 <li><a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia (39)</a></li>
1472
1473 <li><a href="http://people.skolelinux.org/pere/blog/tags/nice free software">nice free software (7)</a></li>
1474
1475 <li><a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk (275)</a></li>
1476
1477 <li><a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug (181)</a></li>
1478
1479 <li><a href="http://people.skolelinux.org/pere/blog/tags/offentlig innsyn">offentlig innsyn (26)</a></li>
1480
1481 <li><a href="http://people.skolelinux.org/pere/blog/tags/open311">open311 (2)</a></li>
1482
1483 <li><a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett (60)</a></li>
1484
1485 <li><a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern (92)</a></li>
1486
1487 <li><a href="http://people.skolelinux.org/pere/blog/tags/raid">raid (1)</a></li>
1488
1489 <li><a href="http://people.skolelinux.org/pere/blog/tags/reactos">reactos (1)</a></li>
1490
1491 <li><a href="http://people.skolelinux.org/pere/blog/tags/reprap">reprap (11)</a></li>
1492
1493 <li><a href="http://people.skolelinux.org/pere/blog/tags/rfid">rfid (3)</a></li>
1494
1495 <li><a href="http://people.skolelinux.org/pere/blog/tags/robot">robot (9)</a></li>
1496
1497 <li><a href="http://people.skolelinux.org/pere/blog/tags/rss">rss (1)</a></li>
1498
1499 <li><a href="http://people.skolelinux.org/pere/blog/tags/ruter">ruter (4)</a></li>
1500
1501 <li><a href="http://people.skolelinux.org/pere/blog/tags/scraperwiki">scraperwiki (2)</a></li>
1502
1503 <li><a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet (47)</a></li>
1504
1505 <li><a href="http://people.skolelinux.org/pere/blog/tags/sitesummary">sitesummary (4)</a></li>
1506
1507 <li><a href="http://people.skolelinux.org/pere/blog/tags/skepsis">skepsis (4)</a></li>
1508
1509 <li><a href="http://people.skolelinux.org/pere/blog/tags/standard">standard (49)</a></li>
1510
1511 <li><a href="http://people.skolelinux.org/pere/blog/tags/stavekontroll">stavekontroll (4)</a></li>
1512
1513 <li><a href="http://people.skolelinux.org/pere/blog/tags/stortinget">stortinget (10)</a></li>
1514
1515 <li><a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance (37)</a></li>
1516
1517 <li><a href="http://people.skolelinux.org/pere/blog/tags/sysadmin">sysadmin (2)</a></li>
1518
1519 <li><a href="http://people.skolelinux.org/pere/blog/tags/usenix">usenix (2)</a></li>
1520
1521 <li><a href="http://people.skolelinux.org/pere/blog/tags/valg">valg (8)</a></li>
1522
1523 <li><a href="http://people.skolelinux.org/pere/blog/tags/video">video (58)</a></li>
1524
1525 <li><a href="http://people.skolelinux.org/pere/blog/tags/vitenskap">vitenskap (4)</a></li>
1526
1527 <li><a href="http://people.skolelinux.org/pere/blog/tags/web">web (38)</a></li>
1528
1529 </ul>
1530
1531
1532 </div>
1533 <p style="text-align: right">
1534 Created by <a href="http://steve.org.uk/Software/chronicle">Chronicle v4.6</a>
1535 </p>
1536
1537 </body>
1538 </html>