Sie können den DKMS-Installationsbefehl (Ref man dkms
:) verwenden, um das Modul für einen bestimmten Kernel neu zu erstellen und zu installieren. Unten ein Beispiel, das durch Entfernen von Virtualbox-Modulen für eine Kernelversion erstellt wurde.
sudo dkms install <module-name>/<module-version> -k <kernel-version>
$ dkms status
vboxhost, 5.0.10, 4.2.0-21-generic, x86_64: installed
vboxhost, 5.0.10, 4.2.0-22-generic, x86_64: installed
vboxhost, 5.0.10, 4.2.0-23-generic, x86_64: installed
vboxhost, 5.0.10, 4.2.0-25-generic, x86_64: installed
$ sudo dkms remove vboxhost/5.0.10 -k 4.2.0-22-generic
...
$ dkms status
vboxhost, 5.0.10, 4.2.0-21-generic, x86_64: installed
vboxhost, 5.0.10, 4.2.0-23-generic, x86_64: installed
vboxhost, 5.0.10, 4.2.0-25-generic, x86_64: installed
$ sudo dkms install vboxhost/5.0.10 -k 4.2.0-22-generic
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area....
make KERNELRELEASE=4.2.0-22-generic -C /lib/modules/4.2.0-22-generic/build M=/var/lib/dkms/vboxhost/5.0.10/build...............
cleaning build area....
DKMS: build completed.
vboxdrv.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.2.0-22-generic/updates/dkms/
vboxnetflt.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.2.0-22-generic/updates/dkms/
vboxnetadp.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.2.0-22-generic/updates/dkms/
vboxpci.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.2.0-22-generic/updates/dkms/
depmod....
DKMS: install completed.
$ dkms status
vboxhost, 5.0.10, 4.2.0-21-generic, x86_64: installed
vboxhost, 5.0.10, 4.2.0-22-generic, x86_64: installed
vboxhost, 5.0.10, 4.2.0-23-generic, x86_64: installed
vboxhost, 5.0.10, 4.2.0-25-generic, x86_64: installed