Hello, depmod uses readdir to traverse /lib/modules/`uname -r`/, but readdir sorts files by d_off. It means that if I create two links with the same name in the weak-updates directory, for example: weak-updates/opt/kernel1/extra/a.ko ->/ opt/kernel1/extra/a.ko weak-updates/opt/kernel2/extra/a.ko ->/ opt/kernel2/extra/a.ko Even with the same kernel, the same module may generate different modules.dep on different machines, and it is impossible to predict which ko will be used Maybe we can cache the directory name first and sort it? If can develop in this direction, I will try to make a patch Best Regards, Yang Yanchao