# [Solved] Depmod warning after recompiling kernel

## rapelotus

Hi, guys! I encounter a problem about depmod warning after recompiling kernel. Its output like these:

```
depmod: WARNING: //lib/modules/3.14.14-gentoo-gnu/misc/vboxsf.ko needs unknown symbol kmem_cache_alloc_trace

depmod: WARNING: //lib/modules/3.14.14-gentoo-gnu/misc/vboxsf.ko needs unknown symbol kmalloc_order_trace

depmod: WARNING: //lib/modules/3.14.14-gentoo-gnu/misc/vboxsf.ko needs unknown symbol alloc_pages_current

depmod: WARNING: //lib/modules/3.14.14-gentoo-gnu/misc/vboxnetflt.ko needs unknown symbol preempt_count_add

depmod: WARNING: //lib/modules/3.14.14-gentoo-gnu/misc/vboxnetflt.ko needs unknown symbol debug_smp_processor_id

depmod: WARNING: //lib/modules/3.14.14-gentoo-gnu/misc/vboxnetadp.ko needs unknown symbol warn_slowpath_null

depmod: WARNING: //lib/modules/3.14.14-gentoo-gnu/misc/vboxguest.ko needs unknown symbol preempt_count_add

depmod: WARNING: //lib/modules/3.14.14-gentoo-gnu/misc/vboxguest.ko needs unknown symbol debug_smp_processor_id

depmod: WARNING: //lib/modules/3.14.14-gentoo-gnu/misc/vboxguest.ko needs unknown symbol preempt_count_sub

depmod: WARNING: //lib/modules/3.14.14-gentoo-gnu/misc/vboxguest.ko needs unknown symbol alloc_pages_current

depmod: WARNING: //lib/modules/3.14.14-gentoo-gnu/misc/vboxpci.ko needs unknown symbol kmem_cache_alloc_trace

depmod: WARNING: //lib/modules/3.14.14-gentoo-gnu/misc/vboxdrv.ko needs unknown symbol preempt_count_add

depmod: WARNING: //lib/modules/3.14.14-gentoo-gnu/misc/vboxdrv.ko needs unknown symbol debug_smp_processor_id

depmod: WARNING: //lib/modules/3.14.14-gentoo-gnu/misc/vboxdrv.ko needs unknown symbol preempt_count_sub

depmod: WARNING: //lib/modules/3.14.14-gentoo-gnu/misc/vboxdrv.ko needs unknown symbol alloc_pages_current
```

When I try to modprobe any of it:

```
for i in vboxsf vboxnetflt vboxnetadp vboxguest vboxpci vboxdrv; do modprobe $i; done
```

The output is like these:

```
modprobe: ERROR: could not insert 'vboxsf': Unknown symbol in module, or unknown parameter (see dmesg)

modprobe: ERROR: could not insert 'vboxnetflt': Unknown symbol in module, or unknown parameter (see dmesg)

modprobe: ERROR: could not insert 'vboxnetadp': Unknown symbol in module, or unknown parameter (see dmesg)

modprobe: ERROR: could not insert 'vboxguest': Unknown symbol in module, or unknown parameter (see dmesg)

modprobe: ERROR: could not insert 'vboxpci': Unknown symbol in module, or unknown parameter (see dmesg)

modprobe: ERROR: could not insert 'vboxdrv': Unknown symbol in module, or unknown parameter (see dmesg)
```

The output of dmesg is like these:

```
[  925.295238] vboxguest: Unknown symbol preempt_count_add (err 0)

[  925.295301] vboxguest: Unknown symbol debug_smp_processor_id (err 0)

[  925.295309] vboxguest: Unknown symbol preempt_count_sub (err 0)

[  925.295339] vboxguest: Unknown symbol alloc_pages_current (err 0)

[  925.297385] vboxdrv: Unknown symbol preempt_count_add (err 0)

[  925.297450] vboxdrv: Unknown symbol debug_smp_processor_id (err 0)

[  925.297458] vboxdrv: Unknown symbol preempt_count_sub (err 0)

[  925.297492] vboxdrv: Unknown symbol alloc_pages_current (err 0)

[  925.299753] vboxdrv: Unknown symbol preempt_count_add (err 0)

[  925.299816] vboxdrv: Unknown symbol debug_smp_processor_id (err 0)

[  925.299824] vboxdrv: Unknown symbol preempt_count_sub (err 0)

[  925.299857] vboxdrv: Unknown symbol alloc_pages_current (err 0)

[  925.301323] vboxguest: Unknown symbol preempt_count_add (err 0)

[  925.301380] vboxguest: Unknown symbol debug_smp_processor_id (err 0)

[  925.301388] vboxguest: Unknown symbol preempt_count_sub (err 0)

[  925.301416] vboxguest: Unknown symbol alloc_pages_current (err 0)

[  925.303355] vboxdrv: Unknown symbol preempt_count_add (err 0)

[  925.303416] vboxdrv: Unknown symbol debug_smp_processor_id (err 0)

[  925.303423] vboxdrv: Unknown symbol preempt_count_sub (err 0)

[  925.303457] vboxdrv: Unknown symbol alloc_pages_current (err 0)

[  925.305824] vboxdrv: Unknown symbol preempt_count_add (err 0)

[  925.305887] vboxdrv: Unknown symbol debug_smp_processor_id (err 0)

[  925.305894] vboxdrv: Unknown symbol preempt_count_sub (err 0)

[  925.305928] vboxdrv: Unknown symbol alloc_pages_current (err 0)
```

I guess it should be that I missed some kernel options when I configured my kernel. So it should be ok if I enable them, but the question is that I don't know which the kernel options they correspond to.

Does anyone know about it or is there any other solution either?

Other information:

Kernel: Linux localhost 3.14.14-gentoo-gnu #16 SMP PREEMPT Mon Oct 13 06:54:02 CST 2014 x86_64 Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz GenuineIntel GNU/Linux( I enabled deblob USE, and I recompiled my kernel with virtualization as module, both xen and kvm)

Related command: 

```
make && make modules_install && make install && genkernel --install initramfs && grub-mkconfig -o /boot/grub/grub.cfg && emerge @module-rebuild
```

My .config file is here

Before I recompiled my kernel, I once emerged virtualbox and virtualbox-guest-additions some time ago. Then soon after, I unemerged all of them. After I recompiled my kernel, I didn't emerge them again.

If anyone needs more information, just tell me!

Thank you for any help!Last edited by rapelotus on Tue Oct 14, 2014 2:49 pm; edited 1 time in total

----------

## rapelotus

All of them(vboxsf vboxnetflt vboxnetadp vboxguest vboxpci vboxdrv)(In the remaining text, I call them as modules)  are the kernel modules that virtualbox and virtualbox-guest-additions installed. Because I had ever installed them and then uninstalled them, the modules were as residues staying in my system. Uninstalling virtualbox and virtualbox-guest-additions didn't removed the modules. Apart from them, the corresponding group vboxguest vboxusers vboxsf, user vboxguest and device files vboxdrv vboxnetctl are also retained. The kernel modules reside in folder /lib/modules/`uname -r`/misc.

I resolved the problem by reemerging and reunemerging virtualbox and virtualbox-guest-additions following commands below:

```
emerge app-emulation/virtualbox app-emulation/virtualbox-guest-additions

emerge --depclean app-emulation/virtualbox-extpack-oracle app-emulation/virtualbox app-emulation/virtualbox-guest-additions && emerge -uDN @world && emerge --depclean && revdep-rebuild
```

To be safe, I recompiled my kernel after each command listed above.

When I reemerged virtualbox and virtualbox-guest-additions, I found that there was not depmod warning after I recompiled my kernel. 

Though the folder /lib/modules/`uname -r`/misc was still there after I unemerged them, the depmod warning didn't appear after I recompiled my kernel. So it is solved.

I also removed the modules, groups, user and device files that virtualbox created, but I am not very sure if it is OK. The command is below:

```
## Before doing this, recheck that you are in the right kernel version. To remove modules##

    rm -rf /lib/modules/`uname -r`/misc

##To delete user that belonged to vboxusers and vboxsf. Remember to replace account with your own account name##

for i in vboxusers vboxsf; do gpasswd -d $account $i; done

## To delete user vboxguest##

userdel -r vboxguest

## To delete group  vboxusers,vboxsf and vboxguest##

for i in vboxusers vboxsf vboxguest; do groupdel $i; done

## To delete device files vboxdrv and vboxnetctl##

rm vboxdrv vboxnetctl
```

Here, I want to express my gratitude to DONAHUE for his/her hint, advice and help! Thank you very much!

Reference about virtualbox provided by DONAHUE is HERE!

----------

