New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DKMS module removed completely when last kernel removed #37
Comments
|
@ian-abbott |
|
@yuzaipiaofei On Debian, if you reinstall a kernel package, it first removes the DKMS modules for the kernel, which may result in DKMS forgetting the module/version entirely. Then after the kernel is reinstalled and DKMS is triggered to rebuild the modules, the module/version is no longer present. This requires manual use of the dkms commands afterwards to re-add and reinstall the desired modules. |
|
@ian-abbott How do you remove your kernel image? then which dkms version you are using ? |
|
@yuzaipiaofei I think I have a clue what is going wrong. The custom linux-image debian package includes a "prerm" script that gets run by the Still, it would be nice if the |
|
I have the same issue on upgrade between recent official Raspbian kernels. As a workaround for specific module some additional directory can be created in |
|
So the main problem seems to be that Debian's dkms is based on dkms 2.3, and doesn't have the changes from commit 0c19129 that made it into dkms 2.4. That changed the "uninstall" functionality to also effectively unbuild the module (by deleting the build directory), despite what the man page says, and changed the So Debian should probably cherry-pick that commit and update its own dkms kernel prerm script accordingly. |
|
MR #117 provides for a clear separation, allowing you to reach what you're looking for. Namely, there are three commands each removing:
|
|
With the above MR, one can use "remove" or "unbuild" depending on their need. |
|
Is there any reason why the "unbuild" command is not used in the kernel prerm script? Line 10 in 1194db8
|
|
Good question @RalfGoebel - the script prerm seems to be Debian specific and my Debian knowledge is rather limited. I would encourage you to open a MR with some context behind the change. As follow-up you might also want to help reduce (remove really) the Debian patchset and scripts - they have 12 year old, prerm duplicate |
I'm not sure if this is a bug. If a DKMS module/module-version has been added, built and installed for a single kernel/arch, and is then removed for that kernel/arch it is removed completely and cannot be built and installed for another kernel/arch until it is added again manually.
The relevant part of the dkms script is:
This looks as if the module/version should not be removed completely if
$dkms_tree/$module/$module_version/sourceis a directory. It is usually a symbolic link, and the abovefindcommand will not find it in that case. Perhaps the abovefindcommand should use the-Hor-Loption so that it finds thesourcesymlink. Or perhaps the module version should not be removed completely unless the--alloption is given.The text was updated successfully, but these errors were encountered: