Index: /trunk/src/VBox/Additions/common/VBoxGuest/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxGuest/Makefile.kmk	(revision 57968)
+++ /trunk/src/VBox/Additions/common/VBoxGuest/Makefile.kmk	(revision 57969)
@@ -201,25 +201,8 @@
  vboxguest-src_SOURCES  = $(subst ",,$(FILES_VBOXGUEST_NOBIN))
 
- INSTALLS += vboxguest-conf
- vboxguest-conf_INST    = $(INST_ADDITIONS)src/
- vboxguest-conf_MODE    = a+r,u+w
- vboxguest-conf_SOURCES = $(vboxguest-sh_0_OUTDIR)/dkms.conf
- vboxguest-conf_CLEAN   = $(vboxguest-sh_0_OUTDIR)/dkms.conf
-
  INSTALLS += vboxguest-scripts
  vboxguest-scripts_INST    = $(INST_ADDITIONS)src/
  vboxguest-scripts_MODE    = a+rx,u+w
- vboxguest-scripts_SOURCES = ../../../HostDrivers/linux/do_dkms \
-                             ../../../HostDrivers/linux/build_in_tmp
-
- $$(vboxguest-sh_0_OUTDIR)/dkms.conf: \
- 		$(PATH_SUB_CURRENT)/linux/dkms.conf \
- 		$(VBOX_VERSION_STAMP) \
- 		| $$(dir $$@)
-	$(call MSG_TOOL,Creating,,$@)
-	$(QUIET)$(SED) \
-		-e "s;_VERSION_;${VBOX_VERSION_STRING};g" \
-		-e "s;_BUILDTYPE_;$(KBUILD_TYPE);g" \
-		--output $@ $<
+ vboxguest-scripts_SOURCES = ../../../HostDrivers/linux/build_in_tmp
 
  # scripts.
@@ -228,5 +211,4 @@
  vboxguest-sh_MODE      = a+rx,u+w
  vboxguest-sh_SOURCES   = $(subst ",,$(FILES_VBOXGUEST_BIN))
- vboxguest-sh_SOURCES  += $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
 
 endif # Linux
Index: unk/src/VBox/Additions/common/VBoxGuest/linux/dkms.conf
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxGuest/linux/dkms.conf	(revision 57968)
+++ 	(revision )
@@ -1,31 +1,0 @@
-## @file
-# Linux DKMS config script for the VirtualBox guest kernel modules
-#
-
-#
-# Copyright (C) 2006-2015 Oracle Corporation
-#
-# This file is part of VirtualBox Open Source Edition (OSE), as
-# available from http://www.virtualbox.org. This file is free software;
-# you can redistribute it and/or modify it under the terms of the GNU
-# General Public License (GPL) as published by the Free Software
-# Foundation, in version 2 as it comes in the "COPYING" file of the
-# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-#
-
-PACKAGE_NAME="vboxguest"
-PACKAGE_VERSION=_VERSION_
-AUTOINSTALL=yes
-
-BUILT_MODULE_NAME[0]="vboxguest"
-BUILT_MODULE_LOCATION[0]="vboxguest"
-DEST_MODULE_LOCATION[0]="/kernel/misc"
-
-BUILT_MODULE_NAME[1]="vboxsf"
-BUILT_MODULE_LOCATION[1]="vboxsf"
-DEST_MODULE_LOCATION[1]="/kernel/misc"
-
-BUILT_MODULE_NAME[2]="vboxvideo"
-BUILT_MODULE_LOCATION[2]="vboxvideo"
-DEST_MODULE_LOCATION[2]="/kernel/misc"
Index: /trunk/src/VBox/Additions/linux/Makefile
===================================================================
--- /trunk/src/VBox/Additions/linux/Makefile	(revision 57968)
+++ /trunk/src/VBox/Additions/linux/Makefile	(revision 57969)
@@ -18,5 +18,6 @@
 ifneq ($(KBUILD_EXTMOD),)
 
-# DKMS
+# Building from kBuild (make -C <kernel_directory> M=`pwd`).
+# KBUILD_EXTMOD is set to $(M) in this case.
 
 obj-m = vboxguest/ vboxsf/ vboxvideo/
Index: /trunk/src/VBox/Additions/linux/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Additions/linux/Makefile.kmk	(revision 57968)
+++ /trunk/src/VBox/Additions/linux/Makefile.kmk	(revision 57969)
@@ -156,5 +156,5 @@
 	vboxvideo_drv.o
 
-VBOX_ADD_KMOD_FILES = $(addprefix vboxguest-$(VBOX_VERSION_STRING)/, Makefile dkms.conf do_dkms build_in_tmp)
+VBOX_ADD_KMOD_FILES = $(addprefix vboxguest-$(VBOX_VERSION_STRING)/, Makefile build_in_tmp)
 VBOX_ADD_KMOD_DIRS =  $(addprefix vboxguest-$(VBOX_VERSION_STRING)/, vboxguest/ vboxsf/ vboxvideo/)
 
@@ -366,5 +366,4 @@
 	$(VBOX_REL_LNX_ADD_INST)deffiles
 LnxAdd-scripts_EXEC_SOURCES  = \
-	$(VBOX_REL_LNX_HOST_DRV)do_dkms \
 	$(VBOX_REL_LNX_INST_SRC)routines.sh \
 	$(VBOX_REL_LNX_ADD_INST)vboxadd.sh=>vboxadd \
Index: /trunk/src/VBox/Additions/linux/drm/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Additions/linux/drm/Makefile.kmk	(revision 57968)
+++ /trunk/src/VBox/Additions/linux/drm/Makefile.kmk	(revision 57969)
@@ -32,6 +32,5 @@
 	$(subst $(DQUOTE),,$(FILES_VBOXVIDEO_DRM_NOBIN))
 vboxvideo_drm-mod_EXEC_SOURCES = \
-	$(subst $(DQUOTE),,$(FILES_VBOXVIDEO_DRM_BIN)) \
-	$(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
+	$(subst $(DQUOTE),,$(FILES_VBOXVIDEO_DRM_BIN))
 
 
Index: /trunk/src/VBox/Additions/linux/installer/vboxadd.sh
===================================================================
--- /trunk/src/VBox/Additions/linux/installer/vboxadd.sh	(revision 57968)
+++ /trunk/src/VBox/Additions/linux/installer/vboxadd.sh	(revision 57969)
@@ -277,10 +277,9 @@
 cleanup_modules()
 {
-    if [ -n "$(which dkms 2>/dev/null)" ]; then
-        begin "Removing existing VirtualBox DKMS kernel modules"
-        $DODKMS uninstall $OLDMODULES > $LOG
-        succ_msg
-    fi
-    begin "Removing existing VirtualBox non-DKMS kernel modules"
+    begin "Removing existing VirtualBox kernel modules"
+    # We no longer support DKMS, remove any leftovers.
+    for i in vboxguest vboxadd vboxsf vboxvfs vboxvideo; do
+        rm -rf "/var/lib/dkms/${i}"*
+    done
     for i in $OLDMODULES; do
         find /lib/modules -name $i\* | xargs rm 2>/dev/null
@@ -295,11 +294,4 @@
     cleanup_modules
     begin "Building the VirtualBox Guest Additions kernel modules"
-
-    # Short cut out if a dkms build succeeds
-    if [ -n "$(which dkms 2>/dev/null)" ] &&
-       $DODKMS install vboxguest $INSTALL_VER >> $LOG 2>&1; then
-        succ_msg
-        return 0
-    fi
 
     test_for_gcc_and_make
@@ -424,7 +416,5 @@
     MODULE_SRC="$INSTALL_DIR/src/vboxguest-$INSTALL_VER"
     BUILDINTMP="$MODULE_SRC/build_in_tmp"
-    DODKMS="$MODULE_SRC/do_dkms"
     chcon -t bin_t "$BUILDINTMP" > /dev/null 2>&1
-    chcon -t bin_t "$DODKMS"     > /dev/null 2>&1
 
     setup_modules
@@ -447,7 +437,4 @@
       test -n "$INSTALL_DIR" -a -n "$INSTALL_VER" ||
         fail "Configuration file $config not complete"
-      DODKMS="$INSTALL_DIR/src/vboxguest-$INSTALL_VER/do_dkms"
-    elif test -x ./do_dkms; then  # Executing as part of the installer...
-      DODKMS=./do_dkms
     else
       fail "Configuration file $config not found"
Index: /trunk/src/VBox/Additions/linux/sharedfolders/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Additions/linux/sharedfolders/Makefile.kmk	(revision 57968)
+++ /trunk/src/VBox/Additions/linux/sharedfolders/Makefile.kmk	(revision 57969)
@@ -29,6 +29,5 @@
 	$(subst $(DQUOTE),,$(FILES_VBOXSF_NOBIN))
 vboxsf-mod_EXEC_SOURCES = \
-	$(subst $(DQUOTE),,$(FILES_VBOXSF_BIN)) \
-	$(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
+	$(subst $(DQUOTE),,$(FILES_VBOXSF_BIN))
 
 
Index: /trunk/src/VBox/HostDrivers/Support/Makefile.kmk
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/Makefile.kmk	(revision 57968)
+++ /trunk/src/VBox/HostDrivers/Support/Makefile.kmk	(revision 57969)
@@ -698,6 +698,4 @@
  vboxdrv-mod_EXEC_SOURCES  = \
  	$(subst $(DQUOTE),,$(FILES_VBOXDRV_BIN))
- vboxdrv-mod_EXEC_SOURCES.linux = \
- 	$(PATH_ROOT)/src/VBox/HostDrivers/$(KBUILD_TARGET)/do_Module.symvers
  vboxdrv-mod_CLEAN   = \
  	$(vboxdrv-mod_0_OUTDIR)/Makefile \
Index: /trunk/src/VBox/HostDrivers/VBoxNetAdp/Makefile.kmk
===================================================================
--- /trunk/src/VBox/HostDrivers/VBoxNetAdp/Makefile.kmk	(revision 57968)
+++ /trunk/src/VBox/HostDrivers/VBoxNetAdp/Makefile.kmk	(revision 57969)
@@ -162,6 +162,4 @@
 	$(subst $(DQUOTE),,$(VBOX_VBOXNETADP_SOURCES)) \
 	$(VBoxNetAdp-src_0_OUTDIR)/Makefile
- VBoxNetAdp-src_EXEC_SOURCES = \
-	$(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
  VBoxNetAdp-src_CLEAN = \
 	$(VBoxNetAdp-src_0_OUTDIR)/Makefile \
Index: /trunk/src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk
===================================================================
--- /trunk/src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk	(revision 57968)
+++ /trunk/src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk	(revision 57969)
@@ -511,6 +511,4 @@
 	$(subst $(DQUOTE),,$(VBOX_VBOXNETFLT_SOURCES)) \
 	$(VBoxNetFlt-src_0_OUTDIR)/Makefile
- VBoxNetFlt-src_EXEC_SOURCES = \
-	$(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
  VBoxNetFlt-src_CLEAN   = \
 	$(VBoxNetFlt-src_0_OUTDIR)/Makefile \
Index: /trunk/src/VBox/HostDrivers/VBoxPci/Makefile.kmk
===================================================================
--- /trunk/src/VBox/HostDrivers/VBoxPci/Makefile.kmk	(revision 57968)
+++ /trunk/src/VBox/HostDrivers/VBoxPci/Makefile.kmk	(revision 57969)
@@ -52,6 +52,4 @@
 	$(subst $(DQUOTE),,$(VBOX_VBOXPCI_SOURCES)) \
  	$(VBoxPci-src_0_OUTDIR)/Makefile
- VBoxPci-src_EXEC_SOURCES = \
- 	$(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
  VBoxPci-src_CLEAN      = \
  	$(VBoxPci-src_0_OUTDIR)/Makefile \
Index: /trunk/src/VBox/HostDrivers/linux/Makefile
===================================================================
--- /trunk/src/VBox/HostDrivers/linux/Makefile	(revision 57968)
+++ /trunk/src/VBox/HostDrivers/linux/Makefile	(revision 57969)
@@ -18,5 +18,6 @@
 ifneq ($(KBUILD_EXTMOD),)
 
-# DKMS
+# Building from kBuild (make -C <kernel_directory> M=`pwd`).
+# KBUILD_EXTMOD is set to $(M) in this case.
 
 obj-m = vboxdrv/
@@ -32,5 +33,5 @@
 else # ! KBUILD_EXTMOD
 
-# convenience Makefile without DKMS
+# convenience Makefile without KBUILD_EXTMOD
 
 KBUILD_VERBOSE =
Index: /trunk/src/VBox/HostDrivers/linux/Makefile.kmk
===================================================================
--- /trunk/src/VBox/HostDrivers/linux/Makefile.kmk	(revision 57968)
+++ /trunk/src/VBox/HostDrivers/linux/Makefile.kmk	(revision 57969)
@@ -22,25 +22,9 @@
 HostDrivers-scripts_INST        = $(INST_DIST)
 HostDrivers-scripts_SOURCES     = \
-	Makefile=>src/Makefile \
-	$(HostDrivers-scripts_0_OUTDIR)/dkms.conf=>src/dkms.conf
+	Makefile=>src/Makefile
 HostDrivers-scripts_EXEC_SOURCES = \
 	loadall.sh \
 	load.sh \
-	do_dkms=>src/do_dkms \
 	build_in_tmp=>src/build_in_tmp
-HostDrivers-scripts_CLEAN       = \
-	$(HostDrivers-scripts_0_OUTDIR)/dkms.conf
-
-$$(HostDrivers-scripts_0_OUTDIR)/dkms.conf: \
-		$(PATH_SUB_CURRENT)/dkms.conf \
-		$(VBOX_VERSION_STAMP) \
-		| $$(dir $$@)
-	$(call MSG_TOOL,Creating,,$@)
-	$(QUIET)$(SED) \
-		-e "s;_VERSION_;${VBOX_VERSION_STRING};g" \
-		-e "s;_OMIT_VBOXNETFLT_;$(if $(VBOX_WITH_NETFLT),,#);g" \
-		-e "s;_OMIT_VBOXNETADP_;$(if $(VBOX_WITH_NETADP),,#);g" \
-		-e "s;_OMIT_VBOXPCI_;$(if $(VBOX_WITH_PCI_PASSTHROUGH),,#);g" \
-		--output $@ $<
 
 include $(FILE_KBUILD_SUB_FOOTER)
Index: /trunk/src/VBox/HostDrivers/linux/build_in_tmp
===================================================================
--- /trunk/src/VBox/HostDrivers/linux/build_in_tmp	(revision 57968)
+++ /trunk/src/VBox/HostDrivers/linux/build_in_tmp	(revision 57969)
@@ -3,5 +3,5 @@
 #
 # Script to build a kernel module in /tmp. Useful if the module sources
-# are installed in read-only directory. Not for DKMS!
+# are installed in read-only directory.
 #
 # Copyright (C) 2007-2015 Oracle Corporation
Index: unk/src/VBox/HostDrivers/linux/dkms.conf
===================================================================
--- /trunk/src/VBox/HostDrivers/linux/dkms.conf	(revision 57968)
+++ 	(revision )
@@ -1,35 +1,0 @@
-## @file
-# Linux DKMS config script for the VirtualBox guest kernel modules
-#
-
-#
-# Copyright (C) 2006-2015 Oracle Corporation
-#
-# This file is part of VirtualBox Open Source Edition (OSE), as
-# available from http://www.virtualbox.org. This file is free software;
-# you can redistribute it and/or modify it under the terms of the GNU
-# General Public License (GPL) as published by the Free Software
-# Foundation, in version 2 as it comes in the "COPYING" file of the
-# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-#
-
-PACKAGE_NAME="vboxhost"
-PACKAGE_VERSION=_VERSION_
-AUTOINSTALL=yes
-
-BUILT_MODULE_NAME[0]="vboxdrv"
-BUILT_MODULE_LOCATION[0]="vboxdrv"
-DEST_MODULE_LOCATION[0]="/kernel/misc"
-
-_OMIT_VBOXNETFLT_BUILT_MODULE_NAME[1]="vboxnetflt"
-_OMIT_VBOXNETFLT_BUILT_MODULE_LOCATION[1]="vboxnetflt"
-_OMIT_VBOXNETFLT_DEST_MODULE_LOCATION[1]="/kernel/misc"
-
-_OMIT_VBOXNETADP_BUILT_MODULE_NAME[2]="vboxnetadp"
-_OMIT_VBOXNETADP_BUILT_MODULE_LOCATION[2]="vboxnetadp"
-_OMIT_VBOXNETADP_DEST_MODULE_LOCATION[2]="/kernel/misc"
-
-_OMIT_VBOXPCI_BUILT_MODULE_NAME[3]="vboxpci"
-_OMIT_VBOXPCI_BUILT_MODULE_LOCATION[3]="vboxpci"
-_OMIT_VBOXPCI_DEST_MODULE_LOCATION[3]="/kernel/misc"
Index: unk/src/VBox/HostDrivers/linux/do_Module.symvers
===================================================================
--- /trunk/src/VBox/HostDrivers/linux/do_Module.symvers	(revision 57968)
+++ 	(revision )
@@ -1,33 +1,0 @@
-#!/bin/sh
-
-#
-# This script is used when building kernel modules from DKMS. I don't
-# know how to solve the problem of inter-module dependencies better.
-#
-# Copyright (C) 2008-2015 Oracle Corporation
-#
-# This file is part of VirtualBox Open Source Edition (OSE), as
-# available from http://www.virtualbox.org. This file is free software;
-# you can redistribute it and/or modify it under the terms of the GNU
-# General Public License (GPL) as published by the Free Software
-# Foundation, in version 2 as it comes in the "COPYING" file of the
-# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-#
-
-SYMFILE="/tmp/$1-Module.symvers"
-case "$2" in
-  save)
-    if [ -f "$3" ]; then
-      cp "$3" "$SYMFILE"
-    fi
-    ;;
-  restore)
-    if [ -f "$SYMFILE" ]; then
-      cp "$SYMFILE" "$3"
-    fi
-    ;;
-  *)
-    echo "Usage: <modname> save|restore <location of Module.symvers>"
-    ;;
-esac
Index: unk/src/VBox/HostDrivers/linux/do_dkms
===================================================================
--- /trunk/src/VBox/HostDrivers/linux/do_dkms	(revision 57968)
+++ 	(revision )
@@ -1,67 +1,0 @@
-#!/bin/sh
-
-#
-# Script to register/build/unregister a kernel module with DKMS.
-#
-# Copyright (C) 2010-2015 Oracle Corporation
-#
-# This file is part of VirtualBox Open Source Edition (OSE), as
-# available from http://www.virtualbox.org. This file is free software;
-# you can redistribute it and/or modify it under the terms of the GNU
-# General Public License (GPL) as published by the Free Software
-# Foundation, in version 2 as it comes in the "COPYING" file of the
-# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-#
-
-ACTION=
-if [ "$1" = "install" ]; then
-  ACTION="install"
-  MODULE="$2"
-  VERSION="$3"
-elif [ "$1" = "uninstall" ]; then
-  shift
-  ACTION="uninstall"
-  OLDMODULES="$*"
-  break
-fi
-
-DKMS=`which dkms 2>/dev/null`
-if [ -n "$DKMS" ]
-then
-    if [ "$ACTION" = "uninstall" ]; then
-
-        echo "Uninstalling modules from DKMS"
-        for m in $OLDMODULES
-        do
-            $DKMS status -m $m | while read line
-            # first, remove _any_ old module
-            do
-                if echo "$line" | grep -q added > /dev/null ||
-                   echo "$line" | grep -q built > /dev/null ||
-                   echo "$line" | grep -q installed > /dev/null; then
-                    # either 'vboxvideo, <version>: added' 
-                    # or 'vboxvideo, <version>, ...: installed'
-                    version=`echo "$line" | sed "s/$m,\([^,]*\)[,:].*/\1/;t;d"`
-                    echo "  removing old DKMS module $m version $version"
-                    $DKMS remove -m $m -v $version --all
-                fi
-            done
-        done
-        exit 0
-
-    elif [ "$ACTION" = "install" ]; then
-
-        echo "Attempting to install using DKMS"
-        if $DKMS add -m $MODULE -v $VERSION &&
-            $DKMS build -m $MODULE -v $VERSION &&
-            $DKMS install -m $MODULE -v $VERSION --force
-        then
-            exit 0
-        fi
-        echo "Failed to install using DKMS, attempting to install without"
-
-    fi
-fi
-
-exit 1
Index: /trunk/src/VBox/Installer/linux/Makefile.include.footer
===================================================================
--- /trunk/src/VBox/Installer/linux/Makefile.include.footer	(revision 57968)
+++ /trunk/src/VBox/Installer/linux/Makefile.include.footer	(revision 57969)
@@ -88,5 +88,4 @@
 endif # eq($(MAKECMDGOALS),clean)
 
-# important: Don't remove Module.symvers! DKMS does 'make clean' before building ...
 clean:
 	for f in $(MOD_CLEAN); do rm -f $$f/*.o $$f/.*.cmd $$f/.*.flags; done
Index: /trunk/src/VBox/Installer/linux/debian/control
===================================================================
--- /trunk/src/VBox/Installer/linux/debian/control	(revision 57968)
+++ /trunk/src/VBox/Installer/linux/debian/control	(revision 57969)
@@ -18,6 +18,7 @@
 Pre-Depends: debconf (>= 1.1) | debconf-2.0
 Depends: ${shlibs:Depends}, debconf (>= 0.5) | debconf-2.0, psmisc, adduser
-Recommends: ${alsa}, ${pulse}, ${sdlttf}, ${dkms},
-  linux-headers, gcc, make, binutils,
+Recommends: ${alsa}, ${pulse}, ${sdlttf}, kmod | kldutils | module-init-tools,
+  linux-headers-generic | linux-headers-generic-pae | linux-headers-686-pae | linux-headers-amd64 | linux-headers-2.6-686 | linux-headers-2.6-amd64 | linux-headers,
+  linux-image, gcc, make | build-essential | dpkg-dev, binutils,
   pdf-viewer, libgl1
 Provides: virtualbox
Index: /trunk/src/VBox/Installer/linux/debian/postinst.in
===================================================================
--- /trunk/src/VBox/Installer/linux/debian/postinst.in	(revision 57968)
+++ /trunk/src/VBox/Installer/linux/debian/postinst.in	(revision 57969)
@@ -120,9 +120,7 @@
 
 # Install and start the new service scripts.
-PRERM_DKMS=
-test "${REGISTER_MODULES}" = 1 && PRERM_DKMS="--dkms %VER%"
 POSTINST_START=--start
 test "${INSTALL_NO_VBOXDRV}" = 1 && POSTINST_START=
-/usr/lib/virtualbox/prerm-common.sh ${PRERM_DKMS} || true
+/usr/lib/virtualbox/prerm-common.sh || true
 /usr/lib/virtualbox/postinst-common.sh /usr/lib/virtualbox "${POSTINST_START}" > /dev/null || true
 
Index: /trunk/src/VBox/Installer/linux/debian/prerm.in
===================================================================
--- /trunk/src/VBox/Installer/linux/debian/prerm.in	(revision 57968)
+++ /trunk/src/VBox/Installer/linux/debian/prerm.in	(revision 57969)
@@ -30,5 +30,5 @@
 db_capb backup
 
-if ! /usr/lib/virtualbox/prerm-common.sh --dkms %VER% > /dev/null 2>&1; then
+if ! /usr/lib/virtualbox/prerm-common.sh > /dev/null 2>&1; then
   if [ "$1" != "failed-upgrade" ]; then
     db_fset virtualbox/old-running seen false || true
Index: /trunk/src/VBox/Installer/linux/debian/rules
===================================================================
--- /trunk/src/VBox/Installer/linux/debian/rules	(revision 57968)
+++ /trunk/src/VBox/Installer/linux/debian/rules	(revision 57969)
@@ -293,6 +293,5 @@
 	  -Valsa=$(if $(HEADLESS),,libasound2) \
 	  -Vpulse=$(if $(HEADLESS),,libpulse0) \
-	  -Vsdlttf=$(if $(HEADLESS),,libsdl-ttf2.0-0) \
-	  -Vdkms=$(if $(filter _Debian_lenny,$(debrel)),,dkms)
+	  -Vsdlttf=$(if $(HEADLESS),,libsdl-ttf2.0-0)
 	dh_md5sums
 	dh_builddeb --destdir $(pkgdir) -- \
Index: /trunk/src/VBox/Installer/linux/install.sh
===================================================================
--- /trunk/src/VBox/Installer/linux/install.sh	(revision 57968)
+++ /trunk/src/VBox/Installer/linux/install.sh	(revision 57969)
@@ -43,5 +43,4 @@
 ACTION=""
 SELF=$1
-DKMS=`which dkms 2> /dev/null`
 RC_SCRIPT=0
 if [ -n "$HARDENED" ]; then
@@ -216,10 +215,4 @@
 
     # Remove previous installation
-    if [ ! "$VERSION" = "$INSTALL_VER" -a ! "$BUILD_MODULE" = "true" -a -n "$DKMS" ]
-    then
-        # Not doing this can confuse dkms
-        info "Rebuilding the kernel module after version change"
-        BUILD_MODULE=true
-    fi
     test "${BUILD_MODULE}" = true || VBOX_DONT_REMOVE_OLD_MODULES=1
 
Index: /trunk/src/VBox/Installer/linux/postinst-common.sh
===================================================================
--- /trunk/src/VBox/Installer/linux/postinst-common.sh	(revision 57968)
+++ /trunk/src/VBox/Installer/linux/postinst-common.sh	(revision 57969)
@@ -51,4 +51,9 @@
 fi
 
+# Remove any traces of DKMS from previous installations.
+for i in vboxhost vboxdrv vboxnetflt vboxnetadp; do
+    rm -rf "/var/lib/dkms/${i}"*
+done
+
 # Install runlevel scripts and systemd unit files
 install_init_script "${TARGET}/vboxdrv.sh" vboxdrv
Index: /trunk/src/VBox/Installer/linux/prerm-common.sh
===================================================================
--- /trunk/src/VBox/Installer/linux/prerm-common.sh	(revision 57968)
+++ /trunk/src/VBox/Installer/linux/prerm-common.sh	(revision 57969)
@@ -31,27 +31,4 @@
 . "./routines.sh"
 
-DO_DKMS=
-VERSION=
-while true
-do
-    test -z "${1}" && break
-    case "${1}" in
-        --dkms)
-            DO_DKMS=true
-            shift
-            VERSION="${1}"
-            if test -z "${VERSION}"; then
-                echo "--dkms requires a version"
-                exit 1
-            fi
-            ;;
-        *)
-            echo "Bad argument ${1}" >&2
-            exit 1
-            ;;
-    esac
-    shift
-done
-
 # Stop the ballon control service
 stop_init_script vboxballoonctrl-service 2>/dev/null
@@ -73,11 +50,4 @@
 delrunlevel vboxweb-service
 remove_init_script vboxweb-service
-DKMS=`which dkms 2>/dev/null`
-if test "$DO_DKMS" = true && test -n "$DKMS"; then
-  $DKMS remove -m vboxhost -v "${VERSION}" --all > /dev/null 2>&1
-  $DKMS remove -m vboxdrv -v "${VERSION}" --all > /dev/null 2>&1
-  $DKMS remove -m vboxnetflt -v "${VERSION}" --all > /dev/null 2>&1
-  $DKMS remove -m vboxnetadp -v "${VERSION}" --all > /dev/null 2>&1
-fi
 # Stop kernel module and uninstall runlevel script
 stop_init_script vboxdrv 2>/dev/null
Index: /trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec
===================================================================
--- /trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec	(revision 57968)
+++ /trunk/src/VBox/Installer/linux/rpm/VirtualBox.tmpl.spec	(revision 57969)
@@ -319,9 +319,7 @@
 fi
 # Install and start the new service scripts.
-PRERM_DKMS=
-test "${REGISTER_MODULES}" = 1 && PRERM_DKMS="--dkms %VER%"
 POSTINST_START=--start
 test "${INSTALL_NO_VBOXDRV}" = 1 && POSTINST_START=
-/usr/lib/virtualbox/prerm-common.sh ${PRERM_DKMS} || true
+/usr/lib/virtualbox/prerm-common.sh || true
 /usr/lib/virtualbox/postinst-common.sh /usr/lib/virtualbox "${POSTINST_START}" > /dev/null || true
 
@@ -333,5 +331,5 @@
 # $1>=1: upgrade
 if [ "$1" = 0 ]; then
-  /usr/lib/virtualbox/prerm-common.sh --dkms || exit 1
+  /usr/lib/virtualbox/prerm-common.sh || exit 1
   rm -f /etc/udev/rules.d/60-vboxdrv.rules
   rm -f /etc/vbox/license_agreed
Index: /trunk/src/VBox/Installer/linux/uninstall.sh
===================================================================
--- /trunk/src/VBox/Installer/linux/uninstall.sh	(revision 57968)
+++ /trunk/src/VBox/Installer/linux/uninstall.sh	(revision 57969)
@@ -30,5 +30,4 @@
 check_root
 
-[ -z "$DKMS"       ]    && DKMS=`which dkms 2> /dev/null`
 [ -z "$CONFIG_DIR" ]    && CONFIG_DIR="/etc/vbox"
 [ -z "$CONFIG" ]        && CONFIG="vbox.cfg"
@@ -50,11 +49,7 @@
 # Do pre-removal common to all installer types, currently service script
 # clean-up.
-test "${BUILD_MODULE}" = true && DO_DKMS="--dkms ${INSTALL_VER}"
-`dirname $0`/prerm-common.sh ${DO_DKMS} || exit 1  # Arguments intentionally not quoted.
+`dirname $0`/prerm-common.sh || exit 1  # Arguments intentionally not quoted.
 
 # Remove kernel module installed
-if [ -n "$DKMS" ]; then
-    $DKMS remove -m vboxhost -v $INSTALL_VER --all > /dev/null 2>&1
-fi
 if [ -z "$VBOX_DONT_REMOVE_OLD_MODULES" ]; then
     find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2> /dev/null
Index: /trunk/src/VBox/Installer/linux/vboxdrv.sh.in
===================================================================
--- /trunk/src/VBox/Installer/linux/vboxdrv.sh.in	(revision 57968)
+++ /trunk/src/VBox/Installer/linux/vboxdrv.sh.in	(revision 57969)
@@ -27,5 +27,5 @@
 ### END INIT INFO
 
-## @todo get rid of the autogeneration, perhaps write "version" and "group" to
+## @todo get rid of the autogeneration, perhaps write "group" to
 ##       a configuration file in /etc
 
@@ -33,5 +33,4 @@
 DEVICE=/dev/vboxdrv
 LOG="/var/log/vbox-install.log"
-VERSION=%VERSION%
 MODPROBE=/sbin/modprobe
 SCRIPTNAME=vboxdrv
@@ -54,5 +53,4 @@
 fi
 BUILDINTMP="$MODULE_SRC/build_in_tmp"
-DODKMS="$MODULE_SRC/do_dkms"
 
 # silently exit if the package was uninstalled but not purged,
@@ -236,10 +234,4 @@
 {
     stop
-    DKMS=`which dkms 2>/dev/null`
-    if [ -n "$DKMS" ]; then
-      begin_msg "Uninstalling old VirtualBox DKMS kernel modules"
-      $DODKMS uninstall vboxhost vboxdrv vboxnetflt vboxnetadp > $LOG
-      succ_msg
-    fi
     if find /lib/modules/`uname -r` -name "vboxpci\.*" 2>/dev/null|grep -q vboxpci; then
         begin_msg "Removing old VirtualBox pci kernel module"
@@ -262,37 +254,28 @@
         succ_msg
     fi
-    if [ -n "$DKMS" ]; then
-      begin_msg "Trying to register the VirtualBox kernel modules using DKMS"
-      if ! $DODKMS install vboxhost $VERSION >> $LOG; then
-        fail_msg "Failed, trying without DKMS"
-        DKMS=""
-      fi
-    fi
-    if [ -z "$DKMS" ]; then
-      begin_msg "Recompiling VirtualBox kernel modules"
-      if ! $BUILDINTMP \
-          --save-module-symvers /tmp/vboxdrv-Module.symvers \
-          --module-source "$MODULE_SRC/vboxdrv" \
-          --no-print-directory install >> $LOG 2>&1; then
-          failure "Look at $LOG to find out what went wrong"
-      fi
-      if ! $BUILDINTMP \
-          --use-module-symvers /tmp/vboxdrv-Module.symvers \
-          --module-source "$MODULE_SRC/vboxnetflt" \
-          --no-print-directory install >> $LOG 2>&1; then
-          failure "Look at $LOG to find out what went wrong"
-      fi
-      if ! $BUILDINTMP \
-          --use-module-symvers /tmp/vboxdrv-Module.symvers \
-          --module-source "$MODULE_SRC/vboxnetadp" \
-          --no-print-directory install >> $LOG 2>&1; then
-          failure "Look at $LOG to find out what went wrong"
-      fi
-      if ! $BUILDINTMP \
-          --use-module-symvers /tmp/vboxdrv-Module.symvers \
-          --module-source "$MODULE_SRC/vboxpci" \
-          --no-print-directory install >> $LOG 2>&1; then
-          failure "Look at $LOG to find out what went wrong"
-      fi
+    begin_msg "Recompiling VirtualBox kernel modules"
+    if ! $BUILDINTMP \
+        --save-module-symvers /tmp/vboxdrv-Module.symvers \
+        --module-source "$MODULE_SRC/vboxdrv" \
+        --no-print-directory install >> $LOG 2>&1; then
+        failure "Look at $LOG to find out what went wrong"
+    fi
+    if ! $BUILDINTMP \
+        --use-module-symvers /tmp/vboxdrv-Module.symvers \
+        --module-source "$MODULE_SRC/vboxnetflt" \
+        --no-print-directory install >> $LOG 2>&1; then
+        failure "Look at $LOG to find out what went wrong"
+    fi
+    if ! $BUILDINTMP \
+        --use-module-symvers /tmp/vboxdrv-Module.symvers \
+        --module-source "$MODULE_SRC/vboxnetadp" \
+        --no-print-directory install >> $LOG 2>&1; then
+        failure "Look at $LOG to find out what went wrong"
+    fi
+    if ! $BUILDINTMP \
+        --use-module-symvers /tmp/vboxdrv-Module.symvers \
+        --module-source "$MODULE_SRC/vboxpci" \
+        --no-print-directory install >> $LOG 2>&1; then
+        failure "Look at $LOG to find out what went wrong"
     fi
     rm -f /etc/vbox/module_not_compiled
