1 |
Apparently, though unproven, at 02:11 on Tuesday 17 May 2011, Valmor de |
2 |
Almeida did opine thusly: |
3 |
|
4 |
> Hello, |
5 |
> |
6 |
> After a recent sync, I ended up with these two modules |
7 |
> |
8 |
> /lib64/modules/2.6.36-gentoo-r5/misc/vboxdrv.ko |
9 |
> /lib64/modules/2.6.37-gentoo-r4/misc/vboxdrv.ko |
10 |
> |
11 |
> and others too. I expected the directory for the older kernel to be |
12 |
> removed. Is this the case? Virtualbox was re-emerged after the sync |
13 |
> therefore the modules for the newer kernel were created. The current |
14 |
> kernel is 2.6.37-gentoo-r4 (and it is the only one on my system). Should |
15 |
> the directory /lib64/modules/2.6.36-gentoo-r5/ still exist? |
16 |
|
17 |
This is basic Linux stuff. |
18 |
|
19 |
There is a /lib/modules/xxxx for each installed kernel binary. |
20 |
Portage will never remove them as portage did not install them, they are |
21 |
installed by the "make modules_install" target of the kernel build process, |
22 |
which you always run manually outside of portage's control. |
23 |
|
24 |
The vbox modules are also in those directories under misc/ but this comes with |
25 |
a quirk. They are usually built by remerging virtualbox-modules or running |
26 |
module-rebuild. Unlike most other ebuilds, these do not delete everything from |
27 |
the last emerge and replace all files (you will still need all installed |
28 |
modules for any installed kernels you still have). So, portage simply does not |
29 |
remove things from /lib/modules/ |
30 |
|
31 |
In other words, what you have is exactly what you should have and things as |
32 |
working as designed. To remove anything in /lib/modules, you must manually rm |
33 |
them yourself. |
34 |
|
35 |
Incidentally, the same goes for the various kernel files in /boot/. |
36 |
|
37 |
|
38 |
|
39 |
> |
40 |
> Thanks, |
41 |
> |
42 |
> -- |
43 |
> Valmor |
44 |
> |
45 |
> -> locate vbox* | grep modules |
46 |
> /lib64/modules/2.6.36-gentoo-r5/misc/vboxdrv.ko |
47 |
> /lib64/modules/2.6.36-gentoo-r5/misc/vboxnetadp.ko |
48 |
> /lib64/modules/2.6.36-gentoo-r5/misc/vboxnetflt.ko |
49 |
> /lib64/modules/2.6.37-gentoo-r4/misc/vboxdrv.ko |
50 |
> /lib64/modules/2.6.37-gentoo-r4/misc/vboxnetadp.ko |
51 |
> /lib64/modules/2.6.37-gentoo-r4/misc/vboxnetflt.ko |
52 |
> |
53 |
> -> equery list gentoo-sources |
54 |
> [ Searching for package 'gentoo-sources' in all categories among: ] |
55 |
> * installed packages |
56 |
> [I--] [ ] sys-kernel/gentoo-sources-2.6.37-r4 (2.6.37-r4) |
57 |
|
58 |
-- |
59 |
alan dot mckinnon at gmail dot com |