Debian Squeeze Vzquota – Installation and Configuration

debian-squeezeinstallationvps

Apparently, I got Debian Squeeze (Debian 6) to work on a VPS using debootstrap and chroot as described here.
Subsequent installation of the harden, exim4, mysql-server packages failed partially.

Relevant information:

insserv: warning: script 'S10vzquota' missing LSB tags and overrides
insserv: warning: script is corrupt or invalid: /etc/init.d/../rc6.d/S00vzreboot
insserv: warning: script 'vzquota' missing LSB tags and overrides
insserv: There is a loop between service vzquota and stop-bootlogd if started
insserv:  loop involving service stop-bootlogd at depth 2
insserv:  loop involving service vzquota at depth 1
insserv:  loop involving service rsyslog at depth 1
insserv: Starting vzquota depends on stop-bootlogd and therefore on system facility `$all' which can not be true!
insserv: Starting vzquota depends on stop-bootlogd and therefore on system facility `$all' which can not be true!
insserv: There is a loop between service vzquota and stop-bootlogd if started
insserv: Starting vzquota depends on stop-bootlogd and therefore on system facility `$all' which can not be true!
insserv: Starting vzquota depends on stop-bootlogd and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing exim4-base (--configure):
 subprocess installed post-installation script returned error exit status 1

Any suggestions?

Keywords: vzquota debian squeeze installation vps, virtual private server.

Best Answer

I checked vzquota and found that it is not conform to Debian 6.0 standard (init scripts) - quite naturally, as the provider does only support 5.0 at the time.

Before my fix:

#!/bin/sh
start() {
    [ -e "/dev/vzfs" ] || mknod /dev/vzfs b 0 115
    rm -f /etc/mtab >/dev/null 2>&1
    echo "/dev/vzfs / reiserfs rw,usrquota,grpquota 0 0" > /etc/mtab
    mnt=`grep -v " / " /proc/mounts`
    if [ $? == 0 ]; then
        echo "$mnt" >> /etc/mtab
    fi 
}
case "$1" in
  start)
        start
        ;;
  *)
    exit
esac 

I prepended the following part to /etc/init.d/vzquota (do not forget to remove the second shabang line):

#!/bin/sh
### BEGIN INIT INFO
# Provides:                 vzquota
# Required-Start:
# Required-Stop:
# Should-Start:             $local_fs $syslog
# Should-Stop:              $local_fs $syslog
# Default-Start:            0 1 2 3 4 5 6
# Default-Stop:
# Short-Description:        Fixed(?) vzquota init script
### END INIT INFO

And the installations succeeded. But after a reboot to verify my changes, I found out that the original file took over again.

Maybe someone else can suggest a more durable solution.

Edit0: As I finally decided to file a bug report, I found this. So the workaround I suggest can be useful for people without access to the files that have to be fixed.