View previous topic :: View next topic |
Author |
Message |
sumati Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 10 Nov 2019 Posts: 184
|
Posted: Mon Aug 14, 2023 4:56 pm Post subject: kernel version |
|
|
I want to know exactly the kernel version I use. Using the command ~$ uname -r I have the following result:
Code: | 6.1.31-gentoo-x86_64 |
However, the output of ~$ eselect kernel list is different:
Quote: | Available kernel symlink targets:
[1] linux-6.4.10-gentoo *
[2] linux-6.4.10-gentoo-dist |
My question is: which one, 6.1.31 or 6.4.10 is the kernel version I use? Another question: Can I remove linux-6.4.10-gentoo-dist, since I select linux-6.4.10-gentoo? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
logrusx Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/176594205966916859b5145.jpg)
Joined: 22 Feb 2018 Posts: 2702
|
Posted: Mon Aug 14, 2023 5:04 pm Post subject: |
|
|
The kernel that you booted is 6.1.31-gentoo-x86_64.
The kernel sources that /usr/src/linux points to is linux-6.4.10-gentoo
What's the difference?
Sometimes packages need to be compiled against kernel sources and they look for it in /usr/src/linux. For example nvidia-drivers will look there and read the config as well. If you want to compile it against a different kernel you need to specify KERNEL_DIR at the emerge command line to explicitly instruc the ebuild for which kernel sources you want the driver to be compiled.
Best Regards,
Georgi |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
sumati Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 10 Nov 2019 Posts: 184
|
Posted: Mon Aug 14, 2023 5:19 pm Post subject: |
|
|
Quote: | New postPosted: Mon Aug 14, 2023 5:04 pm Post subject: Report this post Reply with quote
The kernel that you booted is 6.1.31-gentoo-x86_64.
The kernel sources that /usr/src/linux points to is linux-6.4.10-gentoo
What's the difference?
Sometimes packages need to be compiled against kernel sources and they look for it in /usr/src/linux. For example nvidia-drivers will look there and read the config as well. If you want to compile it against a different kernel you need to specify KERNEL_DIR at the emerge command line to explicitly instruc the ebuild for which kernel sources you want the driver to be compiled.
Best Regards,
Georgi |
Many thanks for the clear explantion! I will try to upgrade to the Kernel 6.4.10 in following Gentoo wiki. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
rfx Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 19 Apr 2023 Posts: 149 Location: de-by
|
Posted: Mon Aug 14, 2023 5:55 pm Post subject: |
|
|
first you should Code: | emerge --sync && emerge -avuND world | to get the latest 6.1.41
It is not a big deal if you allready have a running kernel configuration from 6.1.31
Code: | 1) eselect kernel list && eselect kernel set X |
Take as X the newest version, should be 6.1.41
Code: | 2) cp /usr/src/linux-6.1.31-gentoo/.config /usr/src/linux-6.1.41-gentoo/.config |
This uses your running Kernelconfig from 6.1.31 with all your settings you have made.
Code: | 3) cd /usr/src/linux && make menuconfig |
Check your stuff that your cp from 2) has worked and maybe you want to change some stuff
Code: | make && make modules_install && make install |
When using initramfs you need additional step:
Code: | dracut --kver=6.1.41-gentoo |
now check your /boot/, you should have new config, initramfs, System.map & vmlinuz. When this has worked, you can tell grub to find the new stuff
Code: | grub-mkconfig -o /boot/grub/grub.cfg |
This was all the magic. when your .config was right your system should work after reboot. if yes, you can cleanup old stuff:
delete old files from /boot/ .
and then also remove old kernel files from /usr/src/ & /lib/modules |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
sumati Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 10 Nov 2019 Posts: 184
|
Posted: Tue Aug 15, 2023 7:50 am Post subject: |
|
|
thanks to rfx for the detailed instruction. After reading Gentoo Wiki pages I prefer now to the Distribution Kernel, it save me the time of source-compiling. Is there any simple and effective method to update the system to the linux-6.4.10-gentoo-dist which I have already installed? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|