Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kernel version
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
sumati
Apprentice
Apprentice


Joined: 10 Nov 2019
Posts: 184

PostPosted: Mon Aug 14, 2023 4:56 pm    Post subject: kernel version Reply with quote

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
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2702

PostPosted: Mon Aug 14, 2023 5:04 pm    Post subject: 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
Back to top
View user's profile Send private message
sumati
Apprentice
Apprentice


Joined: 10 Nov 2019
Posts: 184

PostPosted: Mon Aug 14, 2023 5:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
rfx
Tux's lil' helper
Tux's lil' helper


Joined: 19 Apr 2023
Posts: 149
Location: de-by

PostPosted: Mon Aug 14, 2023 5:55 pm    Post subject: Reply with quote

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/ .

Code:
emerge --depclean
and then also remove old kernel files from /usr/src/ & /lib/modules
Back to top
View user's profile Send private message
sumati
Apprentice
Apprentice


Joined: 10 Nov 2019
Posts: 184

PostPosted: Tue Aug 15, 2023 7:50 am    Post subject: Reply with quote

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
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