Subject: Re: [vserver] Running Linux Vserver on Wheezy Host and Guests
From: senrabdet@aol.com
Date: Sat, 10 Aug 2013 11:21:54 -0400 (EDT)
Sat, 10 Aug 2013 11:21:54 -0400 (EDT)
Hi All:


Progress!  Thanks to Adrian, Ben & Andrew.  Got Wheezy Guest with Gnome to run on Wheezy
Host.  Have been stuck on this for a long time, so am really psyched (and thanks thanks
thanks) to be able to continue to use Vserver on Wheezy.  Some notes:


1)  Did fresh Wheezy install
2)  Per http://repo.psand.net/info/, followed instructions with one addition.  After
installing "util-vserver", also installed "util-vserver-tools".  Not sure if need to
do both, but adding in the "apt-get install -y util-vserver-tools" made a lot of difference
(was missing vserver-build scripts otherwise).
3)  Had had lots of trouble getting Gnome to go into Wheezy guest (had been using Squeeze
hosts and guests)....per Adrian's suggestion shown below (after these notes), replaced
mountkernfs with dummyservices, and used header from Adrian's suggestion to replace
headers in mountdevsubfs.sh and udev.  Not sure if I'm causing myself problems down
stream, but suddenly Gnome installed(!).


So using Adrian's "update-rc.d dummyservices defaults" approach shown below (his "typed
this up from memory" pretty impressive), replaced each script/script header and voila.
 The reason to only replace headers in mountdevsubfs.sh and udev (I think, though would
like to know if I'm wrong on this) is that mountdevsubfs.sh and udev scripts have additional
code that is needed.  


PS:  have been messing around getting Vserver to work with pacemaker/heartbeat, and
header/LSB stuff also a problem there so if make progress will pass it along.


FYI:  here is a copy of each script that seems to work so far...


1)  dummservices (was mountkernfs)



#! /bin/sh
### BEGIN INIT INFO
# Provides:          mountkernfs
# Required-Start:
# Required-Stop:
# Should-Start:      
# Default-Start:     S
# Default-Stop:
# Short-Description: Make ignorant dependency builders happy
# Description:       Dependencies are not always what the should be like in our setup
### END INIT INFO



2)  mountdevsubfs.sh (again, only replaced header to leave remaining script intact)



#! /bin/sh
### BEGIN INIT INFO
# Provides:          mountdevsubfs
# Required-Start:
# Required-Stop:
# Should-Start:      
# Default-Start:     S
# Default-Stop:
# Short-Description: Make ignorant dependency builders happy
# Description:       Dependencies are not always what the should be like in our setup
### END INIT INFO
#
# This script gets called multiple times during boot
#


PATH=/sbin:/bin
TTYGRP=5
TTYMODE=620
[ -f /etc/default/devpts ] && . /etc/default/devpts


KERNEL="$(uname -s)"


. /lib/init/vars.sh
. /lib/init/tmpfs.sh


. /lib/lsb/init-functions
. /lib/init/mount-functions.sh


# May be run several times, so must be idempotent.
# $1: Mount mode, to allow for remounting and mtab updating
mount filesystems () {
	MNTMODE="$1"


	# Mount a tmpfs on /run/shm
	mount shm "$MNTMODE"


	# Mount /dev/pts
	if [ "$KERNEL" = Linux ]
	then
		if [ ! -d /dev/pts ]
		then
			mkdir --mode=755 /dev/pts
			[ -x /sbin/restorecon ] && /sbin/restorecon /dev/pts
		fi
		domount "$MNTMODE" devpts "" /dev/pts devpts "-onoexec,nosuid,gid=$TTYGRP,mode=$TTYMODE"
	fi
}


case "$1" in
  "")
	echo "Warning: mountdevsubfs should be called with the 'start' argument." >&2
	mount filesystems mount noupdate
	;;
  start)
	mount filesystems mount noupdate
	;;
  mtab)
	mount filesystems mtab
	;;
  restart|reload|force-reload)
	mount filesystems remount
	;;
  stop)
	# No-op
	;;
  *)
	echo "Usage: mountdevsubfs [start|stop]" >&2
	exit 3
	;;
esac





3) udev (again, only replaced header and left rest of script intact)



#!/bin/sh -e
### BEGIN INIT INFO
# Provides:          udev
# Required-Start:    
# Required-Stop:     
# Default-Start:     S
# Default-Stop:
# Short-Description: Make ignorant dependency builders happy
# Description:	     Dependencies are not always what the should be like in our setup
### END INIT INFO


# we need to unmount /dev/pts/ and remount it later over the tmpfs
unmount devpts() {
  if mountpoint -q /dev/pts/; then
    umount -n -l /dev/pts/
  fi


  if mountpoint -q /dev/shm/; then
    umount -n -l /dev/shm/
  fi
}


# mount a tmpfs over /dev, if somebody did not already do it
mount tmpfs() {
  if grep -E -q "^[^[:space:]]+ /dev (dev)?tmpfs" /proc/mounts; then
    mount -n -o remount,${dev mount options} -t tmpfs tmpfs /dev
    return
  fi


  if ! mount -n -o $dev mount options -t tmpfs tmpfs /dev; then
    log failure msg "udev requires tmpfs support, not started"
    log end msg 1
  fi


  return 0
}


create dev makedev() {
  if [ -e /sbin/MAKEDEV ]; then
    ln -sf /sbin/MAKEDEV /dev/MAKEDEV
  else
    ln -sf /bin/true /dev/MAKEDEV
  fi
}


# If the initramfs does not have /run, the initramfs udev database must
# be migrated from /dev/.udev/ to /run/udev/.
move udev database() {
  [ -e "$udev root/.udev/" ] || return 0
  [ ! -e /run/udev/ ] || return 0
  [ -e /run/ ] || return 0
  mountpoint -q /run/ || return 0


  mv $udev root/.udev/ /run/udev/ || true
}


supported kernel() {
  case "$(uname -r)" in
    2.[012345].*|2.6.[0-9]|2.6.[0-9][!0-9]*) return 1 ;;
    2.6.[12][0-9]|2.6.[12][0-9][!0-9]*) return 1 ;;
    2.6.3[0-1]|2.6.3[0-1][!0-9]*) return 1 ;;
  esac
  return 0
}


# shell version of /usr/bin/tty
my tty() {
  [ -x /bin/readlink ] || return 0
  [ -e /proc/self/fd/0 ] || return 0
  readlink --silent /proc/self/fd/0 || true
}


warn if interactive() {
  if [ "$RUNLEVEL" = "S" -a "$PREVLEVEL" = "N" ]; then
    return
  fi


  TTY=$(my tty)
  if [ -z "$TTY" -o "$TTY" = "/dev/console" -o "$TTY" = "/dev/null" ]; then
    return
  fi


  printf "\n\n\nIt has been detected that the command\n\n\t$0 $*\n\n"
  printf "has been run from an interactive shell.\n"
  printf "It will probably not do what you expect, so this script will wait\n"
  printf "60 seconds before continuing. Press ^C to stop it.\n"
  printf "RUNNING THIS COMMAND IS HIGHLY DISCOURAGED!\n\n\n\n"
  sleep 60
}


##############################################################################


[ -x /sbin/udevd ] || exit 0


PATH="/sbin:/bin"


# defaults
tmpfs size="10M"
udev root="/dev"


if [ -e /etc/udev/udev.conf ]; then
  . /etc/udev/udev.conf
fi


. /lib/lsb/init-functions


if ! supported kernel; then
  log failure msg "udev requires a kernel >= 2.6.32, not started"
  log end msg 1
fi


if [ ! -e /proc/filesystems ]; then
  log failure msg "udev requires a mounted procfs, not started"
  log end msg 1
fi


if ! grep -q '[[:space:]]tmpfs$' /proc/filesystems; then
  log failure msg "udev requires tmpfs support, not started"
  log end msg 1
fi


if [ ! -d /sys/class/ ]; then
  log failure msg "udev requires a mounted sysfs, not started"
  log end msg 1
fi


if [ ! -e /sys/kernel/uevent helper ]; then
  log failure msg "udev requires hotplug support, not started"
  log end msg 1
fi


if ! ps --no-headers --format args ax | egrep -q '^\['; then
  log warning msg "udev does not support containers, not started"
  exit 0
fi


if [ -d /sys/class/mem/null -a ! -L /sys/class/mem/null ] || \
   [ -e /sys/block -a ! -e /sys/class/block ]; then
  log warning msg "CONFIG SYSFS DEPRECATED must not be selected"
  log warning msg "Booting will continue in 30 seconds but many things will be broken"
  sleep 30
fi


##############################################################################


# this is experimental and may not work well
if [ "$UDEV DISABLED" = "yes" ]; then
  udev root=/etc/udev/.dev
  export UDEV ROOT=$udev root
fi


udev root=${udev root%/}


dev mount options='mode=0755'
if [ "$tmpfs size" ]; then
  dev mount options="size=${tmpfs size},${dev mount options}"
fi


if [ "$udev root" != "/dev" ]; then
  log warning msg "udev root != /dev/"


case "$1" in
    start)
    if init is upstart 2>/dev/null; then
	exit 1
    fi
    if mountpoint -q $udev root/; then
	log failure msg "$udev root is already mounted"
	log end msg 1
    fi


    echo > /sys/kernel/uevent helper


    mount -n -o $dev mount options -t tmpfs tmpfs $udev root


    log daemon msg "Starting the hotplug events dispatcher" "udevd"
    if udevd --daemon; then
	log end msg $?
    else
	log warning msg $?
	log warning msg "Waiting 15 seconds and trying to continue anyway"
	sleep 15
    fi


    /lib/udev/write dev root rule


    log action begin msg "Synthesizing the initial hotplug events"
    if udevadm trigger --action=add; then
	log action end msg $?
    else
	log action end msg $?
    fi


    ;;
    stop)
    # make sure a manual invocation of the init script doesn't stop an
    # upstart-controlled instance of udev
    if init is upstart 2>/dev/null && status udev | grep -q start; then
	exit 0
    fi
    log daemon msg "Stopping the hotplug events dispatcher" "udevd"
    if start-stop-daemon --stop --name udevd --user root --quiet --oknodo --retry 5;
then
	log end msg $?
    else
	log end msg $?
    fi


    log action begin msg "Unmounting $udev root"
    # unmounting with -l should never fail
    if umount -n -l $udev root; then
	log action end msg $?
    else
	log action end msg $?
    fi
    ;;


    restart)
    if init is upstart 2>/dev/null; then
	exit 1
    fi
    log daemon msg "Stopping the hotplug events dispatcher" "udevd"
    if start-stop-daemon --stop --name udevd --user root --quiet --oknodo --retry 5;
then
	log end msg $?
    else
	log end msg $? || true
    fi


    log daemon msg "Starting the hotplug events dispatcher" "udevd"
    if udevd --daemon; then
	log end msg $?
    else
	log end msg $?
    fi
    ;;


    reload|force-reload)
    udevadm control --reload-rules
    ;;


    status)
    status of proc /sbin/udevd udevd && exit 0 || exit $?
    ;;


    *)
    echo "Usage: /etc/init.d/udev {start|stop|restart|reload|force-reload|status}" >&2
    exit 1
    ;;
esac


  exit 0
fi # udev root != /dev


##############################################################################


# When modifying this script, do not forget that between the time that the
# new /dev has been mounted and udevadm trigger has been run there will be
# no /dev/null. This also means that you cannot use the "&" shell command.


case "$1" in
    start)
    if init is upstart 2>/dev/null; then
	exit 1
    fi
    if mountpoint -q $udev root/; then
	TMPFS MOUNTED=1
    elif [ -e "$udev root/.udev/" ]; then
	log warning msg ".udev/ already exists on the static $udev root"
    fi


    if [ ! -e "$udev root/.udev/" -a ! -e "/run/udev/" ]; then
	warn if interactive
    fi


    echo > /sys/kernel/uevent helper


    move udev database


    if [ -z "$TMPFS MOUNTED" ]; then
	unmount devpts
	mount tmpfs
	[ -d /proc/1 ] || mount -n /proc
    fi


    # clean up parts of the database created by the initramfs udev
    udevadm info --cleanup-db


    # set the SELinux context for devices created in the initramfs
    [ -x /sbin/restorecon ] && /sbin/restorecon -R /dev


    # /dev/null must be created before udevd is started
    /lib/udev/create static nodes || true


    log daemon msg "Starting the hotplug events dispatcher" "udevd"
    if udevd --daemon; then
	log end msg $?
    else
	log warning msg $?
	log warning msg "Waiting 15 seconds and trying to continue anyway"
	sleep 15
    fi


    /lib/udev/write dev root rule


    log action begin msg "Synthesizing the initial hotplug events"
    if udevadm trigger --action=add; then
	log action end msg $?
    else
	log action end msg $?
    fi


    create dev makedev


    # wait for the udevd childs to finish
    log action begin msg "Waiting for /dev to be fully populated"
    if udevadm settle; then
	log action end msg 0
    else
	log action end msg 0 'timeout'
    fi
    ;;


    stop)
    log daemon msg "Stopping the hotplug events dispatcher" "udevd"
    if start-stop-daemon --stop --name udevd --user root --quiet --oknodo --retry 5;
then
	log end msg $?
    else
	log end msg $?
    fi
    ;;


    restart)
    if init is upstart 2>/dev/null; then
	exit 1
    fi
    log daemon msg "Stopping the hotplug events dispatcher" "udevd"
    if start-stop-daemon --stop --name udevd --user root --quiet --oknodo --retry 5;
then
	log end msg $?
    else
	log end msg $? || true
    fi


    log daemon msg "Starting the hotplug events dispatcher" "udevd"
    if udevd --daemon; then
	log end msg $?
    else
	log end msg $?
    fi
    ;;


    reload|force-reload)
    udevadm control --reload-rules
    ;;


    status)
    status of proc /sbin/udevd udevd && exit 0 || exit $?
    ;;


    *)
    echo "Usage: /etc/init.d/udev {start|stop|restart|reload|force-reload|status}" >&2
    exit 1
    ;;
esac


exit 0








-----Original Message-----
From: Adrian Reyer <are@lihas.de>
To: vserver <vserver@list.linux-vserver.org>
Sent: Thu, Aug 8, 2013 4:46 pm
Subject: Re: [vserver] Running Linux Vserver on Wheezy Host and Guests


Hi senrabdet,

On Thu, Aug 08, 2013 at 03:44:44PM -0400, senrabdet@aol.com wrote:
> Q:  I'm given to understand this is "doable", but is anyone running Wheezy 
guests on a Wheezy host with GUI's installed on the guests?  It's at that point 
I get stuck....suggestions on what to try here?

I have only one VServer on wheezy running a desktop environment. And
that one has been upgraded from squeeze.

> insserv: Service mountkernfs has to be enabled to start service keyboard-setup
> update-rc.d: error: insserv rejected the script header

There's the issue:
you could either try and remove 'Required-Start:    mountkernfs' from
/etc/init.d/keyboard-setup which might be tricky as it is just aout to
be installed, or you might try and provide a very basic
/etc/init.d/dummyservices similar to this (just c&p):
cat <<EOF >/etc/init.d/dummyservices
#! /bin/sh
### BEGIN INIT INFO
# Provides:          mountkernfs
# Required-Start:
# Required-Stop:
# Should-Start:      
# Default-Start:     S
# Default-Stop:
# Short-Description: Make ignorant dependency builders happy
# Description:       Dependencies are not always what the should be like in our 
setup
### END INIT INFO
exit 0
EOF
chmod +x /etc/init.d/dummyservices
update-rc.d dummyservices default

Untested, just typed by heart.

Regards,
	Adrian
-- 
LiHAS - Adrian Reyer - Hessenwiesenstraße 10 - D-70565 Stuttgart
Fon: +49 (7 11) 78 28 50 90 - Fax:  +49 (7 11) 78 28 50 91
Mail: lihas@lihas.de - Web: http://lihas.de
Linux, Netzwerke, Consulting & Support - USt-ID: DE 227 816 626 Stuttgart

 


Hi All:

Progress!  Thanks to Adrian, Ben & Andrew.  Got Wheezy Guest with Gnome to run on Wheezy Host.  Have been stuck on this for a long time, so am really psyched (and thanks thanks thanks) to be able to continue to use Vserver on Wheezy.  Some notes:

1)  Did fresh Wheezy install
2)  Per http://repo.psand.net/info/, followed instructions with one addition.  After installing "util-vserver", also installed "util-vserver-tools".  Not sure if need to do both, but adding in the "apt-get install -y util-vserver-tools" made a lot of difference (was missing vserver-build scripts otherwise).
3)  Had had lots of trouble getting Gnome to go into Wheezy guest (had been using Squeeze hosts and guests)....per Adrian's suggestion shown below (after these notes), replaced mountkernfs with dummyservices, and used header from Adrian's suggestion to replace headers in mountdevsubfs.sh and udev.  Not sure if I'm causing myself problems down stream, but suddenly Gnome installed(!).

So using Adrian's "update-rc.d dummyservices defaults" approach shown below (his "typed this up from memory" pretty impressive), replaced each script/script header and voila.  The reason to only replace headers in mountdevsubfs.sh and udev (I think, though would like to know if I'm wrong on this) is that mountdevsubfs.sh and udev scripts have additional code that is needed.  

PS:  have been messing around getting Vserver to work with pacemaker/heartbeat, and header/LSB stuff also a problem there so if make progress will pass it along.

FYI:  here is a copy of each script that seems to work so far...

1)  dummservices (was mountkernfs)

#! /bin/sh
### BEGIN INIT INFO
# Provides:          mountkernfs
# Required-Start:
# Required-Stop:
# Should-Start:      
# Default-Start:     S
# Default-Stop:
# Short-Description: Make ignorant dependency builders happy
# Description:       Dependencies are not always what the should be like in our setup
### END INIT INFO

2)  mountdevsubfs.sh (again, only replaced header to leave remaining script intact)

#! /bin/sh
### BEGIN INIT INFO
# Provides:          mountdevsubfs
# Required-Start:
# Required-Stop:
# Should-Start:      
# Default-Start:     S
# Default-Stop:
# Short-Description: Make ignorant dependency builders happy
# Description:       Dependencies are not always what the should be like in our setup
### END INIT INFO
#
# This script gets called multiple times during boot
#

PATH=/sbin:/bin
TTYGRP=5
TTYMODE=620
[ -f /etc/default/devpts ] && . /etc/default/devpts

KERNEL="$(uname -s)"

. /lib/init/vars.sh
. /lib/init/tmpfs.sh

. /lib/lsb/init-functions
. /lib/init/mount-functions.sh

# May be run several times, so must be idempotent.
# $1: Mount mode, to allow for remounting and mtab updating
mount filesystems () {
MNTMODE="$1"

# Mount a tmpfs on /run/shm
mount shm "$MNTMODE"

# Mount /dev/pts
if [ "$KERNEL" = Linux ]
then
if [ ! -d /dev/pts ]
then
mkdir --mode=755 /dev/pts
[ -x /sbin/restorecon ] && /sbin/restorecon /dev/pts
fi
domount "$MNTMODE" devpts "" /dev/pts devpts "-onoexec,nosuid,gid=$TTYGRP,mode=$TTYMODE"
fi
}

case "$1" in
  "")
echo "Warning: mountdevsubfs should be called with the 'start' argument." >&2
mount filesystems mount noupdate
;;
  start)
mount filesystems mount noupdate
;;
  mtab)
mount filesystems mtab
;;
  restart|reload|force-reload)
mount filesystems remount
;;
  stop)
# No-op
;;
  *)
echo "Usage: mountdevsubfs [start|stop]" >&2
exit 3
;;
esac


3) udev (again, only replaced header and left rest of script intact)

#!/bin/sh -e
### BEGIN INIT INFO
# Provides:          udev
# Required-Start:    
# Required-Stop:     
# Default-Start:     S
# Default-Stop:
# Short-Description: Make ignorant dependency builders happy
# Description:     Dependencies are not always what the should be like in our setup
### END INIT INFO

# we need to unmount /dev/pts/ and remount it later over the tmpfs
unmount devpts() {
  if mountpoint -q /dev/pts/; then
    umount -n -l /dev/pts/
  fi

  if mountpoint -q /dev/shm/; then
    umount -n -l /dev/shm/
  fi
}

# mount a tmpfs over /dev, if somebody did not already do it
mount tmpfs() {
  if grep -E -q "^[^[:space:]]+ /dev (dev)?tmpfs" /proc/mounts; then
    mount -n -o remount,${dev mount options} -t tmpfs tmpfs /dev
    return
  fi

  if ! mount -n -o $dev mount options -t tmpfs tmpfs /dev; then
    log failure msg "udev requires tmpfs support, not started"
    log end msg 1
  fi

  return 0
}

create dev makedev() {
  if [ -e /sbin/MAKEDEV ]; then
    ln -sf /sbin/MAKEDEV /dev/MAKEDEV
  else
    ln -sf /bin/true /dev/MAKEDEV
  fi
}

# If the initramfs does not have /run, the initramfs udev database must
# be migrated from /dev/.udev/ to /run/udev/.
move udev database() {
  [ -e "$udev root/.udev/" ] || return 0
  [ ! -e /run/udev/ ] || return 0
  [ -e /run/ ] || return 0
  mountpoint -q /run/ || return 0

  mv $udev root/.udev/ /run/udev/ || true
}

supported kernel() {
  case "$(uname -r)" in
    2.[012345].*|2.6.[0-9]|2.6.[0-9][!0-9]*) return 1 ;;
    2.6.[12][0-9]|2.6.[12][0-9][!0-9]*) return 1 ;;
    2.6.3[0-1]|2.6.3[0-1][!0-9]*) return 1 ;;
  esac
  return 0
}

# shell version of /usr/bin/tty
my tty() {
  [ -x /bin/readlink ] || return 0
  [ -e /proc/self/fd/0 ] || return 0
  readlink --silent /proc/self/fd/0 || true
}

warn if interactive() {
  if [ "$RUNLEVEL" = "S" -a "$PREVLEVEL" = "N" ]; then
    return
  fi

  TTY=$(my tty)
  if [ -z "$TTY" -o "$TTY" = "/dev/console" -o "$TTY" = "/dev/null" ]; then
    return
  fi

  printf "\n\n\nIt has been detected that the command\n\n\t$0 $*\n\n"
  printf "has been run from an interactive shell.\n"
  printf "It will probably not do what you expect, so this script will wait\n"
  printf "60 seconds before continuing. Press ^C to stop it.\n"
  printf "RUNNING THIS COMMAND IS HIGHLY DISCOURAGED!\n\n\n\n"
  sleep 60
}

##############################################################################

[ -x /sbin/udevd ] || exit 0

PATH="/sbin:/bin"

# defaults
tmpfs size="10M"
udev root="/dev"

if [ -e /etc/udev/udev.conf ]; then
  . /etc/udev/udev.conf
fi

. /lib/lsb/init-functions

if ! supported kernel; then
  log failure msg "udev requires a kernel >= 2.6.32, not started"
  log end msg 1
fi

if [ ! -e /proc/filesystems ]; then
  log failure msg "udev requires a mounted procfs, not started"
  log end msg 1
fi

if ! grep -q '[[:space:]]tmpfs$' /proc/filesystems; then
  log failure msg "udev requires tmpfs support, not started"
  log end msg 1
fi

if [ ! -d /sys/class/ ]; then
  log failure msg "udev requires a mounted sysfs, not started"
  log end msg 1
fi

if [ ! -e /sys/kernel/uevent helper ]; then
  log failure msg "udev requires hotplug support, not started"
  log end msg 1
fi

if ! ps --no-headers --format args ax | egrep -q '^\['; then
  log warning msg "udev does not support containers, not started"
  exit 0
fi

if [ -d /sys/class/mem/null -a ! -L /sys/class/mem/null ] || \
   [ -e /sys/block -a ! -e /sys/class/block ]; then
  log warning msg "CONFIG SYSFS DEPRECATED must not be selected"
  log warning msg "Booting will continue in 30 seconds but many things will be broken"
  sleep 30
fi

##############################################################################

# this is experimental and may not work well
if [ "$UDEV DISABLED" = "yes" ]; then
  udev root=/etc/udev/.dev
  export UDEV ROOT=$udev root
fi

udev root=${udev root%/}

dev mount options='mode=0755'
if [ "$tmpfs size" ]; then
  dev mount options="size=${tmpfs size},${dev mount options}"
fi

if [ "$udev root" != "/dev" ]; then
  log warning msg "udev root != /dev/"

case "$1" in
    start)
    if init is upstart 2>/dev/null; then
exit 1
    fi
    if mountpoint -q $udev root/; then
log failure msg "$udev root is already mounted"
log end msg 1
    fi

    echo > /sys/kernel/uevent helper

    mount -n -o $dev mount options -t tmpfs tmpfs $udev root

    log daemon msg "Starting the hotplug events dispatcher" "udevd"
    if udevd --daemon; then
log end msg $?
    else
log warning msg $?
log warning msg "Waiting 15 seconds and trying to continue anyway"
sleep 15
    fi

    /lib/udev/write dev root rule

    log action begin msg "Synthesizing the initial hotplug events"
    if udevadm trigger --action=add; then
log action end msg $?
    else
log action end msg $?
    fi

    ;;
    stop)
    # make sure a manual invocation of the init script doesn't stop an
    # upstart-controlled instance of udev
    if init is upstart 2>/dev/null && status udev | grep -q start; then
exit 0
    fi
    log daemon msg "Stopping the hotplug events dispatcher" "udevd"
    if start-stop-daemon --stop --name udevd --user root --quiet --oknodo --retry 5; then
log end msg $?
    else
log end msg $?
    fi

    log action begin msg "Unmounting $udev root"
    # unmounting with -l should never fail
    if umount -n -l $udev root; then
log action end msg $?
    else
log action end msg $?
    fi
    ;;

    restart)
    if init is upstart 2>/dev/null; then
exit 1
    fi
    log daemon msg "Stopping the hotplug events dispatcher" "udevd"
    if start-stop-daemon --stop --name udevd --user root --quiet --oknodo --retry 5; then
log end msg $?
    else
log end msg $? || true
    fi

    log daemon msg "Starting the hotplug events dispatcher" "udevd"
    if udevd --daemon; then
log end msg $?
    else
log end msg $?
    fi
    ;;

    reload|force-reload)
    udevadm control --reload-rules
    ;;

    status)
    status of proc /sbin/udevd udevd && exit 0 || exit $?
    ;;

    *)
    echo "Usage: /etc/init.d/udev {start|stop|restart|reload|force-reload|status}" >&2
    exit 1
    ;;
esac

  exit 0
fi # udev root != /dev

##############################################################################

# When modifying this script, do not forget that between the time that the
# new /dev has been mounted and udevadm trigger has been run there will be
# no /dev/null. This also means that you cannot use the "&" shell command.

case "$1" in
    start)
    if init is upstart 2>/dev/null; then
exit 1
    fi
    if mountpoint -q $udev root/; then
TMPFS MOUNTED=1
    elif [ -e "$udev root/.udev/" ]; then
log warning msg ".udev/ already exists on the static $udev root"
    fi

    if [ ! -e "$udev root/.udev/" -a ! -e "/run/udev/" ]; then
warn if interactive
    fi

    echo > /sys/kernel/uevent helper

    move udev database

    if [ -z "$TMPFS MOUNTED" ]; then
unmount devpts
mount tmpfs
[ -d /proc/1 ] || mount -n /proc
    fi

    # clean up parts of the database created by the initramfs udev
    udevadm info --cleanup-db

    # set the SELinux context for devices created in the initramfs
    [ -x /sbin/restorecon ] && /sbin/restorecon -R /dev

    # /dev/null must be created before udevd is started
    /lib/udev/create static nodes || true

    log daemon msg "Starting the hotplug events dispatcher" "udevd"
    if udevd --daemon; then
log end msg $?
    else
log warning msg $?
log warning msg "Waiting 15 seconds and trying to continue anyway"
sleep 15
    fi

    /lib/udev/write dev root rule

    log action begin msg "Synthesizing the initial hotplug events"
    if udevadm trigger --action=add; then
log action end msg $?
    else
log action end msg $?
    fi

    create dev makedev

    # wait for the udevd childs to finish
    log action begin msg "Waiting for /dev to be fully populated"
    if udevadm settle; then
log action end msg 0
    else
log action end msg 0 'timeout'
    fi
    ;;

    stop)
    log daemon msg "Stopping the hotplug events dispatcher" "udevd"
    if start-stop-daemon --stop --name udevd --user root --quiet --oknodo --retry 5; then
log end msg $?
    else
log end msg $?
    fi
    ;;

    restart)
    if init is upstart 2>/dev/null; then
exit 1
    fi
    log daemon msg "Stopping the hotplug events dispatcher" "udevd"
    if start-stop-daemon --stop --name udevd --user root --quiet --oknodo --retry 5; then
log end msg $?
    else
log end msg $? || true
    fi

    log daemon msg "Starting the hotplug events dispatcher" "udevd"
    if udevd --daemon; then
log end msg $?
    else
log end msg $?
    fi
    ;;

    reload|force-reload)
    udevadm control --reload-rules
    ;;

    status)
    status of proc /sbin/udevd udevd && exit 0 || exit $?
    ;;

    *)
    echo "Usage: /etc/init.d/udev {start|stop|restart|reload|force-reload|status}" >&2
    exit 1
    ;;
esac

exit 0




-----Original Message-----
From: Adrian Reyer <are@lihas.de>
To: vserver <vserver@list.linux-vserver.org>
Sent: Thu, Aug 8, 2013 4:46 pm
Subject: Re: [vserver] Running Linux Vserver on Wheezy Host and Guests

Hi senrabdet,

On Thu, Aug 08, 2013 at 03:44:44PM -0400, senrabdet@aol.com wrote:
> Q:  I'm given to understand this is "doable", but is anyone running Wheezy 
guests on a Wheezy host with GUI's installed on the guests?  It's at that point 
I get stuck....suggestions on what to try here?

I have only one VServer on wheezy running a desktop environment. And
that one has been upgraded from squeeze.

> insserv: Service mountkernfs has to be enabled to start service keyboard-setup
> update-rc.d: error: insserv rejected the script header

There's the issue:
you could either try and remove 'Required-Start:    mountkernfs' from
/etc/init.d/keyboard-setup which might be tricky as it is just aout to
be installed, or you might try and provide a very basic
/etc/init.d/dummyservices similar to this (just c&p):
cat <<EOF >/etc/init.d/dummyservices
#! /bin/sh
### BEGIN INIT INFO
# Provides:          mountkernfs
# Required-Start:
# Required-Stop:
# Should-Start:      
# Default-Start:     S
# Default-Stop:
# Short-Description: Make ignorant dependency builders happy
# Description:       Dependencies are not always what the should be like in our 
setup
### END INIT INFO
exit 0
EOF
chmod +x /etc/init.d/dummyservices
update-rc.d dummyservices default

Untested, just typed by heart.

Regards,
	Adrian
-- 
LiHAS - Adrian Reyer - Hessenwiesenstraße 10 - D-70565 Stuttgart
Fon: +49 (7 11) 78 28 50 90 - Fax:  +49 (7 11) 78 28 50 91
Mail: lihas@lihas.de - Web: http://lihas.de
Linux, Netzwerke, Consulting & Support - USt-ID: DE 227 816 626 Stuttgart