View previous topic :: View next topic |
Author |
Message |
setan Tux's lil' helper
Joined: 21 Feb 2024 Posts: 77
|
Posted: Sun Feb 25, 2024 10:07 am Post subject: switching from gentoo-kernel-bin to gentoo-kernel |
|
|
Hello,
during the installation process I have decided to go for the binary kernel to speed up my install.
Now that I have played around with my system I want to switch to the compiled kernel.
How do I do it?
I tried this:
Code: | # emerge -a sys-kernel/gentoo-kernel
These are the packages that would be merged, in order:
Calculating dependencies... done!
Dependency resolution took 2.47 s (backtrack: 0/20).
[ebuild N ] sys-kernel/gentoo-kernel-6.6.16 USE="initramfs modules-sign strip -debug (-generic-uki) -hardened -modules-compress -savedconfig -secureboot -test"
[blocks B ] sys-kernel/gentoo-kernel-bin:6.6.16 ("sys-kernel/gentoo-kernel-bin:6.6.16" is soft blocking sys-kernel/gentoo-kernel-6.6.16)
[blocks B ] sys-kernel/gentoo-kernel:6.6.16 ("sys-kernel/gentoo-kernel:6.6.16" is soft blocking sys-kernel/gentoo-kernel-bin-6.6.16)
* Error: The above package list contains packages which cannot be
* installed at the same time on the same system.
(sys-kernel/gentoo-kernel-bin-6.6.16:6.6.16/6.6.16::gentoo, installed) pulled in by
sys-kernel/gentoo-kernel-bin required by @selected
(sys-kernel/gentoo-kernel-6.6.16:6.6.16/6.6.16::gentoo, ebuild scheduled for merge) pulled in by
~sys-kernel/gentoo-kernel-6.6.16 required by (virtual/dist-kernel-6.6.16:0/6.6.16::gentoo, installed) USE="" ABI_X86="(64)"
sys-kernel/gentoo-kernel
|
and it makes sense -- only one can be there.
I have checked in the installl handbook and some other post but still do not know how to do it.
The kernel is very important and I don't want to break anything (for now).
How does one switch the kernels? |
|
Back to top |
|
|
freke l33t
Joined: 23 Jan 2003 Posts: 998 Location: Somewhere in Denmark
|
Posted: Sun Feb 25, 2024 10:27 am Post subject: |
|
|
Try Code: | emerge --deselect gentoo-kernel-bin | to remove it from @selected, then try to emerge gentoo-kernel.
(don't know if you actually have to depclean gentoo-kernel-bin first) |
|
Back to top |
|
|
eeckwrk99 Apprentice
Joined: 14 Mar 2021 Posts: 171 Location: Gentoo forums
|
Posted: Sun Feb 25, 2024 10:28 am Post subject: Re: switching from gentoo-kernel-bin to gentoo-kernel |
|
|
Uninstalling sys-kernel/gentoo-kernel-bin won't remove binary kernel(s) from your boot partition, you'll still be able to boot from them after uninstalling the package.
See Gentoo Wiki - Kernel/Removal#Removing_kernel_leftovers to actually remove old kernels files. eclean-kernel works fine for me but you can also do it manually.
Uninstall sys-kernel/gentoo-kernel-bin:
Code: | # emerge --deselect sys-kernel/gentoo-kernel-bin
# emerge --ask --depclean |
Then install sys-kernel/gentoo-kernel just like you did:
Code: | # emerge --ask sys-kernel/gentoo-kernel |
|
|
Back to top |
|
|
logrusx Veteran
Joined: 22 Feb 2018 Posts: 1642
|
Posted: Sun Feb 25, 2024 10:42 am Post subject: |
|
|
Unless you want to customize your kernel, it doesn't make much sense to produce locally exactly the same binary you would download with gentoo-kernel-bin.
Gentoo-kernel provides for customization through savedconfig and I used that for quite some time mostly because I myself was unable to bring the kernel to recognize my touchpad, but ultimately I settled on gentoo-sources when I resolved that issue.
If you want to customize your kernel, go directly for gentoo-sources and perhaps take the config from gentoo-kernel-bin as a starting point. This way you won't encounter package conflicts and you'll still be able to boot gentoo-kernel-bin. Don't forget to change or remove the local version(CONFIG_LOCALVERSION) if you decide to reuse the config from gentoo-kernel-bin.
Best Regards,
Georgi |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4396 Location: Bavaria
|
|
Back to top |
|
|
CaptainBlood Advocate
Joined: 24 Jan 2010 Posts: 3660
|
Posted: Sun Feb 25, 2024 11:48 am Post subject: |
|
|
logrusx wrote: | Unless you want to customize your kernel, it doesn't make much sense to produce locally exactly the same binary you would download with gentoo-kernel-bin. | Almost...
gentoo-sources[USE=experimental] + CONFIG_M{CPU_MODEL} with migrated .config file should at least lower binary size & ram usage.
Performance may also be positively impacted.
Thks 4 ur attention, interest & support. _________________ USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Last edited by CaptainBlood on Sun Feb 25, 2024 11:50 am; edited 1 time in total |
|
Back to top |
|
|
logrusx Veteran
Joined: 22 Feb 2018 Posts: 1642
|
Posted: Sun Feb 25, 2024 11:49 am Post subject: |
|
|
CaptainBlood wrote: | logrusx wrote: | Unless you want to customize your kernel, it doesn't make much sense to produce locally exactly the same binary you would download with gentoo-kernel-bin. | Almost...
gentoo-sources[USE=experimental] + CONFIG_M{CPU_MODEL}. should at least lower binary size & ram usage.
Performance may also be positively impacted.
Thks 4 ur attention, interest & support. |
I was referencing transition from gentoo-kernel-bin to gentoo-kernel.
Best Regards,
Georgi |
|
Back to top |
|
|
CaptainBlood Advocate
Joined: 24 Jan 2010 Posts: 3660
|
Posted: Sun Feb 25, 2024 11:54 am Post subject: |
|
|
Oops my bad.
You replied too fast while I figured out what you've just mentioned.
Thks 4 ur attention, interest & support. _________________ USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. " |
|
Back to top |
|
|
setan Tux's lil' helper
Joined: 21 Feb 2024 Posts: 77
|
Posted: Sun Feb 25, 2024 12:13 pm Post subject: |
|
|
Quote: | Unless you want to customize your kernel, it doesn't make much sense to produce locally exactly the same binary you would download with gentoo-kernel-bin. |
I do want to customize my kernel. The first step do doing that is to localy build one :p.
Also, if I build for x86_64_v4 won't it be faster than the one from binhost (v3 afaik)?
Quote: | Gentoo-kernel provides for customization through savedconfig [...]
If you want to customize your kernel, go directly for gentoo-sources [...] |
I have already switched from binary to localy compiled one (thanks eeckwrk99!).
I want to take small steps and customizing through savedconfig is simpler than building from gentoo-sources, right? |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 4396 Location: Bavaria
|
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3403 Location: Rasi, Finland
|
Posted: Sun Feb 25, 2024 12:37 pm Post subject: |
|
|
setan wrote: | Also, if I build for x86_64_v4 won't it be faster than the one from binhost (v3 afaik)? | Kernel tries to "keep out of the way" as much as possible. It provides a standard map of hardware for the (user-space) software. kernel really doesn't "run" any resource heavy code. There are exceptions, like heavy networking.
setan wrote: | Quote: | Gentoo-kernel provides for customization through savedconfig [...]
If you want to customize your kernel, go directly for gentoo-sources [...] |
| You can also use /etc/kernel/config.d/. _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
logrusx Veteran
Joined: 22 Feb 2018 Posts: 1642
|
Posted: Sun Feb 25, 2024 2:02 pm Post subject: |
|
|
setan wrote: | Quote: | Unless you want to customize your kernel, it doesn't make much sense to produce locally exactly the same binary you would download with gentoo-kernel-bin. |
I do want to customize my kernel. The first step do doing that is to localy build one :p.
|
That's not really a step because you're not doing anything, gentoo-kernel-bin is replicated locally, which is pointless without custom configuration. And the only thing it eases is initramfs creation, which in this case is a simple invokation of dracut. If I'm not mistaken, you don't even need to pass parameters to it if you've eselected the desired kernel sources.
As I said earlier, you can build on the configuration from gentoo-kernel-bin and still have the option to boot the distribution kernel.
The usual routine is to download/emerge the kernel sources, configure the kernel, build it, create the initramfs if necessary, install those at the appropriate places, reconfigure the bootloader and boot the new kernel.
See pietinger's replay for more information. Also don't hesitate to ask questions here of how to go about it. As you see there are plenty of people who will answer.
setan wrote: |
Also, if I build for x86_64_v4 won't it be faster than the one from binhost (v3 afaik)?
|
Not really. First, do you know what that is and does you CPU support v4? If you're operating under the presumption v4 is better than v3, then that's the wrong presumption. Second, there isn't much software that would take advantage of v4.
And last but not least, I don't think it's on the binhost. If there's a package on the v3 binhost, that must be gentoo-kernel-bin. Which is good, because that's almost the latest instruction set which is widely available.
Now I feel I need to make the distinction between those packages clear:
- gentoo-kernel-bin - a precompiled binary kernel which has the widest possible hardware support. No compilation necessary.
- gentoo-kerenel - if not modified through savedconfig or /etc/kernel/config.d as Zucca mentioned, that is absoulutely the same as above, it's only compiled locally. Customization is possible because it downloads source code, but it cleans it after the installation is done.
- gentoo-sources - those are the kernel sources which get merged into /usr/src and give the the freedom to do anything with them. Almost equivalent to downloading sources from kernel.org but with some Gentoo patches applied to them. You can use them to produce as many kernels with as different configuration as you want. You can even produce multiple kernels that can co-exist on the system by modifying the local version, so that the the next doesn't override the previous, modules included.
Best Regards,
Georgi |
|
Back to top |
|
|
setan Tux's lil' helper
Joined: 21 Feb 2024 Posts: 77
|
Posted: Wed Feb 28, 2024 9:28 pm Post subject: |
|
|
Quote: | do you know what that is and does you CPU support v4? |
It is an additional instruction set for the 64 bit implementation of x86 instruction set. Yes, my CPU supports it.
For now I will settle for the gentoo-kernel(bin?) as I need to figure out brightness problems.
Either way thanks. |
|
Back to top |
|
|
|