Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
installkernel symlinks and /lib/modules
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2175

PostPosted: Mon Sep 09, 2024 8:36 am    Post subject: installkernel symlinks and /lib/modules Reply with quote

I hate to raise the possibility of more complexity in the new-improved installkernel, especially as I don't use it, but ...

I used to use the original Debian (I think) simple installkernel script that simply copied kernels into /boot while maintaining "vmlinuz" and "vmlinuz.old" symlinks, should they exist. Then I wrote my own super-dooper installkernel that has handled a lot more configurations, and further supported a "vmlinuz.new" symlink, providing test, current and fallback kernels.

Whatever, I once got burned when the vmlinuz.old kernel wouldn't boot because I'd changed compiler from LLVM to gcc, and therefore /lib/module was compiled with the wrong compiler. This was a symptom of something deeper - while having "old" and "current" kernels, installkernel doesn't similarly maintain "old" and "current" /lib/modules unless there have different version names. Logically it should maintain /lib/modules/v.r.x.old as well.
_________________
Greybeard
Back to top
View user's profile Send private message
Nowa
Developer
Developer


Joined: 25 Jun 2014
Posts: 429
Location: Nijmegen

PostPosted: Mon Sep 09, 2024 9:51 am    Post subject: Reply with quote

sys-kernel/installkernel does not interact at all with /lib/modules. That is handled by the 'make modules_install' target (as opposed to the 'make install' target which calls /sbin/installkernel provided by sys-kernel/installkernel).

Your idea is good though, but installkernel is not the right place to implement it. One easy way you could accomplish what you describe is to change the "CONFIG_LOCALVERSION" of the kernel before re-compiling and re-installing it. This will locally give the new kernel an effectively different version name, which means it will be separate from your old kernel both in /lib/modules and /boot.
_________________
OS: Gentoo 6.10.12-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum