11
generic@motorbrot:~$ sudo dkms status
zfs, 0.8.4, 5.3.0-51-generic, x86_64: installed (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!)
zfs, 0.8.4, 5.3.0-53-generic, x86_64: installed (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!)

Why does this message appear?

I have tried removing and reinstalling zfs on one of these two kernels.

generic@motorbrot:~$ sudo dkms remove -m zfs -v 0.8.4 -k 5.3.0-53-generic

-------- Uninstall Beginning --------
Module:  zfs
Version: 0.8.4
Kernel:  5.3.0-53-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

zavl.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.3.0-53-generic/
rmdir: failed to remove '': No such file or directory
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

# [skipping long output that all looks similar but for different something.ko]

spl.ko:
 - Uninstallation
   - Deleting from: /lib/modules/5.3.0-53-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod...

DKMS: uninstall completed.
generic@motorbrot:~$ sudo dkms install -m zfs -v 0.8.4 -k 5.3.0-53-generic

Kernel preparation unnecessary for this kernel.  Skipping...

Running the pre_build script:

# [Skipping "checking for blah... blah" outputs]

Building module:
cleaning build area...
make -j8 KERNELRELEASE=5.3.0-53-generic............

Running the post_build script:
Signing module:
 - /var/lib/dkms/zfs/0.8.4/5.3.0-53-generic/x86_64/module/spl.ko
 - /var/lib/dkms/zfs/0.8.4/5.3.0-53-generic/x86_64/module/icp.ko
 - /var/lib/dkms/zfs/0.8.4/5.3.0-53-generic/x86_64/module/zfs.ko
 - /var/lib/dkms/zfs/0.8.4/5.3.0-53-generic/x86_64/module/zcommon.ko
 - /var/lib/dkms/zfs/0.8.4/5.3.0-53-generic/x86_64/module/zlua.ko
 - /var/lib/dkms/zfs/0.8.4/5.3.0-53-generic/x86_64/module/znvpair.ko
 - /var/lib/dkms/zfs/0.8.4/5.3.0-53-generic/x86_64/module/zunicode.ko
 - /var/lib/dkms/zfs/0.8.4/5.3.0-53-generic/x86_64/module/zavl.ko
Secure Boot not enabled on this system.
cleaning build area...

DKMS: build completed.

zavl.ko:
Running module version sanity check.

Good news! Module version 0.8.4-1 for zavl.ko
exactly matches what is already found in kernel 5.3.0-53-generic.
DKMS will not replace this module.
You may override by specifying --force.

znvpair.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/5.3.0-53-generic/updates/dkms/

zunicode.ko:
Running module version sanity check.

Good news! Module version 0.8.4-1 for zunicode.ko
exactly matches what is already found in kernel 5.3.0-53-generic.
DKMS will not replace this module.
You may override by specifying --force.

zcommon.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/5.3.0-53-generic/updates/dkms/

zfs.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/5.3.0-53-generic/updates/dkms/

icp.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/5.3.0-53-generic/updates/dkms/

zlua.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/5.3.0-53-generic/updates/dkms/

spl.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/5.3.0-53-generic/updates/dkms/

depmod...

DKMS: install completed.

but the output of dkms status remains the same.

Why does this happen? Should I worry? And if I should worry, how would I go about fixing this?

lucidbrot
  • 1,461

2 Answers2

6

You can see the answer in your output.

Good news! Module version 0.8.4-1 for zavl.ko
exactly matches what is already found in kernel 5.3.0-53-generic.
DKMS will not replace this module.
You may override by specifying --force.

dkms has found that the module version (not the dkms package version) is the same that is now in the running kernel and does not replace it.

But the code is different and it is shown in dkms status output.

You can fix it by incrementing the module version in the source code or using --force option as suggested.

A short answer is: this happens because nothing is really installed.

It looks like you needed this DKMS package with an older 5.0 kernel. Now Ubuntu 18.04 is using the 5.3 kernel that has that module natively. So you can remove the dkms now.

Pilot6
  • 92,169
  • 1
    Running sudo dkms install -m zfs -v 0.8.4 -k 5.3.0-53-generic --force states "module zfs/0.8.4 already installed on kernel 5.3.0-53-generic/x86_64".

    And does your answer mean that this message can generally be ignored? I mean, if the module version matches, and everything seems to be working, why would I heed the warning?

    – lucidbrot Jun 03 '20 at 16:44
  • Alright, dkms uninstall -m zfs -v 0.8.4 -k 5.3.0-53-generic --force && dkms install -m zfs -v 0.8.4 -k 5.3.0-53-generic --force works for getting rid of the warning. What I don't get yet is why/when the warning would be relevant – lucidbrot Jun 03 '20 at 16:46
  • This is not about these versions. It is about kernel module versions that can be found in the source code. The valid question is why would you install a dkms module if everything works without it? – Pilot6 Jun 03 '20 at 16:46
  • The bootom line is that you don't need that dkms package at all with this kernel. – Pilot6 Jun 03 '20 at 16:47
  • Well, I already have it installed because I cannot boot to my encrypted zfs root without it. (At least I think so. I had to build zfs 0.8.4 myself because the official versions for ubuntu 18.04 don't feature encryption). – lucidbrot Jun 03 '20 at 16:48
  • That could be true with older kernels. But now it works OK. Try to remove the dkms completely and see if it still works. – Pilot6 Jun 03 '20 at 16:50
  • Hmm I might try that once I have resolved all my other problems :D How old are we talking? I installed zfs on root this year and had quite some issues until encryption worked.

    Also, assuming I actually had a need for this dkms package - when would the source code differ significantly without the kernel module version being updated? i.e. in which cases should I actually care about the warning?

    – lucidbrot Jun 03 '20 at 16:53
  • 1
    It is less that a month when the 5.3 kernel came to 18.04. Actually it is not really installed now. I mean the dkms. Just because the same module came with the kernel upgrade. The warning shows you that it is not needed any more. – Pilot6 Jun 03 '20 at 16:53
  • 1
    That module is a backport from the 5.3 kernel. But now you have the kernel itself. – Pilot6 Jun 03 '20 at 16:57
  • Ah, I see. Then I'll definitely try removing the zfs dkms package. If you could add a bit about "when should I care about the warning" in a more general case than just the zfs package, I'll gladly accept your answer. Thank you for your explanations! – lucidbrot Jun 03 '20 at 16:58
  • 1
    If it doesn't work for some reason, e.g. it is a customized module, I will explain how to change the module number. It seems that I explained what this message means. "When should I care" is too broad to answer. For example if you amended some code in a module and forgot to increment the module version. But it doesn't seem to be the case. – Pilot6 Jun 03 '20 at 17:01
  • I take this as "As long as everything behaves as expected, I don't have to care". Thanks :) – lucidbrot Jun 03 '20 at 17:06
  • 1
    It shows that something is wrong. After another kernel upgrade that may cause trouble. I suggest to remove the dkms. If there is a newer version in the next kernel. dkms will start installing it no matter it is older. – Pilot6 Jun 03 '20 at 17:07
  • I'm sorry, where did you find the information that the dkms package for zfs is no longer needed on the 5.3 kernel? I want to be sure before creating problems for myself – lucidbrot Jun 03 '20 at 20:09
  • I see that the same module version is in the 5.3 kernel, it means that the dkms is a backport. Also I see that it is not really installed now and all is workng. Hence you don't need it. Your system is not using it anyway now. – Pilot6 Jun 03 '20 at 20:13
  • I have installed it before, without warnings that I would have noticed. Am I misunderstanding something? I don't see how you can distinguish in my posted outputs between a previously installed package vs one that came with the kernel? – lucidbrot Jun 03 '20 at 20:29
  • OK. Leave it as is. I explained everything a few times already. – Pilot6 Jun 03 '20 at 20:30
  • I finally had the time to dare dkms remove it and it surprised my by continuing to work. So thank you for your help @Pilot6 (Although I still don't see how you could so confidently know that it was not used :p) – lucidbrot Jul 09 '20 at 10:27
0

My solution for this problem was:

$ dkms status
from the list i get I deleted all dkms related to linux-images 
linux/number depends ont the kernel installed on your machine.
$ dkms remove linux/number --all
I deleted all related files to the dkms from /usr/src/
$ cd /usr/src/
$ rm -r linux-number 
$ cd /etc/modprobe.d
check that they are dleted
 reboot now
after omstart
 apt update && apt upgrade
David DE
  • 2,385
Ahmad
  • 1