1 <?xml version=
"1.0" encoding=
"utf-8"?>
2 <rss version='
2.0' xmlns:lj='http://www.livejournal.org/rss/lj/
1.0/'
>
4 <title>Petter Reinholdtsen - Entries tagged bootsystem
</title>
5 <description>Entries tagged bootsystem
</description>
6 <link>http://people.skolelinux.org/pere/blog/
</link>
10 <title>How to stay with sysvinit in Debian Jessie
</title>
11 <link>http://people.skolelinux.org/pere/blog/How_to_stay_with_sysvinit_in_Debian_Jessie.html
</link>
12 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/How_to_stay_with_sysvinit_in_Debian_Jessie.html
</guid>
13 <pubDate>Sat,
22 Nov
2014 01:
00:
00 +
0100</pubDate>
14 <description><p
>By now, it is well known that Debian Jessie will not be using
15 sysvinit as its boot system by default. But how can one keep using
16 sysvinit in Jessie? It is fairly easy, and here are a few recipes,
18 <a href=
"http://www.vitavonni.de/blog/
201410/
2014102101-avoiding-systemd.html
">Erich
19 Schubert
</a
> and
20 <a href=
"http://smcv.pseudorandom.co.uk/
2014/still_universal/
">Simon
23 <p
>If you already are using Wheezy and want to upgrade to Jessie and
24 keep sysvinit as your boot system, create a file
25 <tt
>/etc/apt/preferences.d/use-sysvinit
</tt
> with this content before
26 you upgrade:
</p
>
28 <p
><blockquote
><pre
>
32 </pre
></blockquote
><p
>
34 <p
>This file content will tell apt and aptitude to not consider
35 installing systemd-sysv as part of any installation and upgrade
36 solution when resolving dependencies, and thus tell it to avoid
37 systemd as a default boot system. The end result should be that the
38 upgraded system keep using sysvinit.
</p
>
40 <p
>If you are installing Jessie for the first time, there is no way to
41 get sysvinit installed by default (debootstrap used by
42 debian-installer have no option for this), but one can tell the
43 installer to switch to sysvinit before the first boot. Either by
44 using a kernel argument to the installer, or by adding a line to the
45 preseed file used. First, the kernel command line argument:
47 <p
><blockquote
><pre
>
48 preseed/late_command=
"in-target apt-get install -y sysvinit-core
"
49 </pre
></blockquote
><p
>
51 <p
>Next, the line to use in a preseed file:
</p
>
53 <p
><blockquote
><pre
>
54 d-i preseed/late_command string in-target apt-get install -y sysvinit-core
55 </pre
></blockquote
><p
>
57 <p
>One can of course also do this after the first boot by installing
58 the sysvinit-core package.
</p
>
60 <p
>I recommend only using sysvinit if you really need it, as the
61 sysvinit boot sequence in Debian have several hardware specific bugs
62 on Linux caused by the fact that it is unpredictable when hardware
63 devices show up during boot. But on the other hand, the new default
64 boot system still have a few rough edges I hope will be fixed before
65 Jessie is released.
</p
>
70 <title>Testing sysvinit from experimental in Debian Hurd
</title>
71 <link>http://people.skolelinux.org/pere/blog/Testing_sysvinit_from_experimental_in_Debian_Hurd.html
</link>
72 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Testing_sysvinit_from_experimental_in_Debian_Hurd.html
</guid>
73 <pubDate>Mon,
3 Feb
2014 13:
40:
00 +
0100</pubDate>
74 <description><p
>A few days ago I decided to try to help the Hurd people to get
75 their changes into sysvinit, to allow them to use the normal sysvinit
76 boot system instead of their old one. This follow up on the
77 <a href=
"https://teythoon.cryptobitch.de//categories/gsoc.html
">great
78 Google Summer of Code work
</a
> done last summer by Justus Winter to
79 get Debian on Hurd working more like Debian on Linux. To get started,
80 I downloaded a prebuilt hard disk image from
81 <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
>,
82 and started it using virt-manager.
</p
>
84 <p
>The first think I had to do after logging in (root without any
85 password) was to get the network operational. I followed
86 <a href=
"https://www.debian.org/ports/hurd/hurd-install
">the
87 instructions on the Debian GNU/Hurd ports page
</a
> and ran these
88 commands as root to get the machine to accept a IP address from the
89 kvm internal DHCP server:
</p
>
91 <p
><blockquote
><pre
>
92 settrans -fgap /dev/netdde /hurd/netdde
93 kill $(ps -ef|awk
'/[p]finet/ { print $
2}
')
94 kill $(ps -ef|awk
'/[d]evnode/ { print $
2}
')
96 </pre
></blockquote
></p
>
98 <p
>After this, the machine had internet connectivity, and I could
99 upgrade it and install the sysvinit packages from experimental and
100 enable it as the default boot system in Hurd.
</p
>
102 <p
>But before I did that, I set a password on the root user, as ssh is
103 running on the machine it for ssh login to work a password need to be
104 set. Also, note that a bug somewhere in openssh on Hurd block
105 compression from working. Remember to turn that off on the client
108 <p
>Run these commands as root to upgrade and test the new sysvinit
111 <p
><blockquote
><pre
>
112 cat
> /etc/apt/sources.list.d/experimental.list
&lt;
&lt;EOF
113 deb http://http.debian.net/debian/ experimental main
117 apt-get install -t experimental initscripts sysv-rc sysvinit \
118 sysvinit-core sysvinit-utils
119 update-alternatives --config runsystem
120 </pre
></blockquote
></p
>
122 <p
>To reboot after switching boot system, you have to use
123 <tt
>reboot-hurd
</tt
> instead of just
<tt
>reboot
</tt
>, as there is not
124 yet a sysvinit process able to receive the signals from the normal
125 'reboot
' command. After switching to sysvinit as the boot system,
126 upgrading every package and rebooting, the network come up with DHCP
127 after boot as it should, and the settrans/pkill hack mentioned at the
128 start is no longer needed. But for some strange reason, there are no
129 longer any login prompt in the virtual console, so I logged in using
132 <p
>Note that there are some race conditions in Hurd making the boot
133 fail some times. No idea what the cause is, but hope the Hurd porters
134 figure it out. At least Justus said on IRC (#debian-hurd on
135 irc.debian.org) that they are aware of the problem. A way to reduce
136 the impact is to upgrade to the Hurd packages built by Justus by
137 adding this repository to the machine:
</p
>
139 <p
><blockquote
><pre
>
140 cat
> /etc/apt/sources.list.d/hurd-ci.list
&lt;
&lt;EOF
141 deb http://darnassus.sceen.net/~teythoon/hurd-ci/ sid main
143 </pre
></blockquote
></p
>
145 <p
>At the moment the prebuilt virtual machine get some packages from
146 http://ftp.debian-ports.org/debian, because some of the packages in
147 unstable do not yet include the required patches that are lingering in
148 BTS. This is the completely list of
"unofficial
" packages installed:
</p
>
150 <p
><blockquote
><pre
>
151 # aptitude search
'?narrow(?version(CURRENT),?origin(Debian Ports))
'
152 i emacs - GNU Emacs editor (metapackage)
154 i hurd-recommended - Miscellaneous translators
155 i isc-dhcp-client - ISC DHCP client
156 i isc-dhcp-common - common files used by all the isc-dhcp* packages
157 i libc-bin - Embedded GNU C Library: Binaries
158 i libc-dev-bin - Embedded GNU C Library: Development binaries
159 i libc0.3 - Embedded GNU C Library: Shared libraries
160 i A libc0.3-dbg - Embedded GNU C Library: detached debugging symbols
161 i libc0.3-dev - Embedded GNU C Library: Development Libraries and Hea
162 i multiarch-support - Transitional package to ensure multiarch compatibilit
163 i A x11-common - X Window System (X.Org) infrastructure
164 i xorg - X.Org X Window System
165 i A xserver-xorg - X.Org X server
166 i A xserver-xorg-input-all - X.Org X server -- input driver metapackage
168 </pre
></blockquote
></p
>
170 <p
>All in all, testing hurd has been an interesting experience. :)
171 X.org did not work out of the box and I never took the time to follow
172 the porters instructions to fix it. This time I was interested in the
173 command line stuff.
<p
>
178 <title>Debian init.d boot script example for rsyslog
</title>
179 <link>http://people.skolelinux.org/pere/blog/Debian_init_d_boot_script_example_for_rsyslog.html
</link>
180 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Debian_init_d_boot_script_example_for_rsyslog.html
</guid>
181 <pubDate>Sat,
2 Nov
2013 22:
40:
00 +
0100</pubDate>
182 <description><p
>If one of the points of switching to a new init system in Debian is
183 <a href=
"http://thomas.goirand.fr/blog/?p=
147">to get rid of huge
184 init.d scripts
</a
>, I doubt we need to switch away from sysvinit and
185 init.d scripts at all. Here is an example init.d script, ie a rewrite
186 of /etc/init.d/rsyslog:
</p
>
189 #!/lib/init/init-d-script
192 # Required-Start: $remote_fs $time
193 # Required-Stop: umountnfs $time
194 # X-Stop-After: sendsigs
195 # Default-Start:
2 3 4 5
196 # Default-Stop:
0 1 6
197 # Short-Description: enhanced syslogd
198 # Description: Rsyslog is an enhanced multi-threaded syslogd.
199 # It is quite compatible to stock sysklogd and can be
200 # used as a drop-in replacement.
202 DESC=
"enhanced syslogd
"
203 DAEMON=/usr/sbin/rsyslogd
204 </pre
></p
>
206 <p
>Pretty minimalistic to me... For the record, the original sysv-rc
207 script was
137 lines, and the above is just
15 lines, most of it meta
208 info/comments.
</p
>
210 <p
>How to do this, you ask? Well, one create a new script
211 /lib/init/init-d-script looking something like this:
216 # Define LSB log_* functions.
217 # Depend on lsb-base (
>=
3.2-
14) to ensure that this file is present
218 # and status_of_proc is working.
219 . /lib/lsb/init-functions
222 # Function that starts the daemon/service
228 #
0 if daemon has been started
229 #
1 if daemon was already running
230 #
2 if daemon could not be started
231 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test
> /dev/null \
233 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
236 # Add code here, if necessary, that waits for the process to be ready
237 # to handle requests from services started subsequently which depend
238 # on this one. As a last resort, sleep for some time.
242 # Function that stops the daemon/service
247 #
0 if daemon has been stopped
248 #
1 if daemon was already stopped
249 #
2 if daemon could not be stopped
250 # other if a failure occurred
251 start-stop-daemon --stop --quiet --retry=TERM/
30/KILL/
5 --pidfile $PIDFILE --name $NAME
252 RETVAL=
"$?
"
253 [
"$RETVAL
" =
2 ]
&& return
2
254 # Wait for children to finish too if this is a daemon that forks
255 # and if the daemon is only ever run from this initscript.
256 # If the above conditions are not satisfied then add some other code
257 # that waits for the process to drop all resources that could be
258 # needed by services started subsequently. A last resort is to
259 # sleep for some time.
260 start-stop-daemon --stop --quiet --oknodo --retry=
0/
30/KILL/
5 --exec $DAEMON
261 [
"$?
" =
2 ]
&& return
2
262 # Many daemons don
't delete their pidfiles when they exit.
264 return
"$RETVAL
"
268 # Function that sends a SIGHUP to the daemon/service
272 # If the daemon can reload its configuration without
273 # restarting (for example, when it is sent a SIGHUP),
274 # then implement that here.
276 start-stop-daemon --stop --signal
1 --quiet --pidfile $PIDFILE --name $NAME
281 scriptbasename=
"$(basename $
1)
"
282 echo
"SN: $scriptbasename
"
283 if [
"$scriptbasename
" !=
"init-d-library
" ] ; then
284 script=
"$
1"
291 NAME=$(basename $DAEMON)
292 PIDFILE=/var/run/$NAME.pid
294 # Exit if the package is not installed
295 #[ -x
"$DAEMON
" ] || exit
0
297 # Read configuration variable file if it is present
298 [ -r /etc/default/$NAME ]
&& . /etc/default/$NAME
300 # Load the VERBOSE setting and other rcS variables
303 case
"$
1" in
305 [
"$VERBOSE
" != no ]
&& log_daemon_msg
"Starting $DESC
" "$NAME
"
307 case
"$?
" in
308 0|
1) [
"$VERBOSE
" != no ]
&& log_end_msg
0 ;;
309 2) [
"$VERBOSE
" != no ]
&& log_end_msg
1 ;;
313 [
"$VERBOSE
" != no ]
&& log_daemon_msg
"Stopping $DESC
" "$NAME
"
315 case
"$?
" in
316 0|
1) [
"$VERBOSE
" != no ]
&& log_end_msg
0 ;;
317 2) [
"$VERBOSE
" != no ]
&& log_end_msg
1 ;;
321 status_of_proc
"$DAEMON
" "$NAME
" && exit
0 || exit $?
323 #reload|force-reload)
325 # If do_reload() is not implemented then leave this commented out
326 # and leave
'force-reload
' as an alias for
'restart
'.
328 #log_daemon_msg
"Reloading $DESC
" "$NAME
"
332 restart|force-reload)
334 # If the
"reload
" option is implemented then remove the
335 #
'force-reload
' alias
337 log_daemon_msg
"Restarting $DESC
" "$NAME
"
339 case
"$?
" in
342 case
"$?
" in
344 1) log_end_msg
1 ;; # Old process is still running
345 *) log_end_msg
1 ;; # Failed to start
355 echo
"Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}
" >&2
361 </pre
></p
>
363 <p
>It is based on /etc/init.d/skeleton, and could be improved quite a
364 lot. I did not really polish the approach, so it might not always
365 work out of the box, but you get the idea. I did not try very hard to
366 optimize it nor make it more robust either.
</p
>
368 <p
>A better argument for switching init system in Debian than reducing
369 the size of init scripts (which is a good thing to do anyway), is to
370 get boot system that is able to handle the kernel events sensibly and
371 robustly, and do not depend on the boot to run sequentially. The boot
372 and the kernel have not behaved sequentially in years.
</p
>
377 <title>How is booting into runlevel
1 different from single user boots?
</title>
378 <link>http://people.skolelinux.org/pere/blog/How_is_booting_into_runlevel_1_different_from_single_user_boots_.html
</link>
379 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/How_is_booting_into_runlevel_1_different_from_single_user_boots_.html
</guid>
380 <pubDate>Thu,
4 Aug
2011 12:
40:
00 +
0200</pubDate>
381 <description><p
>Wouter Verhelst have some
382 <a href=
"http://grep.be/blog/en/retorts/pere_kubuntu_boot
">interesting
383 comments and opinions
</a
> on my blog post on
384 <a href=
"http://people.skolelinux.org/pere/blog/What_should_start_from__etc_rcS_d__in_Debian____almost_nothing.html
">the
385 need to clean up /etc/rcS.d/ in Debian
</a
> and my blog post about
386 <a href=
"http://people.skolelinux.org/pere/blog/What_is_missing_in_the_Debian_desktop__or_why_my_parents_use_Kubuntu.html
">the
387 default KDE desktop in Debian
</a
>. I only have time to address one
388 small piece of his comment now, and though it best to address the
389 misunderstanding he bring forward:
</p
>
391 <p
><blockquote
>
392 Currently, a system admin has four options: [...] boot to a
393 single-user system (by adding
'single
' to the kernel command line;
394 this runs rcS and rc1 scripts)
395 </blockquote
></p
>
397 <p
>This make me believe Wouter believe booting into single user mode
398 and booting into runlevel
1 is the same. I am not surprised he
399 believe this, because it would make sense and is a quite sensible
400 thing to believe. But because the boot in Debian is slightly broken,
401 runlevel
1 do not work properly and it isn
't the same as single user
402 mode. I
'll try to explain what is actually happing, but it is a bit
403 hard to explain.
</p
>
405 <p
>Single user mode is defined like this in /etc/inittab:
406 "<tt
>~~:S:wait:/sbin/sulogin
</tt
>". This means the only thing that is
407 executed in single user mode is sulogin. Single user mode is a boot
408 state
"between
" the runlevels, and when booting into single user mode,
409 only the scripts in /etc/rcS.d/ are executed before the init process
410 enters the single user state. When switching to runlevel
1, the state
411 is in fact not ending in runlevel
1, but it passes through runlevel
1
412 and end up in the single user mode (see /etc/rc1.d/S03single, which
413 runs
"init -t1 S
" to switch to single user mode at the end of runlevel
414 1. It is confusing that the
'S
' (single user) init mode is not the
415 mode enabled by /etc/rcS.d/ (which is more like the initial boot
418 <p
>This summary might make it clearer. When booting for the first
419 time into single user mode, the following commands are executed:
420 "<tt
>/etc/init.d/rc S; /sbin/sulogin
</tt
>". When booting into
421 runlevel
1, the following commands are executed:
"<tt
>/etc/init.d/rc
422 S; /etc/init.d/rc
1; /sbin/sulogin
</tt
>". A problem show up when
423 trying to continue after visiting single user mode. Not all services
424 are started again as they should, causing the machine to end up in an
425 unpredicatble state. This is why Debian admins recommend rebooting
426 after visiting single user mode.
</p
>
428 <p
>A similar problem with runlevel
1 is caused by the amount of
429 scripts executed from /etc/rcS.d/. When switching from say runlevel
2
430 to runlevel
1, the services started from /etc/rcS.d/ are not properly
431 stopped when passing through the scripts in /etc/rc1.d/, and not
432 started again when switching away from runlevel
1 to the runlevels
433 2-
5. I believe the problem is best fixed by moving all the scripts
434 out of /etc/rcS.d/ that are not
<strong
>required
</strong
> to get a
435 functioning single user mode during boot.
</p
>
437 <p
>I have spent several years investigating the Debian boot system,
438 and discovered this problem a few years ago. I suspect it originates
439 from when sysvinit was introduced into Debian, a long time ago.
</p
>
444 <title>What should start from /etc/rcS.d/ in Debian? - almost nothing
</title>
445 <link>http://people.skolelinux.org/pere/blog/What_should_start_from__etc_rcS_d__in_Debian____almost_nothing.html
</link>
446 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/What_should_start_from__etc_rcS_d__in_Debian____almost_nothing.html
</guid>
447 <pubDate>Sat,
30 Jul
2011 14:
00:
00 +
0200</pubDate>
448 <description><p
>In the Debian boot system, several packages include scripts that
449 are started from /etc/rcS.d/. In fact, there is a bite more of them
450 than make sense, and this causes a few problems. What kind of
451 problems, you might ask. There are at least two problems. The first
452 is that it is not possible to recover a machine after switching to
453 runlevel
1. One need to actually reboot to get the machine back to
454 the expected state. The other is that single user boot will sometimes
455 run into problems because some of the subsystems are activated before
456 the root login is presented, causing problems when trying to recover a
457 machine from a problem in that subsystem. A minor additional point is
458 that moving more scripts out of rcS.d/ and into the other rc#.d/
459 directories will increase the amount of scripts that can run in
460 parallel during boot, and thus decrease the boot time.
</p
>
462 <p
>So, which scripts should start from rcS.d/. In short, only the
463 scripts that _have_ to execute before the root login prompt is
464 presented during a single user boot should go there. Everything else
465 should go into the numeric runlevels. This means things like
466 lm-sensors, fuse and x11-common should not run from rcS.d, but from
467 the numeric runlevels. Today in Debian, there are around
115 init.d
468 scripts that are started from rcS.d/, and most of them should be moved
469 out. Do your package have one of them? Please help us make single
470 user and runlevel
1 better by moving it.
</p
>
472 <p
>Scripts setting up the screen, keyboard, system partitions
473 etc. should still be started from rcS.d/, but there is for example no
474 need to have the network enabled before the single user login prompt
475 is presented.
</p
>
477 <p
>As always, things are not so easy to fix as they sound. To keep
478 Debian systems working while scripts migrate and during upgrades, the
479 scripts need to be moved from rcS.d/ to rc2.d/ in reverse dependency
480 order, ie the scripts that nothing in rcS.d/ depend on can be moved,
481 and the next ones can only be moved when their dependencies have been
482 moved first. This migration must be done sequentially while we ensure
483 that the package system upgrade packages in the right order to keep
484 the system state correct. This will require some coordination when it
485 comes to network related packages, but most of the packages with
486 scripts that should migrate do not have anything in rcS.d/ depending
487 on them. Some packages have already been updated, like the sudo
488 package, while others are still left to do. I wish I had time to work
489 on this myself, but real live constrains make it unlikely that I will
490 find time to push this forward.
</p
>
495 <title>Automatic upgrade testing from Lenny to Squeeze
</title>
496 <link>http://people.skolelinux.org/pere/blog/Automatic_upgrade_testing_from_Lenny_to_Squeeze.html
</link>
497 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Automatic_upgrade_testing_from_Lenny_to_Squeeze.html
</guid>
498 <pubDate>Fri,
11 Jun
2010 22:
50:
00 +
0200</pubDate>
499 <description><p
>The last few days I have done some upgrade testing in Debian, to
500 see if the upgrade from Lenny to Squeeze will go smoothly. A few bugs
501 have been discovered and reported in the process
502 (
<a href=
"http://bugs.debian.org/
585410">#
585410</a
> in nagios3-cgi,
503 <a href=
"http://bugs.debian.org/
584879">#
584879</a
> already fixed in
504 enscript and
<a href=
"http://bugs.debian.org/
584861">#
584861</a
> in
505 kdebase-workspace-data), and to get a more regular testing going on, I
506 am working on a script to automate the test.
</p
>
508 <p
>The idea is to create a Lenny chroot and use tasksel to install a
509 Gnome or KDE desktop installation inside the chroot before upgrading
510 it. To ensure no services are started in the chroot, a policy-rc.d
511 script is inserted. To make sure tasksel believe it is to install a
512 desktop on a laptop, the tasksel tests are replaced in the chroot
513 (only acceptable because this is a throw-away chroot).
</p
>
515 <p
>A naive upgrade from Lenny to Squeeze using aptitude dist-upgrade
516 currently always fail because udev refuses to upgrade with the kernel
517 in Lenny, so to avoid that problem the file /etc/udev/kernel-upgrade
518 is created. The bug report
519 <a href=
"http://bugs.debian.org/
566000">#
566000</a
> make me suspect
520 this problem do not trigger in a chroot, but I touch the file anyway
521 to make sure the upgrade go well. Testing on virtual and real
522 hardware have failed me because of udev so far, and creating this file
523 do the trick in such settings anyway. This is a
524 <a href=
"http://www.linuxquestions.org/questions/debian-
26/failed-dist-upgrade-due-to-udev-config_sysfs_deprecated-nonsense-
804130/
">known
525 issue
</a
> and the current udev behaviour is intended by the udev
526 maintainer because he lack the resources to rewrite udev to keep
527 working with old kernels or something like that. I really wish the
528 udev upstream would keep udev backwards compatible, to avoid such
529 upgrade problem, but given that they fail to do so, I guess
530 documenting the way out of this mess is the best option we got for
531 Debian Squeeze.
</p
>
533 <p
>Anyway, back to the task at hand, testing upgrades. This test
534 script, which I call
<tt
>upgrade-test
</tt
> for now, is doing the
537 <blockquote
><pre
>
541 if [
"$
1" ] ; then
550 exec
&lt; /dev/null
552 mirror=http://ftp.skolelinux.org/debian
553 tmpdir=chroot-$from-upgrade-$to-$desktop
555 debootstrap $from $tmpdir $mirror
556 chroot $tmpdir aptitude update
557 cat
> $tmpdir/usr/sbin/policy-rc.d
&lt;
&lt;EOF
561 chmod a+rx $tmpdir/usr/sbin/policy-rc.d
565 mount -t proc proc $tmpdir/proc
566 # Make sure proc is unmounted also on failure
567 trap exit_cleanup EXIT INT
569 chroot $tmpdir aptitude -y install debconf-utils
571 # Make sure tasksel autoselection trigger. It need the test scripts
572 # to return the correct answers.
573 echo tasksel tasksel/desktop multiselect $desktop | \
574 chroot $tmpdir debconf-set-selections
576 # Include the desktop and laptop task
577 for test in desktop laptop ; do
578 echo
> $tmpdir/usr/lib/tasksel/tests/$test
&lt;
&lt;EOF
582 chmod a+rx $tmpdir/usr/lib/tasksel/tests/$test
585 DEBIAN_FRONTEND=noninteractive
586 DEBIAN_PRIORITY=critical
587 export DEBIAN_FRONTEND DEBIAN_PRIORITY
588 chroot $tmpdir tasksel --new-install
590 echo deb $mirror $to main
> $tmpdir/etc/apt/sources.list
591 chroot $tmpdir aptitude update
592 touch $tmpdir/etc/udev/kernel-upgrade
593 chroot $tmpdir aptitude -y dist-upgrade
595 </pre
></blockquote
>
597 <p
>I suspect it would be useful to test upgrades with both apt-get and
598 with aptitude, but I have not had time to look at how they behave
599 differently so far. I hope to get a cron job running to do the test
600 regularly and post the result on the web. The Gnome upgrade currently
601 work, while the KDE upgrade fail because of the bug in
602 kdebase-workspace-data
</p
>
604 <p
>I am not quite sure what kind of extract from the huge upgrade logs
605 (KDE
167 KiB, Gnome
516 KiB) it make sense to include in this blog
606 post, so I will refrain from trying. I can report that for Gnome,
607 aptitude report
760 packages upgraded,
448 newly installed,
129 to
608 remove and
1 not upgraded and
1024MB need to be downloaded while for
609 KDE the same numbers are
702 packages upgraded,
507 newly installed,
610 193 to remove and
0 not upgraded and
1117MB need to be downloaded
</p
>
612 <p
>I am very happy to notice that the Gnome desktop + laptop upgrade
613 is able to migrate to dependency based boot sequencing and parallel
614 booting without a hitch. Was unsure if there were still bugs with
615 packages failing to clean up their obsolete init.d script during
616 upgrades, and no such problem seem to affect the Gnome desktop+laptop
622 <title>Upstart or sysvinit - as init.d scripts see it
</title>
623 <link>http://people.skolelinux.org/pere/blog/Upstart_or_sysvinit___as_init_d_scripts_see_it.html
</link>
624 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Upstart_or_sysvinit___as_init_d_scripts_see_it.html
</guid>
625 <pubDate>Sun,
6 Jun
2010 23:
55:
00 +
0200</pubDate>
626 <description><p
>If Debian is to migrate to upstart on Linux, I expect some init.d
627 scripts to migrate (some of) their operations to upstart job while
628 keeping the init.d for hurd and kfreebsd. The packages with such
629 needs will need a way to get their init.d scripts to behave
630 differently when used with sysvinit and with upstart. Because of
631 this, I had a look at the environment variables set when a init.d
632 script is running under upstart, and when it is not.
</p
>
634 <p
>With upstart, I notice these environment variables are set when a
635 script is started from rcS.d/ (ignoring some irrelevant ones like
638 <blockquote
><pre
>
644 UPSTART_EVENTS=startup
646 UPSTART_JOB=rc-sysinit
647 </pre
></blockquote
>
649 <p
>With sysvinit, these environment variables are set for the same
652 <blockquote
><pre
>
653 INIT_VERSION=sysvinit-
2.88
658 </pre
></blockquote
>
660 <p
>The RUNLEVEL and PREVLEVEL environment variables passed on from
661 sysvinit are not set by upstart. Not sure if it is intentional or not
662 to not be compatible with sysvinit in this regard.
</p
>
664 <p
>For scripts needing to behave differently when upstart is used,
665 looking for the UPSTART_JOB environment variable seem to be a good
671 <title>KDM fail at boot with NVidia cards - and no one try to fix it?
</title>
672 <link>http://people.skolelinux.org/pere/blog/KDM_fail_at_boot_with_NVidia_cards___and_no_one_try_to_fix_it_.html
</link>
673 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/KDM_fail_at_boot_with_NVidia_cards___and_no_one_try_to_fix_it_.html
</guid>
674 <pubDate>Tue,
1 Jun
2010 17:
05:
00 +
0200</pubDate>
675 <description><p
>It is strange to watch how a bug in Debian causing KDM to fail to
676 start at boot when an NVidia video card is used is handled. The
677 problem seem to be that the nvidia X.org driver uses a long time to
678 initialize, and this duration is longer than kdm is configured to
681 <p
>I came across two bugs related to this issue,
682 <a href=
"http://bugs.debian.org/
583312">#
583312</a
> initially filed
683 against initscripts and passed on to nvidia-glx when it became obvious
684 that the nvidia drivers were involved, and
685 <a href=
"http://bugs.debian.org/
524751">#
524751</a
> initially filed against
686 kdm and passed on to src:nvidia-graphics-drivers for unknown reasons.
</p
>
688 <p
>To me, it seem that no-one is interested in actually solving the
689 problem nvidia video card owners experience and make sure the Debian
690 distribution work out of the box for these users. The nvidia driver
691 maintainers expect kdm to be set up to wait longer, while kdm expect
692 the nvidia driver maintainers to fix the driver to start faster, and
693 while they wait for each other I guess the users end up switching to a
694 distribution that work for them. I have no idea what the solution is,
695 but I am pretty sure that waiting for each other is not it.
</p
>
697 <p
>I wonder why we end up handling bugs this way.
</p
>
702 <title>Parallellized boot seem to hold up well in Debian/testing
</title>
703 <link>http://people.skolelinux.org/pere/blog/Parallellized_boot_seem_to_hold_up_well_in_Debian_testing.html
</link>
704 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Parallellized_boot_seem_to_hold_up_well_in_Debian_testing.html
</guid>
705 <pubDate>Thu,
27 May
2010 23:
55:
00 +
0200</pubDate>
706 <description><p
>A few days ago, parallel booting was enabled in Debian/testing.
707 The feature seem to hold up pretty well, but three fairly serious
708 issues are known and should be solved:
712 <li
>The wicd package seen to
713 <a href=
"http://bugs.debian.org/
508289">break NFS mounting
</a
> and
714 <a href=
"http://bugs.debian.org/
581586">network setup
</a
> when
715 parallel booting is enabled. No idea why, but the wicd maintainer
716 seem to be on the case.
</li
>
718 <li
>The nvidia X driver seem to
719 <a href=
"http://bugs.debian.org/
583312">have a race condition
</a
>
720 triggered more easily when parallel booting is in effect. The
721 maintainer is on the case.
</li
>
723 <li
>The sysv-rc package fail to properly enable dependency based boot
724 sequencing (the shutdown is broken) when old file-rc users
725 <a href=
"http://bugs.debian.org/
575080">try to switch back
</a
> to
726 sysv-rc. One way to solve it would be for file-rc to create
727 /etc/init.d/.legacy-bootordering, and another is to try to make
728 sysv-rc more robust. Will investigate some more and probably upload a
729 workaround in sysv-rc to help those trying to move from file-rc to
730 sysv-rc get a working shutdown.
</li
>
732 </ul
></p
>
734 <p
>All in all not many surprising issues, and all of them seem
735 solvable before Squeeze is released. In addition to these there are
736 some packages with bugs in their dependencies and run level settings,
737 which I expect will be fixed in a reasonable time span.
</p
>
739 <p
>If you report any problems with dependencies in init.d scripts to
740 the BTS, please usertag the report to get it to show up at
741 <a href=
"http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=initscripts-ng-devel@lists.alioth.debian.org
">the
742 list of usertagged bugs related to this
</a
>.
</p
>
744 <p
>Update: Correct bug number to file-rc issue.
</p
>
749 <title>Parallellized boot is now the default in Debian/unstable
</title>
750 <link>http://people.skolelinux.org/pere/blog/Parallellized_boot_is_now_the_default_in_Debian_unstable.html
</link>
751 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Parallellized_boot_is_now_the_default_in_Debian_unstable.html
</guid>
752 <pubDate>Fri,
14 May
2010 22:
40:
00 +
0200</pubDate>
753 <description><p
>Since this evening, parallel booting is the default in
754 Debian/unstable for machines using dependency based boot sequencing.
755 Apparently the testing of concurrent booting has been wider than
756 expected, if I am to believe the
757 <a href=
"http://lists.debian.org/debian-devel/
2010/
05/msg00122.html
">input
758 on debian-devel@
</a
>, and I concluded a few days ago to move forward
759 with the feature this weekend, to give us some time to detect any
760 remaining problems before Squeeze is frozen. If serious problems are
761 detected, it is simple to change the default back to sequential boot.
762 The upload of the new sysvinit package also activate a new upstream
765 More information about
766 <a href=
"http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot
">dependency
767 based boot sequencing
</a
> is available from the Debian wiki. It is
768 currently possible to disable parallel booting when one run into
769 problems caused by it, by adding this line to /etc/default/rcS:
</p
>
771 <blockquote
><pre
>
773 </pre
></blockquote
>
775 <p
>If you report any problems with dependencies in init.d scripts to
776 the BTS, please usertag the report to get it to show up at
777 <a href=
"http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=initscripts-ng-devel@lists.alioth.debian.org
">the
778 list of usertagged bugs related to this
</a
>.
</p
>
783 <title>systemd, an interesting alternative to upstart
</title>
784 <link>http://people.skolelinux.org/pere/blog/systemd__an_interesting_alternative_to_upstart.html
</link>
785 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/systemd__an_interesting_alternative_to_upstart.html
</guid>
786 <pubDate>Thu,
13 May
2010 22:
20:
00 +
0200</pubDate>
787 <description><p
>The last few days a new boot system called
788 <a href=
"http://www.freedesktop.org/wiki/Software/systemd
">systemd
</a
>
790 <a href=
"http://
0pointer.de/blog/projects/systemd.html
">introduced
</a
>
792 to the free software world. I have not yet had time to play around
793 with it, but it seem to be a very interesting alternative to
794 <a href=
"http://upstart.ubuntu.com/
">upstart
</a
>, and might prove to be
795 a good alternative for Debian when we are able to switch to an event
796 based boot system. Tollef is
797 <a href=
"http://bugs.debian.org/
580814">in the process
</a
> of getting
798 systemd into Debian, and I look forward to seeing how well it work. I
799 like the fact that systemd handles init.d scripts with dependency
800 information natively, allowing them to run in parallel where upstart
801 at the moment do not.
</p
>
803 <p
>Unfortunately do systemd have the same problem as upstart regarding
804 platform support. It only work on recent Linux kernels, and also need
805 some new kernel features enabled to function properly. This means
806 kFreeBSD and Hurd ports of Debian will need a port or a different boot
807 system. Not sure how that will be handled if systemd proves to be the
808 way forward.
</p
>
810 <p
>In the mean time, based on the
811 <a href=
"http://lists.debian.org/debian-devel/
2010/
05/msg00122.html
">input
812 on debian-devel@
</a
> regarding parallel booting in Debian, I have
813 decided to enable full parallel booting as the default in Debian as
814 soon as possible (probably this weekend or early next week), to see if
815 there are any remaining serious bugs in the init.d dependencies. A
816 new version of the sysvinit package implementing this change is
817 already in experimental. If all go well, Squeeze will be released
818 with parallel booting enabled by default.
</p
>
823 <title>Parallellizing the boot in Debian Squeeze - ready for wider testing
</title>
824 <link>http://people.skolelinux.org/pere/blog/Parallellizing_the_boot_in_Debian_Squeeze___ready_for_wider_testing.html
</link>
825 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Parallellizing_the_boot_in_Debian_Squeeze___ready_for_wider_testing.html
</guid>
826 <pubDate>Thu,
6 May
2010 23:
25:
00 +
0200</pubDate>
827 <description><p
>These days, the init.d script dependencies in Squeeze are quite
828 complete, so complete that it is actually possible to run all the
829 init.d scripts in parallell based on these dependencies. If you want
830 to test your Squeeze system, make sure
831 <a href=
"http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot
">dependency
832 based boot sequencing
</a
> is enabled, and add this line to
833 /etc/default/rcS:
</p
>
835 <blockquote
><pre
>
837 </pre
></blockquote
>
839 <p
>That is it. It will cause sysv-rc to use the startpar tool to run
840 scripts in parallel using the dependency information stored in
841 /etc/init.d/.depend.boot, /etc/init.d/.depend.start and
842 /etc/init.d/.depend.stop to order the scripts. Startpar is configured
843 to try to start the kdm and gdm scripts as early as possible, and will
844 start the facilities required by kdm or gdm as early as possible to
845 make this happen.
</p
>
847 <p
>Give it a try, and see if you like the result. If some services
848 fail to start properly, it is most likely because they have incomplete
849 init.d script dependencies in their startup script (or some of their
850 dependent scripts have incomplete dependencies). Report bugs and get
851 the package maintainers to fix it. :)
</p
>
853 <p
>Running scripts in parallel could be the default in Debian when we
854 manage to get the init.d script dependencies complete and correct. I
855 expect we will get there in Squeeze+
1, if we get manage to test and
856 fix the remaining issues.
</p
>
858 <p
>If you report any problems with dependencies in init.d scripts to
859 the BTS, please usertag the report to get it to show up at
860 <a href=
"http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=initscripts-ng-devel@lists.alioth.debian.org
">the
861 list of usertagged bugs related to this
</a
>.
</p
>
866 <title>Debian has switched to dependency based boot sequencing
</title>
867 <link>http://people.skolelinux.org/pere/blog/Debian_has_switched_to_dependency_based_boot_sequencing.html
</link>
868 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Debian_has_switched_to_dependency_based_boot_sequencing.html
</guid>
869 <pubDate>Mon,
27 Jul
2009 23:
50:
00 +
0200</pubDate>
870 <description><p
>Since this evening, with the upload of sysvinit version
2.87dsf-
2,
871 and the upload of insserv version
1.12.0-
10 yesterday, Debian unstable
872 have been migrated to using dependency based boot sequencing. This
873 conclude work me and others have been doing for the last three days.
874 It feels great to see this finally part of the default Debian
875 installation. Now we just need to weed out the last few problems that
876 are bound to show up, to get everything ready for Squeeze.
</p
>
878 <p
>The next step is migrating /sbin/init from sysvinit to upstart, and
879 fixing the more fundamental problem of handing the event based
880 non-predictable kernel in the early boot.
</p
>
885 <title>Taking over sysvinit development
</title>
886 <link>http://people.skolelinux.org/pere/blog/Taking_over_sysvinit_development.html
</link>
887 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Taking_over_sysvinit_development.html
</guid>
888 <pubDate>Wed,
22 Jul
2009 23:
00:
00 +
0200</pubDate>
889 <description><p
>After several years of frustration with the lack of activity from
890 the existing sysvinit upstream developer, I decided a few weeks ago to
891 take over the package and become the new upstream. The number of
892 patches to track for the Debian package was becoming a burden, and the
893 lack of synchronization between the distribution made it hard to keep
894 the package up to date.
</p
>
896 <p
>On the new sysvinit team is the SuSe maintainer Dr. Werner Fink,
897 and my Debian co-maintainer Kel Modderman. About
10 days ago, I made
898 a new upstream tarball with version number
2.87dsf (for Debian, SuSe
899 and Fedora), based on the patches currently in use in these
900 distributions. We Debian maintainers plan to move to this tarball as
901 the new upstream as soon as we find time to do the merge. Since the
902 new tarball was created, we agreed with Werner at SuSe to make a new
903 upstream project at
<a href=
"http://savannah.nongnu.org/
">Savannah
</a
>, and continue
904 development there. The project is registered and currently waiting
905 for approval by the Savannah administrators, and as soon as it is
906 approved, we will import the old versions from svn and continue
907 working on the future release.
</p
>
909 <p
>It is a bit ironic that this is done now, when some of the involved
910 distributions are moving to upstart as a syvinit replacement.
</p
>
915 <title>Debian boots quicker and quicker
</title>
916 <link>http://people.skolelinux.org/pere/blog/Debian_boots_quicker_and_quicker.html
</link>
917 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Debian_boots_quicker_and_quicker.html
</guid>
918 <pubDate>Wed,
24 Jun
2009 21:
40:
00 +
0200</pubDate>
919 <description><p
>I spent Monday and tuesday this week in London with a lot of the
920 people involved in the boot system on Debian and Ubuntu, to see if we
921 could find more ways to speed up the boot system. This was an Ubuntu
923 <a href=
"https://wiki.ubuntu.com/FoundationsTeam/BootPerformance/DebianUbuntuSprint
">developer
924 gathering
</a
>. It was quite productive. We also discussed the future
925 of boot systems, and ways to handle the increasing number of boot
926 issues introduced by the Linux kernel becoming more and more
927 asynchronous and event base. The Ubuntu approach using udev and
928 upstart might be a good way forward. Time will show.
</p
>
930 <p
>Anyway, there are a few ways at the moment to speed up the boot
931 process in Debian. All of these should be applied to get a quick
936 <li
>Use dash as /bin/sh.
</li
>
938 <li
>Disable the init.d/hwclock*.sh scripts and make sure the hardware
939 clock is in UTC.
</li
>
941 <li
>Install and activate the insserv package to enable
942 <a href=
"http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot
">dependency
943 based boot sequencing
</a
>, and enable concurrent booting.
</li
>
947 These points are based on the Google summer of code work done by
948 <a href=
"http://initscripts-ng.alioth.debian.org/soc2006-bootsystem/
">Carlos
951 <p
>Support for makefile-style concurrency during boot was uploaded to
952 unstable yesterday. When we tested it, we were able to cut
6 seconds
953 from the boot sequence. It depend on very correct dependency
954 declaration in all init.d scripts, so I expect us to find edge cases
955 where the dependences in some scripts are slightly wrong when we start
956 using this.
</p
>
958 <p
>On our IRC channel for this effort, #pkg-sysvinit, a new idea was
959 introduced by Raphael Geissert today, one that could affect the
960 startup speed as well. Instead of starting some scripts concurrently
961 from rcS.d/ and another set of scripts from rc2.d/, it would be
962 possible to run a of them in the same process. A quick way to test
963 this would be to enable insserv and run
'mv /etc/rc2.d/S* /etc/rcS.d/;
964 insserv
'. Will need to test if that work. :)
</p
>