Nikos Chantziaras wrote:
> On 08/07/2021 02:18, Neil Bothwick wrote:
>> On Thu, 8 Jul 2021 02:09:17 +0300, Nikos Chantziaras wrote:
>>
>>> So far, so good. But when I ran "emerge @module-rebuild", which
>>> rebuilds these two packages:
>>>
>>>     app-emulation/vmware-modules
>>>     x11-drivers/nvidia-drivers
>>>
>>> The vmwware and nvidia kernel modules got deleted from
>>> /lib/modules/5.10.47-gentoo.
>>>
>>> This is bad. When did this change? How can I prevent this from
>>> happening?
>>
>> Hasn't this always been the case. emerging a package removes files
>> installed by the previous merge.
>>
>> I think adding /lib/modules to CONFIG_PROTECT will prevent their
>> deletion.
>
> I just tried that after "eselect kernel set 1" and rebuilding modules,
> and it doesn't help.
>
> I am quite sure the modules were not uninstalled in my old system. It
> could be that I had to set some option somewhere, but I don't remember
> :-/
>
>
>


I don't recall it doing that way either.  I've had a kernel go bad
before and had to reboot a old kernel.  If it deleted the files in the
old modules directory, then my GUI wouldn't come up because the video
drivers would no longer be there.  I think I'd remember that.  :/

Just for giggles, I did a ls for my current installed kernel versions
modules directory.  This is what it shows.


root@fireball / # ls -al /lib/modules/4.19.40-gentoo/
total 80
drwxr-xr-x  4 root root  4096 May  3  2020 .
drwxr-xr-x 14 root root  4096 Jul  1 01:39 ..
lrwxrwxrwx  1 root root    29 May 15  2019 build ->
/usr/src/linux-4.19.40-gentoo
drwxr-xr-x  3 root root  4096 Apr 23  2020 kernel
-rw-r--r--  1 root root   334 May  3  2020 modules.alias
-rw-r--r--  1 root root   530 May  3  2020 modules.alias.bin
-rw-r--r--  1 root root 12021 Apr 23  2020 modules.builtin
-rw-r--r--  1 root root 15879 May  3  2020 modules.builtin.bin
-rw-r--r--  1 root root   156 May  3  2020 modules.dep
-rw-r--r--  1 root root   321 May  3  2020 modules.dep.bin
-rw-r--r--  1 root root     0 May  3  2020 modules.devname
-rw-r--r--  1 root root    36 Apr 23  2020 modules.order
-rw-r--r--  1 root root    55 May  3  2020 modules.softdep
-rw-r--r--  1 root root  3838 May  3  2020 modules.symbols
-rw-r--r--  1 root root  4271 May  3  2020 modules.symbols.bin
lrwxrwxrwx  1 root root    29 Apr 23  2020 source ->
/usr/src/linux-4.19.40-gentoo
drwxr-xr-x  2 root root  4096 Feb 15 01:23 video

root@fireball / # ls -al /lib/modules/5.6.7-gentoo/
total 184
drwxr-xr-x  4 root root   4096 Apr 20 01:47 .
drwxr-xr-x 14 root root   4096 Jul  1 01:39 ..
lrwxrwxrwx  1 root root     27 May  2  2020 build ->
/usr/src/linux-5.6.7-gentoo
drwxr-xr-x  3 root root   4096 May  9  2020 kernel
-rw-r--r--  1 root root    334 Apr 20 01:47 modules.alias
-rw-r--r--  1 root root    530 Apr 20 01:47 modules.alias.bin
-rw-r--r--  1 root root  12558 May  9  2020 modules.builtin
-rw-r--r--  1 root root      0 Apr 20 01:47 modules.builtin.alias.bin
-rw-r--r--  1 root root  16054 Apr 20 01:47 modules.builtin.bin
-rw-r--r--  1 root root 101792 May  9  2020 modules.builtin.modinfo
-rw-r--r--  1 root root    193 Apr 20 01:47 modules.dep
-rw-r--r--  1 root root    401 Apr 20 01:47 modules.dep.bin
-rw-r--r--  1 root root      0 Apr 20 01:47 modules.devname
-rw-r--r--  1 root root     36 May  9  2020 modules.order
-rw-r--r--  1 root root     55 Apr 20 01:47 modules.softdep
-rw-r--r--  1 root root   3768 Apr 20 01:47 modules.symbols
-rw-r--r--  1 root root   4321 Apr 20 01:47 modules.symbols.bin
lrwxrwxrwx  1 root root     27 May  9  2020 source ->
/usr/src/linux-5.6.7-gentoo
drwxr-xr-x  2 root root   4096 Apr 20 01:47 video

root@fireball / # ls -al /lib/modules/5.10.46-gentoo/
total 184
drwxr-xr-x  3 root root   4096 Jul  1 01:39 .
drwxr-xr-x 14 root root   4096 Jul  1 01:39 ..
lrwxrwxrwx  1 root root     29 Jul  1 01:39 build ->
/usr/src/linux-5.10.46-gentoo
drwxr-xr-x  3 root root   4096 Jul  1 01:39 kernel
-rw-r--r--  1 root root    108 Jul  1 01:39 modules.alias
-rw-r--r--  1 root root    335 Jul  1 01:39 modules.alias.bin
-rw-r--r--  1 root root  12739 Jul  1 01:39 modules.builtin
-rw-r--r--  1 root root      0 Jul  1 01:39 modules.builtin.alias.bin
-rw-r--r--  1 root root  16480 Jul  1 01:39 modules.builtin.bin
-rw-r--r--  1 root root 103263 Jul  1 01:39 modules.builtin.modinfo
-rw-r--r--  1 root root     37 Jul  1 01:39 modules.dep
-rw-r--r--  1 root root     74 Jul  1 01:39 modules.dep.bin
-rw-r--r--  1 root root      0 Jul  1 01:39 modules.devname
-rw-r--r--  1 root root     36 Jul  1 01:39 modules.order
-rw-r--r--  1 root root     55 Jul  1 01:39 modules.softdep
-rw-r--r--  1 root root     49 Jul  1 01:39 modules.symbols
-rw-r--r--  1 root root     12 Jul  1 01:39 modules.symbols.bin
lrwxrwxrwx  1 root root     29 Jul  1 01:39 source ->
/usr/src/linux-5.10.46-gentoo
root@fireball / #


I currently have three available kernels, one I did recently and have
yet to reboot and use.  I also haven't changed the pointer and
re-emerged any modules yet.  Still, as one can see, there is a video
directory for video which contains my nvidia drivers for each kernel
version like this:


root@fireball / # ls -al /lib/modules/4.19.40-gentoo/video/
total 28020
drwxr-xr-x 2 root root     4096 Feb 15 01:23 .
drwxr-xr-x 4 root root     4096 May  3  2020 ..
-rw-r--r-- 1 root root    80504 May  3  2020 nvidia-drm.ko
-rw-r--r-- 1 root root 27162104 May  3  2020 nvidia.ko
-rw-r--r-- 1 root root  1437216 May  3  2020 nvidia-modeset.ko
root@fireball / # ls -al /lib/modules/5.6.7-gentoo/video/
total 43536
drwxr-xr-x 2 root root     4096 Apr 20 01:47 .
drwxr-xr-x 4 root root     4096 Apr 20 01:47 ..
-rw-r--r-- 1 root root    92224 Apr 19 22:38 nvidia-drm.ko
-rw-r--r-- 1 root root 40951920 Apr 19 22:38 nvidia.ko
-rw-r--r-- 1 root root  1566736 Apr 19 22:38 nvidia-modeset.ko
-rw-r--r-- 1 root root  1950824 Apr 19 22:38 nvidia-uvm.ko
root@fireball / #


So, at least when I updated that 5.6.7 kernel ages ago, it didn't delete
anything old.  It should install to the new location as if it is a new
install, since it is a new kernel, it sort of is a new install since it
has never been installed for THAT kernel before. 

Has this changed?  Is it a setting somewhere that is a new default? 
Can't imagine what that is tho.  I know I don't like the change if it
has because I tend to keep multiple kernels installed as fall backs.  If
I have to fall back on a older kernel, I expect everything to work like
it did the last time I used that kernel as far as drivers go, including
and especially video drivers. 

So, let me test this theory a bit.  I used eselect to point to new
kernel.  I emerged the nvidia drivers again and here is the listing now,
old kernels and the one I've yet to use but just re-emerged the drivers
for. 


root@fireball / # ls -al /lib/modules/4.19.40-gentoo/video/
total 28020
drwxr-xr-x 2 root root     4096 Feb 15 01:23 .
drwxr-xr-x 4 root root     4096 May  3  2020 ..
-rw-r--r-- 1 root root    80504 May  3  2020 nvidia-drm.ko
-rw-r--r-- 1 root root 27162104 May  3  2020 nvidia.ko
-rw-r--r-- 1 root root  1437216 May  3  2020 nvidia-modeset.ko

root@fireball / # ls -al /lib/modules/5.6.7-gentoo/video/
total 43536
drwxr-xr-x 2 root root     4096 Apr 20 01:47 .
drwxr-xr-x 4 root root     4096 Apr 20 01:47 ..
-rw-r--r-- 1 root root    92224 Apr 19 22:38 nvidia-drm.ko
-rw-r--r-- 1 root root 40951920 Apr 19 22:38 nvidia.ko
-rw-r--r-- 1 root root  1566736 Apr 19 22:38 nvidia-modeset.ko
-rw-r--r-- 1 root root  1950824 Apr 19 22:38 nvidia-uvm.ko

root@fireball / # ls -al /lib/modules/5.10.46-gentoo/video/
total 43532
drwxr-xr-x 2 root root     4096 Jul  7 19:24 .
drwxr-xr-x 4 root root     4096 Jul  7 19:24 ..
-rw-r--r-- 1 root root    93000 Jul  7 19:22 nvidia-drm.ko
-rw-r--r-- 1 root root 40953232 Jul  7 19:22 nvidia.ko
-rw-r--r-- 1 root root  1566784 Jul  7 19:22 nvidia-modeset.ko
-rw-r--r-- 1 root root  1947848 Jul  7 19:22 nvidia-uvm.ko
root@fireball / #


So, old version of modules are still there as they should be and new
modules installed for the new kernel version.  This is the build info:


[ebuild   R    ] x11-drivers/nvidia-drivers-460.67:0/460::gentoo  USE="X
driver tools -dist-kernel -static-libs"


It seems to work as it used to here.  Maybe a USE flag above will change
that?? I dunno.

Dale

:-)  :-) 

Reply via email to