Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel downgrade to amd64 into an ~amd64 system
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
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1922
Location: Switzerland (Romandie)

PostPosted: Fri Jun 10, 2022 12:07 pm    Post subject: Kernel downgrade to amd64 into an ~amd64 system Reply with quote

Into an ~amd64 system, I want to use stable kernels. For that, I added the following into /etc/portage/package.accept_keywords:
Code:
sys-kernel/gentoo-sources -~amd64
sys-kernel/linux-headers -~amd64

and in /etc/portage/package.mask/sys-kernel/rt-sources:
Code:
>=sys-kernel/rt-sources-5.16


Making a system update, portage tell me:
Code:
# emerge --deep --newuse --update --with-bdeps=y -a @world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     UD ] sys-kernel/linux-headers-5.15-r3::gentoo [5.18-r1::gentoo] USE="-headers-only (-experimental-loong%)" 119,058 KiB
[ebuild  NS    ] sys-kernel/gentoo-sources-5.15.41:5.15.41::gentoo [5.17.0:5.17.0::gentoo, 5.18.2:5.18.2::gentoo] USE="-build -experimental -symlink" 1,788 KiB
[ebuild  NS    ] sys-kernel/rt-sources-5.15.29_p37:5.15.29_p37::gentoo [5.16.2_p19:5.16.2_p19::gentoo] USE="-build -deblob -symlink" 1,278 KiB
[ebuild  rR    ] sci-visualization/gnuplot-5.4.3::gentoo  USE="X cairo gd qt5 readline wxwidgets (-aqua) -bitmap -doc -examples -ggi -latex -libcaca -libcerf -lua -regis" LUA_SINGLE_TARGET="lua5-1 -lua5-3 -lua5-4" 0 KiB

Total: 4 packages (1 downgrade, 2 in new slots, 1 reinstall), Size of downloads: 122,124 KiB


Is it safe to do that like that, or is it some changes or additional steps that must be done?
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5372
Location: Bavaria

PostPosted: Fri Jun 10, 2022 12:27 pm    Post subject: Reply with quote

If you want "only" the newest Gentoo-stable kernel your solution is quite right. If you want the newest (stable by kernel developer) kernel of our current LTS then you have to edit /etc/portage/package.mask =>

Maybe you want read this: https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Selecting_a_convenient_kernel_version
Back to top
View user's profile Send private message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1922
Location: Switzerland (Romandie)

PostPosted: Fri Jun 10, 2022 1:22 pm    Post subject: Reply with quote

Thanks, I moved the settings for the gentoo-sources and linux-headers into package.mask in order to get the latest LTS.

Another concern I have, as I am downgrading the kernels, is the system consistency. I have the following notes:
Quote:
From Linus:
Kernels are backward compatible, which imply the linux-headers must be updated
before glibc (which is not backward compatible).
From glibc FAQ:
glibc run fine on kernels older than the linux headers. With kernels newer than
glibc, glibc can't use new kernel features.


From the glibc FAQ, it should be fine, but the installed glibc was compiled against a never version of the linux-headers than the one resulting of this downgrade. From linus, the glibc is not backward compatible. I find that a little bit confusing to me in that case.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5372
Location: Bavaria

PostPosted: Fri Jun 10, 2022 2:00 pm    Post subject: Reply with quote

Yes, there is even a recommendation to use always the newest linux-headers. Because when you compile glibc you already have all new kernel functions in glibc. If some applications try to use it AND you dont have the newest kernel for it, the application must be able to handle this ... but ... I am an old man, and I learned I should have the correspondent header-files. In reality there were only very rare situations where you had problems with a non-correspondent header for linux kernel.

So, yes you could use your sys-kernel/linux-headers-5.18 furthermore and dont let them downgrade.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23082

PostPosted: Fri Jun 10, 2022 3:08 pm    Post subject: Reply with quote

Downgrading linux-headers is meaningless unless you subsequently rebuild glibc. The headers affect how glibc is built, but not how it runs. In principle, new glibc should work on an older kernel, within some limits that are likely so generous as to be irrelevant for you.
Back to top
View user's profile Send private message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1922
Location: Switzerland (Romandie)

PostPosted: Fri Jun 10, 2022 3:28 pm    Post subject: Reply with quote

OK. Do you know, when compiling the gentoo-sources, if gentoo is using the headers from the kernel-headers package or from the kernel itself?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54815
Location: 56N 3W

PostPosted: Fri Jun 10, 2022 10:48 pm    Post subject: Reply with quote

Dominique_71,

Kernel builds use the headers in the kernel, as do out of tree kernel modules.

Userland uses the separate headers package.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1922
Location: Switzerland (Romandie)

PostPosted: Sat Jun 11, 2022 9:49 am    Post subject: Reply with quote

Thank you all,

I will downgrade the kernel-headers and test it with the gentoo-sources a few days. If everything is OK, I think so, I will test it with the rt-sources.
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 3007
Location: Edge of marsh USA

PostPosted: Sun Jun 12, 2022 2:58 am    Post subject: Reply with quote

You shouldn't need to downgrade the headers.

Added: I'm currently using linux-headers-5.15-r3 with gentoo-sources-5.10.117.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
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