Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

MX Package Installer not building/rebuilding dkms modules after Kernel install

Post Reply
Message
Author
User avatar
ChrisUK
Forum Regular
Forum Regular
Posts: 208
Joined: Tue Dec 12, 2017 1:04 pm

MX Package Installer not building/rebuilding dkms modules after Kernel install

#1 Post by ChrisUK » Fri Sep 14, 2018 4:07 am

I mentioned this a while ago, but I seem to remember that it was fixed... but now it's not ;)

Example:

Already have Kernel 4.9 installed - using MX Package Installer to add Antix kernel... extract from mxpi.log:

Code: Select all

The following NEW packages will be installed:
  linux-headers-4.9.91-antix.1-amd64-smp linux-image-4.9.91-antix.1-amd64-smp
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 49.1 MB of archives.
After this operation, 261 MB of additional disk space will be used.
Get:1 http://nl.mxrepo.com/antix/stretch stretch/main amd64 linux-headers-4.9.91-antix.1-amd64-smp amd64 4.9.91-antix.1-amd64-smp-1 [10.6 MB]
Get:2 http://nl.mxrepo.com/antix/stretch stretch/main amd64 linux-image-4.9.91-antix.1-amd64-smp amd64 4.9.91-antix.1-amd64-smp-1 [38.5 MB]
Fetched 49.1 MB in 5s (8,635 kB/s)
Selecting previously unselected package linux-headers-4.9.91-antix.1-amd64-smp.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 341289 files and directories currently installed.)
Preparing to unpack .../linux-headers-4.9.91-antix.1-amd64-smp_4.9.91-antix.1-amd64-smp-1_amd64.deb ...
Unpacking linux-headers-4.9.91-antix.1-amd64-smp (4.9.91-antix.1-amd64-smp-1) ...
Selecting previously unselected package linux-image-4.9.91-antix.1-amd64-smp.
Preparing to unpack .../linux-image-4.9.91-antix.1-amd64-smp_4.9.91-antix.1-amd64-smp-1_amd64.deb ...
Unpacking linux-image-4.9.91-antix.1-amd64-smp (4.9.91-antix.1-amd64-smp-1) ...
Setting up linux-image-4.9.91-antix.1-amd64-smp (4.9.91-antix.1-amd64-smp-1) ...
Warning: Unable to find an initial ram disk that I know how to handle.
Will not try to make an initrd.
update-initramfs: Generating /boot/initrd.img-4.9.91-antix.1-amd64-smp
Generating grub configuration file ...
using custom appearance settings
Found background image: /usr/share/backgrounds/MXLinux/grub/MX-Gold1080P.png
Found linux image: /boot/vmlinuz-4.9.91-antix.1-amd64-smp
Found initrd image: /boot/initrd.img-4.9.91-antix.1-amd64-smp
Found linux image: /boot/vmlinuz-4.9.0-8-amd64
Found initrd image: /boot/initrd.img-4.9.0-8-amd64
Found memtest86+ image: /boot/memtest86+.bin
Found MX 17 Horizon (17) on /dev/sda1
done
Setting up linux-headers-4.9.91-antix.1-amd64-smp (4.9.91-antix.1-amd64-smp-1) ...
No dkms build

So I ran the following few lines of code to (re)build what was needed (probably not the right way to do it):

Code: Select all

#!/bin/bash

for k in $(ls /var/lib/initramfs-tools) ; do
    for d in $(cd /usr/src; ls -d *-*) ; do
        [[ -f /usr/src/${d}/dkms.conf ]] || continue
        m=$(echo $d | sed -r -e 's/-([0-9]).+//')
        v=$(echo $d | sed -r -e 's/[^0-9]+-([0-9])/\1/')
        sudo /usr/sbin/dkms install -c /usr/src/$d/dkms.conf -m $m -v $v -k $k
    done
done

exit 0
Although not a problem for me, it will be for newbies
Chris

MX 17 - Manjaro

User avatar
dolphin_oracle
Forum Veteran
Forum Veteran
Posts: 9574
Joined: Sun Dec 16, 2007 1:17 pm

Re: MX Package Installer not building/rebuilding dkms modules after Kernel install

#2 Post by dolphin_oracle » Fri Sep 14, 2018 6:00 am

We added the forced dhms rebuild to kernels installed from the popular apps tab, although it's possible we missed one. I will look into it.

Kernels installed any other way (syanaptic, apt, the full catalog tab of mxpi) depend on the packaging of the kernel to trigger the rebuilds.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad T530 - MX-17
lenovo s21e & 100s - antiX-17, MX17(live-usb)
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
ChrisUK
Forum Regular
Forum Regular
Posts: 208
Joined: Tue Dec 12, 2017 1:04 pm

Re: MX Package Installer not building/rebuilding dkms modules after Kernel install

#3 Post by ChrisUK » Fri Sep 14, 2018 7:01 am

I can't check this ATM (I'm trying to check different kernels and how they work with my firejail setup, as I think there's compatibility problems with some kernel series), but I think that the /usr/share/mx-packageinstaller-pkglist/rebuild_dkms_packages.sh when it was called, only rebuilt the modules for the active Kernel, not for all installed kernels (hence the reason I used "for k in $(ls /var/lib/initramfs-tools) ; do" instead of calling the "rebuild_dkms_packages.sh").
Chris

MX 17 - Manjaro

Post Reply

Return to “Software / Configuration”