Concurrent boot, NFS and serial mouse

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/'
directory.
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.

Sys-V

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
'K05amouse'.
The following command generates the symlinks;

Concurrent boot

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;

insserv /etc/init.d/amouse

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).

Boot order

The order in which daemons are started is different with insserv.
The table below shows an example;

Sys-V vs Insserv bootorder: Named

Symlink in rc2.d

Required-Start

Should-Start

Bind

S01rsyslog

$remote_fs $time

S02bind9

$remote_fs

$network $syslog

S02clamav-daemon

$remote_fs $syslog

X

S02lprng

$network $remote_fs $syslog

X

S02mysql

$remote_fs $syslog

$network $time

X

S02ntp

$network $remote_fs $syslog

X

S02spamassassin

$remote_fs

$network $syslog

X

S02ssh

$remote_fs $syslog

X

S02xinetd

$local_fs $remote_fs

$syslog

X

S03apache2

$local_fs $remote_fs $network $syslog $named

✓

S04asterisk

$remote_fs

$syslog $network $named mysql postgresql dahdi

✓

S04clamav-freshclam

$remote_fs $syslog

clamav-daemon

X

S04exim4

$remote_fs $syslog $named $network $time

postgresql mysql clamav-daemon greylist spamassassin

✓

S04squid3

$network $remote_fs $syslog

$named

✓

S15portmap

$network $local_fs

X

S16nfs-common

$portmap $time

X

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.

Changing the boot order

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;

NFS

NFS used to be started After Bind. Now it's before Bind. This causes boot and
shutdown problems.
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.