Why does dkms status "WARNING! Diff between built and installed module" happen?

5,684

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.

Share:
5,684
lucidbrot
Author by

lucidbrot

I'm happy to help if I can. Might have to do with the reward system inherent to upvotes. I publish all my answers on here not only under CC-BY SA 3.0 (as automatically done by posting them) but also dual-licenced under CC-BY 4.0. This means attribution is still required but pasting a code snippet into your project does not mean you have to think about how that affects your licence.

Updated on September 18, 2022

Comments

  • lucidbrot
    lucidbrot over 1 year
    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
    lucidbrot almost 4 years
    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
    lucidbrot almost 4 years
    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
  • Pilot6
    Pilot6 almost 4 years
    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
    Pilot6 almost 4 years
    The bootom line is that you don't need that dkms package at all with this kernel.
  • lucidbrot
    lucidbrot almost 4 years
    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).
  • Pilot6
    Pilot6 almost 4 years
    That could be true with older kernels. But now it works OK. Try to remove the dkms completely and see if it still works.
  • lucidbrot
    lucidbrot almost 4 years
    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?
  • Pilot6
    Pilot6 almost 4 years
    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
    Pilot6 almost 4 years
    That module is a backport from the 5.3 kernel. But now you have the kernel itself.
  • lucidbrot
    lucidbrot almost 4 years
    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!
  • Pilot6
    Pilot6 almost 4 years
    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.
  • lucidbrot
    lucidbrot almost 4 years
    I take this as "As long as everything behaves as expected, I don't have to care". Thanks :)
  • Pilot6
    Pilot6 almost 4 years
    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.
  • lucidbrot
    lucidbrot almost 4 years
    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
  • Pilot6
    Pilot6 almost 4 years
    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.
  • lucidbrot
    lucidbrot almost 4 years
    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?
  • Pilot6
    Pilot6 almost 4 years
    OK. Leave it as is. I explained everything a few times already.
  • lucidbrot
    lucidbrot almost 4 years
    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)