]> git.ipfire.org Git - thirdparty/dracut-ng.git/commit
fix(dracut-init): assign real path to srcmods
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Tue, 15 Apr 2025 15:16:22 +0000 (17:16 +0200)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Wed, 16 Apr 2025 15:37:36 +0000 (11:37 -0400)
commitbb6d0c11d321cb71817bbc3f1dcd7bdcef8a8409
tree2e1ac213282ba32d6f7097098bbf17ca9d8313b0
parent7eaa8536fae73aa65fae604820f10e842a18bc88
fix(dracut-init): assign real path to srcmods

On usrmerge systems, /lib is a symlink to /usr/lib, so the real path of the
kernel directory is /usr/lib/modules/<kver>. The issue on these systems is that
a kernel module can be added to the initrd (via dracut-install) by different
dracut modules using both paths, and that causes libkmod to display the
following type of errors in the middle of the dracut build:

```
libkmod: ERROR: kmod_module_new_from_path: kmod_module 'nvidia' already exists with different path: new-path='/lib/modules/6.14.1-1-default//weak-updates/updates/nvidia-open-driver-G06-signed-570.133.07/nvidia.ko.zst' old-path='/usr/lib/modules/6.14.1-1-default/weak-updates/updates/nvidia-open-driver-G06-signed-570.133.07/nvidia.ko.zst'
libkmod: ERROR: kmod_module_parse_depline: ctx=0x560bbacad8f0 path=/lib/modules/6.14.1-1-default//weak-updates/updates/nvidia-open-driver-G06-signed-570.133.07/nvidia.ko.zst error=File exists
```

openSUSE bug report: https://bugzilla.opensuse.org/show_bug.cgi?id=1241114
dracut-init.sh