Vous pouvez utiliser la commande d'installation DKMS (Réf man dkms
:) pour reconstruire et installer le module pour un noyau spécifique. Ci-dessous un exemple créé en supprimant les modules de virtualbox pour une version du noyau.
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