public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] multiple /lib64/modules directories
@ 2011-05-17  0:11 Valmor de Almeida
  2011-05-17  0:12 ` Alan McKinnon
  0 siblings, 1 reply; 9+ messages in thread
From: Valmor de Almeida @ 2011-05-17  0:11 UTC (permalink / raw
  To: gentoo-user


Hello,

After a recent sync, I ended up with these two modules

 /lib64/modules/2.6.36-gentoo-r5/misc/vboxdrv.ko
 /lib64/modules/2.6.37-gentoo-r4/misc/vboxdrv.ko

and others too. I expected the directory for the older kernel to be
removed. Is this the case? Virtualbox was re-emerged after the sync
therefore the modules for the newer kernel were created. The current
kernel is 2.6.37-gentoo-r4 (and it is the only one on my system). Should
the directory /lib64/modules/2.6.36-gentoo-r5/ still exist?

Thanks,

--
Valmor

-> locate vbox* | grep modules
/lib64/modules/2.6.36-gentoo-r5/misc/vboxdrv.ko
/lib64/modules/2.6.36-gentoo-r5/misc/vboxnetadp.ko
/lib64/modules/2.6.36-gentoo-r5/misc/vboxnetflt.ko
/lib64/modules/2.6.37-gentoo-r4/misc/vboxdrv.ko
/lib64/modules/2.6.37-gentoo-r4/misc/vboxnetadp.ko
/lib64/modules/2.6.37-gentoo-r4/misc/vboxnetflt.ko

-> equery list gentoo-sources
[ Searching for package 'gentoo-sources' in all categories among: ]
 * installed packages
[I--] [  ] sys-kernel/gentoo-sources-2.6.37-r4 (2.6.37-r4)





^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] multiple /lib64/modules directories
  2011-05-17  0:11 [gentoo-user] multiple /lib64/modules directories Valmor de Almeida
@ 2011-05-17  0:12 ` Alan McKinnon
  2011-05-17  0:51   ` Valmor de Almeida
  2011-05-17  1:55   ` Dale
  0 siblings, 2 replies; 9+ messages in thread
From: Alan McKinnon @ 2011-05-17  0:12 UTC (permalink / raw
  To: gentoo-user

Apparently, though unproven, at 02:11 on Tuesday 17 May 2011, Valmor de 
Almeida did opine thusly:

> Hello,
> 
> After a recent sync, I ended up with these two modules
> 
>  /lib64/modules/2.6.36-gentoo-r5/misc/vboxdrv.ko
>  /lib64/modules/2.6.37-gentoo-r4/misc/vboxdrv.ko
> 
> and others too. I expected the directory for the older kernel to be
> removed. Is this the case? Virtualbox was re-emerged after the sync
> therefore the modules for the newer kernel were created. The current
> kernel is 2.6.37-gentoo-r4 (and it is the only one on my system). Should
> the directory /lib64/modules/2.6.36-gentoo-r5/ still exist?

This is basic Linux stuff.

There is a /lib/modules/xxxx for each installed kernel binary. 
Portage will never remove them as portage did not install them, they are 
installed by the "make modules_install" target of the kernel build process, 
which you always run manually outside of portage's control.

The vbox modules are also in those directories under misc/ but this comes with 
a quirk. They are usually built by remerging virtualbox-modules or running 
module-rebuild. Unlike most other ebuilds, these do not delete everything from 
the last emerge and replace all files (you will still need all installed 
modules for any installed kernels you still have). So, portage simply does not 
remove things from /lib/modules/

In other words, what you have is exactly what you should have and things as 
working as designed. To remove anything in /lib/modules, you must manually rm 
them yourself.

Incidentally, the same goes for the various kernel files in /boot/. 



> 
> Thanks,
> 
> --
> Valmor
> 
> -> locate vbox* | grep modules
> /lib64/modules/2.6.36-gentoo-r5/misc/vboxdrv.ko
> /lib64/modules/2.6.36-gentoo-r5/misc/vboxnetadp.ko
> /lib64/modules/2.6.36-gentoo-r5/misc/vboxnetflt.ko
> /lib64/modules/2.6.37-gentoo-r4/misc/vboxdrv.ko
> /lib64/modules/2.6.37-gentoo-r4/misc/vboxnetadp.ko
> /lib64/modules/2.6.37-gentoo-r4/misc/vboxnetflt.ko
> 
> -> equery list gentoo-sources
> [ Searching for package 'gentoo-sources' in all categories among: ]
>  * installed packages
> [I--] [  ] sys-kernel/gentoo-sources-2.6.37-r4 (2.6.37-r4)

-- 
alan dot mckinnon at gmail dot com



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] multiple /lib64/modules directories
  2011-05-17  0:12 ` Alan McKinnon
@ 2011-05-17  0:51   ` Valmor de Almeida
  2011-05-17  1:55   ` Dale
  1 sibling, 0 replies; 9+ messages in thread
From: Valmor de Almeida @ 2011-05-17  0:51 UTC (permalink / raw
  To: gentoo-user

On 05/16/2011 08:12 PM, Alan McKinnon wrote:
> Apparently, though unproven, at 02:11 on Tuesday 17 May 2011, Valmor de 
> Almeida did opine thusly:
> 
[snip]
> 
> In other words, what you have is exactly what you should have and things as 
> working as designed. To remove anything in /lib/modules, you must manually rm 
> them yourself.

Thanks; manually removed.

--
Valmor

> 
> Incidentally, the same goes for the various kernel files in /boot/. 
> 
> 
> 
>>
>> Thanks,
>>
>> --
>> Valmor
>>
>> -> locate vbox* | grep modules
>> /lib64/modules/2.6.36-gentoo-r5/misc/vboxdrv.ko
>> /lib64/modules/2.6.36-gentoo-r5/misc/vboxnetadp.ko
>> /lib64/modules/2.6.36-gentoo-r5/misc/vboxnetflt.ko
>> /lib64/modules/2.6.37-gentoo-r4/misc/vboxdrv.ko
>> /lib64/modules/2.6.37-gentoo-r4/misc/vboxnetadp.ko
>> /lib64/modules/2.6.37-gentoo-r4/misc/vboxnetflt.ko
>>
>> -> equery list gentoo-sources
>> [ Searching for package 'gentoo-sources' in all categories among: ]
>>  * installed packages
>> [I--] [  ] sys-kernel/gentoo-sources-2.6.37-r4 (2.6.37-r4)
> 




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] multiple /lib64/modules directories
  2011-05-17  0:12 ` Alan McKinnon
  2011-05-17  0:51   ` Valmor de Almeida
@ 2011-05-17  1:55   ` Dale
  2011-05-17  4:08     ` Thanasis
  2011-05-17  6:51     ` Joost Roeleveld
  1 sibling, 2 replies; 9+ messages in thread
From: Dale @ 2011-05-17  1:55 UTC (permalink / raw
  To: gentoo-user

Alan McKinnon wrote:
>
> This is basic Linux stuff.
>
> There is a /lib/modules/xxxx for each installed kernel binary.
> Portage will never remove them as portage did not install them, they are
> installed by the "make modules_install" target of the kernel build process,
> which you always run manually outside of portage's control.
>
> The vbox modules are also in those directories under misc/ but this comes with
> a quirk. They are usually built by remerging virtualbox-modules or running
> module-rebuild. Unlike most other ebuilds, these do not delete everything from
> the last emerge and replace all files (you will still need all installed
> modules for any installed kernels you still have). So, portage simply does not
> remove things from /lib/modules/
>
> In other words, what you have is exactly what you should have and things as
> working as designed. To remove anything in /lib/modules, you must manually rm
> them yourself.
>
> Incidentally, the same goes for the various kernel files in /boot/.
>
>
>
>    

So, if I delete a bzImage from /boot that came from kernel version 
2.6.32-1 and no longer plan to use it, I could also remove the modules 
from /lib/modules/2.32-1 as well?  That could come in handy to know if 
someone has a small drive and has to watch their drive space.

root@smoker / # du -shc /lib/modules/2.6.30-gentoo-r8/
7.6M    /lib/modules/2.6.30-gentoo-r8/
7.6M    total
root@smoker / #

It's not much but it could help.

Dale

:-)  :-)



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] multiple /lib64/modules directories
  2011-05-17  1:55   ` Dale
@ 2011-05-17  4:08     ` Thanasis
  2011-05-17  6:51     ` Joost Roeleveld
  1 sibling, 0 replies; 9+ messages in thread
From: Thanasis @ 2011-05-17  4:08 UTC (permalink / raw
  To: gentoo-user

on 05/17/2011 04:55 AM Dale wrote the following:
> So, if I delete a bzImage from /boot that came from kernel version
> 2.6.32-1 and no longer plan to use it, I could also remove the modules
> from /lib/modules/2.32-1 as well? 

Of course, and in fact you should, as there is no point in keeping them
without the corresponding kernel...



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] multiple /lib64/modules directories
  2011-05-17  1:55   ` Dale
  2011-05-17  4:08     ` Thanasis
@ 2011-05-17  6:51     ` Joost Roeleveld
  2011-05-17 13:08       ` Dale
  2011-05-17 14:49       ` Paul Hartman
  1 sibling, 2 replies; 9+ messages in thread
From: Joost Roeleveld @ 2011-05-17  6:51 UTC (permalink / raw
  To: gentoo-user

On Monday 16 May 2011 20:55:39 Dale wrote:
> root@smoker / # du -shc /lib/modules/2.6.30-gentoo-r8/
> 7.6M    /lib/modules/2.6.30-gentoo-r8/
> 7.6M    total
> root@smoker / #
> 
> It's not much but it could help.

Imagine a system that's been kept updated for over 10 years and a new kernel 
comes out every month (on average)
You could end up with 120 of these, and then it would be 912MB...

And if you're like me and stick a lot of stuff as modules, then it could be 
even more....

--
Joost



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] multiple /lib64/modules directories
  2011-05-17  6:51     ` Joost Roeleveld
@ 2011-05-17 13:08       ` Dale
  2011-05-17 14:49       ` Paul Hartman
  1 sibling, 0 replies; 9+ messages in thread
From: Dale @ 2011-05-17 13:08 UTC (permalink / raw
  To: gentoo-user

Joost Roeleveld wrote:
> On Monday 16 May 2011 20:55:39 Dale wrote:
>    
>> root@smoker / # du -shc /lib/modules/2.6.30-gentoo-r8/
>> 7.6M    /lib/modules/2.6.30-gentoo-r8/
>> 7.6M    total
>> root@smoker / #
>>
>> It's not much but it could help.
>>      
> Imagine a system that's been kept updated for over 10 years and a new kernel
> comes out every month (on average)
> You could end up with 120 of these, and then it would be 912MB...
>
> And if you're like me and stick a lot of stuff as modules, then it could be
> even more....
>
> --
> Joost
>
>    

That's why I wanted to clarify, not just for me but for others.  I'm 
gong to look on my old machine when I boot it again.  That install is 
many years old and I have NEVER deleted anything there.  I bet it is 
pretty good size by now.  Thing is, I only use nvidia as a module myself 
but some stuff is forced in as a module.  Some SCSI driver.

This is good to know.

Dale

:-)  :-)



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] multiple /lib64/modules directories
  2011-05-17  6:51     ` Joost Roeleveld
  2011-05-17 13:08       ` Dale
@ 2011-05-17 14:49       ` Paul Hartman
  2011-05-17 15:04         ` Joost Roeleveld
  1 sibling, 1 reply; 9+ messages in thread
From: Paul Hartman @ 2011-05-17 14:49 UTC (permalink / raw
  To: gentoo-user

On Tue, May 17, 2011 at 1:51 AM, Joost Roeleveld <joost@antarean.org> wrote:
> Imagine a system that's been kept updated for over 10 years and a new kernel
> comes out every month (on average)
> You could end up with 120 of these, and then it would be 912MB...

Have you been looking at my computer?? ;)



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] multiple /lib64/modules directories
  2011-05-17 14:49       ` Paul Hartman
@ 2011-05-17 15:04         ` Joost Roeleveld
  0 siblings, 0 replies; 9+ messages in thread
From: Joost Roeleveld @ 2011-05-17 15:04 UTC (permalink / raw
  To: gentoo-user

On Tuesday 17 May 2011 09:49:52 Paul Hartman wrote:
> Have you been looking at my computer?? ;)

As if I'd admit that over an open forum? ;)

--
Joost



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-05-17 15:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-17  0:11 [gentoo-user] multiple /lib64/modules directories Valmor de Almeida
2011-05-17  0:12 ` Alan McKinnon
2011-05-17  0:51   ` Valmor de Almeida
2011-05-17  1:55   ` Dale
2011-05-17  4:08     ` Thanasis
2011-05-17  6:51     ` Joost Roeleveld
2011-05-17 13:08       ` Dale
2011-05-17 14:49       ` Paul Hartman
2011-05-17 15:04         ` Joost Roeleveld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox