Skip to content
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 is building and installing for the wrong kernel after kernel upgrade #21

Open
lightmaster opened this issue Mar 16, 2024 · 1 comment

Comments

@lightmaster
Copy link

Previous kernel version: 6.5.11-8-pve
New kerenl version:6.5.13-8-pve

When 6.5.13-8-pve was installed, dkms built and installed the driver for both kernels. However, while it correctly built it for the then currently running kernel (the old one):

6.5.11-8-pve make log
DKMS make.log for realtek-r8152-2.17.1 for kernel 6.5.11-8-pve (x86_64)
Fri Mar 15 10:04:01 PM EDT 2024
make -C src/ modules
make[1]: Entering directory '/var/lib/dkms/realtek-r8152/2.17.1/build/src'
make -C /lib/modules/6.5.11-8-pve/build M=/var/lib/dkms/realtek-r8152/2.17.1/build/src modules
make[2]: Entering directory '/usr/src/linux-headers-6.5.11-8-pve'
  CC [M]  /var/lib/dkms/realtek-r8152/2.17.1/build/src/r8152.o
  MODPOST /var/lib/dkms/realtek-r8152/2.17.1/build/src/Module.symvers
  CC [M]  /var/lib/dkms/realtek-r8152/2.17.1/build/src/r8152.mod.o
  LD [M]  /var/lib/dkms/realtek-r8152/2.17.1/build/src/r8152.ko
  BTF [M] /var/lib/dkms/realtek-r8152/2.17.1/build/src/r8152.ko
Skipping BTF generation for /var/lib/dkms/realtek-r8152/2.17.1/build/src/r8152.ko due to unavailability of vmlinux
make[2]: Leaving directory '/usr/src/linux-headers-6.5.11-8-pve'
make[1]: Leaving directory '/var/lib/dkms/realtek-r8152/2.17.1/build/src'

When it attempted to build and install it for kernel 6.5.13-1-pve, it instead installed it for the old kernel.

6.5.13-1-pve make log
DKMS make.log for realtek-r8152-2.17.1 for kernel 6.5.13-1-pve (x86_64)
Fri Mar 15 10:29:33 PM EDT 2024
make -C src/ modules
make[1]: Entering directory '/var/lib/dkms/realtek-r8152/2.17.1/build/src'
make -C /lib/modules/6.5.11-8-pve/build M=/var/lib/dkms/realtek-r8152/2.17.1/build/src modules
make[2]: Entering directory '/usr/src/linux-headers-6.5.11-8-pve'
  CC [M]  /var/lib/dkms/realtek-r8152/2.17.1/build/src/r8152.o
  MODPOST /var/lib/dkms/realtek-r8152/2.17.1/build/src/Module.symvers
  CC [M]  /var/lib/dkms/realtek-r8152/2.17.1/build/src/r8152.mod.o
  LD [M]  /var/lib/dkms/realtek-r8152/2.17.1/build/src/r8152.ko
  BTF [M] /var/lib/dkms/realtek-r8152/2.17.1/build/src/r8152.ko
Skipping BTF generation for /var/lib/dkms/realtek-r8152/2.17.1/build/src/r8152.ko due to unavailability of vmlinux
make[2]: Leaving directory '/usr/src/linux-headers-6.5.11-8-pve'
make[1]: Leaving directory '/var/lib/dkms/realtek-r8152/2.17.1/build/src'

After booting to 6.5.13-1-pve, if I try to ping an IP that is on that realtek interface, I can't. If I then build and install the modules with dkms build -m realtek-r8152/2.17.1 --force && dkms install -m realtek-r8152/2.17.1 --force, then reboot, it works and the log looks like it should, building for the correct kernel:

6.5.13-1-pve make log
DKMS make.log for realtek-r8152-2.17.1 for kernel 6.5.13-1-pve (x86_64)
Fri Mar 15 11:13:06 PM EDT 2024
make -C src/ modules
make[1]: Entering directory '/var/lib/dkms/realtek-r8152/2.17.1/build/src'
make -C /lib/modules/6.5.13-1-pve/build M=/var/lib/dkms/realtek-r8152/2.17.1/build/src modules
make[2]: Entering directory '/usr/src/linux-headers-6.5.13-1-pve'
  CC [M]  /var/lib/dkms/realtek-r8152/2.17.1/build/src/r8152.o
  MODPOST /var/lib/dkms/realtek-r8152/2.17.1/build/src/Module.symvers
  CC [M]  /var/lib/dkms/realtek-r8152/2.17.1/build/src/r8152.mod.o
  LD [M]  /var/lib/dkms/realtek-r8152/2.17.1/build/src/r8152.ko
  BTF [M] /var/lib/dkms/realtek-r8152/2.17.1/build/src/r8152.ko
Skipping BTF generation for /var/lib/dkms/realtek-r8152/2.17.1/build/src/r8152.ko due to unavailability of vmlinux
make[2]: Leaving directory '/usr/src/linux-headers-6.5.13-1-pve'
make[1]: Leaving directory '/var/lib/dkms/realtek-r8152/2.17.1/build/src'

And now, if I try to build and install for the old kernel that's not running with the commands dkms build -m realtek-r8152/2.17.1 -k 6.5.11-8-pve --force && dkms install -m realtek-r8152/2.17.1 -k 6.5.11-8-pve --force, the log now shows that it tried to build for 6.5.11-8-pve but actually built for the running kernel 6.5.13-1-pve

6.5.11-8-pve make log
DKMS make.log for realtek-r8152-2.17.1 for kernel 6.5.11-8-pve (x86_64)
Fri Mar 15 11:20:19 PM EDT 2024
make -C src/ modules
make[1]: Entering directory '/var/lib/dkms/realtek-r8152/2.17.1/build/src'
make -C /lib/modules/6.5.13-1-pve/build M=/var/lib/dkms/realtek-r8152/2.17.1/build/src modules
make[2]: Entering directory '/usr/src/linux-headers-6.5.13-1-pve'
  CC [M]  /var/lib/dkms/realtek-r8152/2.17.1/build/src/r8152.o
  MODPOST /var/lib/dkms/realtek-r8152/2.17.1/build/src/Module.symvers
  CC [M]  /var/lib/dkms/realtek-r8152/2.17.1/build/src/r8152.mod.o
  LD [M]  /var/lib/dkms/realtek-r8152/2.17.1/build/src/r8152.ko
  BTF [M] /var/lib/dkms/realtek-r8152/2.17.1/build/src/r8152.ko
Skipping BTF generation for /var/lib/dkms/realtek-r8152/2.17.1/build/src/r8152.ko due to unavailability of vmlinux
make[2]: Leaving directory '/usr/src/linux-headers-6.5.13-1-pve'
make[1]: Leaving directory '/var/lib/dkms/realtek-r8152/2.17.1/build/src'
@awesometic
Copy link
Owner

Hello, thank you for the reporting.

By your post now I understand why he put --force to the DKMS configs.

But it also has an issue.. What happened to kernel 6.5 and the Linux distributions based on it 🙈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants