When I moved from Lenny to Squeeze, I run into several problems, which where
partly caused by the new concurrent boot. I solved some of the problems by
putting an empty file called '.legacy-bootordering' in the '/etc/init.d/'
Rumour has it that this trick won't be available in Wheezy. So I had to solve my problems in an other way in order to be ready for Wheezy.
With Squeeze the mouse stopped working. The solution was to use inputattach (as root) to enable the mouse;
inputattach --daemon --mousesystems /dev/ttyS0
A bit of experimentation showed that this has to be done AFTER starting X. So I wrote a start script based on '/etc/init.d/rc.local' called 'amouse';
#! /bin/sh ### BEGIN INIT INFO # Provides: amouse # Required-Start: $x-display-manager # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start inputattach for serial mouse ### END INIT INFO PATH=/sbin:/usr/sbin:/bin:/usr/bin . /lib/lsb/init-functions case "$1" in start) if ! ( ps afx | grep /usr/bin/inputattach | /bin/grep -v grep > /dev/null ) then log_daemon_msg "Starting serial mouse" /usr/bin/inputattach --daemon --mousesystems /dev/ttyS0 fi ;; restart|reload|force-reload) echo "Error: argument '$1' not supported" >&2 exit 3 ;; stop) log_daemon_msg "Stopping serial mouse" killall inputattach ;; *) echo "Usage: $0 start|stop" >&2 exit 3 ;; esac
I wanted the mouse to start just after X (and before bootlogs). The script is
therefore called 'amouse' and is linked from symlinks like 'S05amouse' and
The following command generates the symlinks;
update-rc.d amouse defaults 05
Some of the links in '/etc/rc2.d/';
S04xdm -> ../init.d/xdm S05amouse -> ../init.d/amouse S05bootlogs -> ../init.d/bootlogs
The line '# Required-Start: $x-display-manager' refers to '/etc/insserv.conf.d/' which contains a file which 'translates' 'x-display-manager' to the display manager I actually use. In my case 'xdm'.
I first made a backup of the '/etc/init.d/.depend.*' files. And then modified the files with;
This, among others, adds a line 'amouse: xdm' to '.depend.start'.
Both X and the mouse are now available about 30 seconds before the boot has completely finished (ntp takes that long).
The order in which daemons are started is different with insserv. The table below shows an example;
|Symlink in rc2.d||Required-Start||Should-Start||Bind|
|S02lprng||$network $remote_fs $syslog||X|
|S02mysql||$remote_fs $syslog||$network $time||X|
|S02ntp||$network $remote_fs $syslog||X|
|S03apache2||$local_fs $remote_fs $network $syslog $named||✓|
|S04asterisk||$remote_fs||$syslog $network $named mysql postgresql dahdi||✓|
|S04exim4||$remote_fs $syslog $named $network $time||postgresql mysql clamav-daemon greylist spamassassin||✓|
|S04squid3||$network $remote_fs $syslog||$named||✓|
|S17nfs-kernel-server||$remote_fs nfs-common $portmap $time||X|
The first column is an excerpt from '/etc/rc2.d/', which brings the system into
multi user mode. As you can see a lot of daemons are started after Bind.
The next two columns show the dependencies during concurrent boot: A lot of daemons are started BEFORE Bind is running (marked 'X'). Only four start with DNS available (marked '✓').
The means the system relies heavily on '/etc/hosts' during concurrent boot. A missing entry here may lead to a service failing to start.
In my case, I had to edit '/etc/hosts' in order to get lprng to start, which caused other problems. So I made lprng depend on bind;
### BEGIN INIT INFO # Provides: lprng # Required-Start: $network $remote_fs $syslog $named # Required-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start lpd to allow printing # Description: lpd is the print daemon required for lpr to work properly. # It is basically a server that arbitrates print jobs to printer(s). ### END INIT INFO # This starts lprng after named.
This will modify the '/etc/init.d/.depend.*' files.
NFS used to be started After Bind. Now it's before Bind. This causes boot and
Entries in /etc/hosts don't help. The only thing that fixes the problem is to use IP addresses instead of hostnames in /etc/fstab.