LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-28-2017, 07:21 PM   #1
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
Dynamic Kernel Module Support (DKMS)


Anybody here using DKMS to automatically rebuild kernel modules with Slackware?

There is a slackbuild available, but I have no idea how to implement.

Today I updated the 14.2 kernel to 4.4.74. Rebuilding the VirtualBox kernel modules is on my kernel update check list and takes about a minute to do, and I wondered about using DKMS with Slackware.

At work I use other distros and DKMS is a nice help, epsecially when the maintainers of those other distros are die-hard members of the kernel-of-the-week club. Thankfully Slackware does not issue kernel updates for every oddball corner case patch, but I still wonder how to use DKMS with Slackware.

Thanks.

P.S. I notice the DKMS support has been removed in the VirtualBox vboxdrv script.

Last edited by upnort; 06-28-2017 at 07:25 PM.
 
Old 06-28-2017, 09:56 PM   #2
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
In the amdgpu-pro driver, I initially had dkms support available, however, since it added a requirement for a 3rd-party program, once I figured out how to compile the source itself, I ended up removing it (although, it wouldn't be that hard to put back in).

I've only seen a few people on the forum use dkms. I imagine part of it is because Slackware has so few kernel updates (outside of -current) and another part is that it has the potential to have files that the package manager doesn't know about. Since there is no script support when removing packages (like the doinst.sh when installing), it prevents cleaning up any files or directories created by dkms after package creation (so any kernel updates would leave orphan files if the dkms package is removed).

But I have no issues adding dkms support to amdgpu-pro, and other slackbuild maintainers may be willing as well (they may be like me and not including support since it isn't common to use it on Slackware).
 
Old 06-28-2017, 10:40 PM   #3
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 917

Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
Yes I wouldn't leave home without it. I have three external modules that are kernel version dependent so DKMS was really useful after the recent kernel update; on reboot these modules were rebuilt so that they were all able to work immediately which was very convenient (especially since nvidia was one of the modules).

To make the module rebuilding happen at boot time, I've inserted the following lines into rc.S (just after isapnp and just before kernel module scrip is run)
Code:
# Enable the DKMS autoinstaller
if [ -x /etc/rc.d/rc.dkms_autoinstaller ]; then
    /etc/rc.d/rc.dkms_autoinstaller start
fi
chris
 
1 members found this post helpful.
Old 06-30-2017, 04:22 PM   #4
Darth Vader
Senior Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 2,727

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
Yeah, the DKMS is amazing useful in a Slackware release, with its three kernel updates in a whooping 3 years. If even exists kernel updates...
 
Old 06-30-2017, 05:36 PM   #5
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 917

Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
So few kernel updates may not make DKMS seem so amazing if you run just one machine, but different story if you're responsible for a lab of 20+ machines.
 
1 members found this post helpful.
Old 06-30-2017, 06:23 PM   #6
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Original Poster
Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
Quote:
/etc/rc.d/rc.dkms_autoinstaller
Is this a special script you wrote for yourself?

Quote:
So few kernel updates may not make DKMS seem so amazing if you run just one machine, but different story if you're responsible for a lab of 20+ machines.
Indeed. In my original post I mentioned that Slackware is not a member of the kernel-of-the-week club. I have one physical Ubuntu 16.04 and one virtual CentOS 7 system. The almost weekly kernel updates are a tad exhausting.

I am no security expert and do not play one on TV. My cursory readings of kernel security notices indicate that while a legitimate concern, most of the kernel security flaws require unusual or esoteric circumstances to exploit. Thus most users are unaffected.

That said, I have three Slackware systems using VirtualBox. While I have my own method of updating the kernel module in an efficient manner, I started this thread with the hope that some discussion might reveal whether DKMS could be useful.
 
Old 06-30-2017, 06:53 PM   #7
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 917

Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
Quote:
Originally Posted by upnort View Post
Is this a special script you wrote for yourself?
Although I've been using it for years, dkms was only added to SBo last December, so I had my own build script. Looking back at it now, the rc.dkms_autoinstaller is installed by the Makefile. That could be different with the current version (my build script was for version 2.2.1.2 which is quite old now).


chris

Last edited by chris.willing; 06-30-2017 at 07:22 PM.
 
1 members found this post helpful.
Old 07-04-2017, 07:07 PM   #8
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Original Poster
Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
Doesn't look like much interest in the topic. I guess that's that.
 
Old 07-06-2017, 01:45 AM   #9
chris.willing
Member
 
Registered: Jun 2014
Location: Brisbane, Australia
Distribution: Slackware,LFS
Posts: 917

Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619
I just emailed the maintainer with a patch to the SlackBuild so that dkms will invoke the rebuild of its modules at boot time whenever there's been a change in kernel version.

chris
 
3 members found this post helpful.
Old 07-06-2017, 09:35 AM   #10
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Original Poster
Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
Great! Slackware is not a member of the kernel-of-the-week club. Testing an updated DKMS package will be a challenge.

Also raises the question of how this will affect other SlackBuild packages, such as VirtualBox or Nvidia. For example, the VirtualBox package strips the DKMS support from the respective rc.d script.
 
Old 07-06-2017, 09:52 AM   #11
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by upnort View Post
Also raises the question of how this will affect other SlackBuild packages, such as VirtualBox or Nvidia. For example, the VirtualBox package strips the DKMS support from the respective rc.d script.
If the packages made by other SlackBuilds don't support DKMS, then nothing will be rebuilt on reboot. Those SlackBuilds would need to be rerun against the new kernel.

You could ask the package maintainers to see if they're willing to add DKMS support (probably as an optional thing with it being disabled by default -- this prevents DKMS from being listed as a required dependency for those programs).
 
Old 07-07-2017, 08:48 AM   #12
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
All --

This could be a useful addition to Slackware for me and the company I work for.

We've got OOO 60 remote headless boxes accessible only via SSH + PSKs.

While I don't have a specific use case, the availability of DKMS could be a godsend should we find we need to install out-of-tree modules on the remote boxes.

Almost all of these boxes are CentOS 6 but we are replacing CentOS with Slackware64 as required -- we've got a few test instances out now.

Being curious, I build the dkms-2.4.0-x86_64-1_SBo.tgz Package.

There is no longer an /etc/rc.d/rc.dkms_autoinstaller file in the Package.

Need to read a bit more ... maybe rc.dkms_autoinstaller file is no longer necessary ?

Thanks !

-- kjh

This is the content of the latest Package from SBo:

Code:
# tar -tvf dkms-2.4.0-x86_64-1_SBo.tgz

drwxr-xr-x root/root         0 2017-07-07 08:34 ./
drwxr-xr-x root/root         0 2017-07-07 08:34 etc/
drwxr-xr-x root/root         0 2017-07-07 08:34 etc/dkms/
-rw-r--r-- root/root       906 2017-05-22 11:14 etc/dkms/framework.conf
drwxr-xr-x root/root         0 2017-07-07 08:34 etc/bash_completion.d/
-rw-r--r-- root/root      2384 2017-05-22 11:14 etc/bash_completion.d/dkms
drwxr-xr-x root/root         0 2017-07-07 08:34 var/
drwxr-xr-x root/root         0 2017-07-07 08:34 var/lib/
drwxr-xr-x root/root         0 2017-07-07 08:34 var/lib/dkms/
-rw-r--r-- root/root         6 2017-05-22 11:14 var/lib/dkms/dkms_dbversion
drwxr-xr-x root/root         0 2017-07-07 08:34 usr/
drwxr-xr-x root/root         0 2017-07-07 08:34 usr/sbin/
-rwxr-xr-x root/root    139285 2017-07-07 08:34 usr/sbin/dkms
drwxr-xr-x root/root         0 2017-07-07 08:34 usr/man/
drwxr-xr-x root/root         0 2017-07-07 08:34 usr/man/man8/
-rw-r--r-- root/root     13218 2017-05-22 11:14 usr/man/man8/dkms.8.gz
drwxr-xr-x root/root         0 2017-07-07 08:34 usr/doc/
drwxr-xr-x root/root         0 2017-07-07 08:34 usr/doc/dkms-2.4.0/
-rw-r--r-- root/root        63 2017-05-22 11:14 usr/doc/dkms-2.4.0/TODO
-rw-r--r-- root/root      2828 2017-07-07 08:34 usr/doc/dkms-2.4.0/dkms.SlackBuild
-rw-r--r-- root/root       706 2017-05-22 11:14 usr/doc/dkms-2.4.0/AUTHORS
-rw-r--r-- root/root      4802 2017-05-22 11:14 usr/doc/dkms-2.4.0/README.md
-rw-r--r-- root/root     18007 2017-05-22 11:14 usr/doc/dkms-2.4.0/COPYING
drwxr-xr-x root/root         0 2017-07-07 08:34 usr/lib/
drwxr-xr-x root/root         0 2017-07-07 08:34 usr/lib/dkms/
-rwxr-xr-x root/root      1633 2017-05-22 11:14 usr/lib/dkms/dkms_autoinstaller
-rwxr-xr-x root/root      9017 2017-05-22 11:14 usr/lib/dkms/common.postinst
drwxr-xr-x root/root         0 2017-07-07 08:34 install/
-rw-r--r-- root/root       681 2017-07-07 08:34 install/slack-desc
 
Old 07-07-2017, 10:01 AM   #13
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Original Poster
Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
The file /usr/lib/dkms/dkms_autoinstaller has the format of an rc file.
 
Old 07-07-2017, 10:03 AM   #14
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
Quote:
Originally Posted by upnort View Post
The file /usr/lib/dkms/dkms_autoinstaller has the format of an rc file.
upnort --

Yes, I 'found' that too.

But looking at the shell script: usr/lib/dkms/common.postinst ...

It looks like it might need a little work to run on a Slackware Box ?

-- kjh
 
Old 07-07-2017, 11:30 AM   #15
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Maybe Chris would be willing to share his patch he provided to the maintainer (in case the maintainer decides to not use his patch -- or the maintainer is no longer active... the last two updates weren't done by the maintainer).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: VirtualBox 5.1 Will No Longer Rely on DKMS for Kernel Module Rebuilding on Linux LXer Syndicated Linux News 0 06-05-2016 10:26 AM
[SOLVED] Ubuntu 16.04: DKMS kernel module [nvidia] options in /etc/modprobe.d are ignored at boot dad_ Ubuntu 1 05-24-2016 04:03 PM
LXer: How to build a kernel module with DKMS on Linux LXer Syndicated Linux News 0 04-08-2016 06:32 AM
Installing out of tree Kernel Module - bundled as dkms :-( tdos20 Slackware 1 07-05-2011 03:19 AM
[SOLVED] VirtualBox & The New 2.6.37.3 Kernel. (Solution: DKMS Required To Install VB Kernel Module) cwizardone Slackware 49 03-17-2011 06:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration