Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing gentoo-kernel-bin
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
f1tz
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2020
Posts: 88

PostPosted: Wed Mar 10, 2021 8:42 pm    Post subject: Installing gentoo-kernel-bin Reply with quote

Good evening,

I emerged gentoo-kernel-bin to try it out but somehow didnt it make it further.
How do I get it from being downloaded to /boot?

make install inside the kernel folder after sudo eselect kernel set * didnt work :(
After updates I usually set "ln -sf ..." to the new kernel, is this necessary here too?
Didnt feel safe with the wiki pages around.

Thanks!
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3939
Location: Rasi, Finland

PostPosted: Wed Mar 10, 2021 9:50 pm    Post subject: Reply with quote

gentoo-kernel-bin is the most basic pre-made kernel for your system you can install. You cannot configure it since it will be downloaded as a precompiled binary.

It most likely uses "installkernel" is post-install phase to finish the installation.
I think you need to manually remove the kernel (and possibly initramfs) from /boot. Just make sure you have at least one working kernel (and possibly initramfs) there to avoid unbootable system.
Just remember to uninstall gentoo-kernel-bin using emerge too to avoid it being updated and then again being installed to your /boot.

Finally you can run eselect and set your current kernel. If there's none, you need to emerge some other in place.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
claudecat
n00b
n00b


Joined: 26 Mar 2012
Posts: 28
Location: Md, Usa

PostPosted: Thu Mar 11, 2021 7:48 am    Post subject: Re: Installing gentoo-kernel-bin Reply with quote

f1tz wrote:
Good evening,

I emerged gentoo-kernel-bin to try it out but somehow didnt it make it further.
How do I get it from being downloaded to /boot?

make install inside the kernel folder after sudo eselect kernel set * didnt work :(
After updates I usually set "ln -sf ..." to the new kernel, is this necessary here too?
Didnt feel safe with the wiki pages around.

Thanks!


I recently switched to gentoo-kernel-bin after years of using a customized genkernel setup, and was a bit confused by how it would work out too... As it turns out, it all went very very smoothly, once I'd eselect-ed the correct kernel (NOT the already installed gentoo-sources one that genkernel had built from my .config). Even the emerge @module-rebuild part (necessary for my nvidia card) went fine, something I was unsure of.

It (the process of emerging gentoo-kernel-bin) warns you right away that you need installkernel to have it install itself in /boot. Easy peasy... I was able to get rid of gentoo-sources (and genkernel) completely, saving considerable drive space.

I never was able to figure out a way of getting genkernel to not build all the modules despite my config explicitly not having anything module-ized (still open to learning a way to do that...). The only thing I need a module for is the nvidia driver.

Now that I know gentoo-kernel-bin works so seamlessly I'll happily avoid the hour of compile time that genkernel used to take building modules I presumably didn't need. I haven't noticed any differences in speed/responsiveness/memory use either.
_________________
Don't crush that dwarf, hand me the pliers...
Back to top
View user's profile Send private message
Whissi
Retired Dev
Retired Dev


Joined: 12 Jan 2011
Posts: 222

PostPosted: Mon Mar 15, 2021 2:41 am    Post subject: Re: Installing gentoo-kernel-bin Reply with quote

claudecat wrote:
I never was able to figure out a way of getting genkernel to not build all the modules despite my config explicitly not having anything module-ized (still open to learning a way to do that...). The only thing I need a module for is the nvidia driver.
That doesn't sound like it genkernel used your customized kernel.config. Make sure you pass correct kernel config via "--kernel-config" parameter and pay attention to genkernel output which is telling you which kernel.config genkernel will use.
_________________
Regards,
Whissi
Back to top
View user's profile Send private message
claudecat
n00b
n00b


Joined: 26 Mar 2012
Posts: 28
Location: Md, Usa

PostPosted: Wed Mar 17, 2021 11:53 pm    Post subject: Re: Installing gentoo-kernel-bin Reply with quote

Whissi wrote:
That doesn't sound like it genkernel used your customized kernel.config. Make sure you pass correct kernel config via "--kernel-config" parameter and pay attention to genkernel output which is telling you which kernel.config genkernel will use.


I'm pretty sure I paid close enough attention to output to have noticed if it was using another config, but maybe not...

All I can say with certainty is that I had genkernel set to do menuconfig every time, and from there I loaded, then saved before exiting, my own non-modular config. Seems odd that genkernel would then ignore that, no?
_________________
Don't crush that dwarf, hand me the pliers...
Back to top
View user's profile Send private message
Whissi
Retired Dev
Retired Dev


Joined: 12 Jan 2011
Posts: 222

PostPosted: Thu Mar 18, 2021 1:08 am    Post subject: Reply with quote

Well, when you invoked genkernel with --menuconfig and saved the manually loaded kernel.config to used $KERNEL_OUTPUTDIR you should be safe, yes.
_________________
Regards,
Whissi
Back to top
View user's profile Send private message
claudecat
n00b
n00b


Joined: 26 Mar 2012
Posts: 28
Location: Md, Usa

PostPosted: Thu Mar 18, 2021 2:52 am    Post subject: Reply with quote

Whissi wrote:
Well, when you invoked genkernel with --menuconfig and saved the manually loaded kernel.config to used $KERNEL_OUTPUTDIR you should be safe, yes.


One would think... Not sure if I stumbled across a strange corner-case scenario bug or not. Maybe I'm the only one to ever use genkernel in this way?

In any case, I'm happier now with gentoo-kernel-bin anyway (though it too has idiosyncrasies, i.e. emerge @module-rebuild causes it to rebuild/reinstall the whole kernel as well as the Nvidia module). Saves wear and tear on my aging Nehalem system.
_________________
Don't crush that dwarf, hand me the pliers...
Back to top
View user's profile Send private message
Whissi
Retired Dev
Retired Dev


Joined: 12 Jan 2011
Posts: 222

PostPosted: Fri Mar 19, 2021 2:52 am    Post subject: Reply with quote

FYI, I added https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=588d9254f66d090e593033da2aa9a257d6e3bfce

In short: genkernel will now display a warning when --menuconfig was invoked but used kernel.config wasn't modified when dialog was closed.

It's important to understand that when you use the load mechanism from kernel configuration dialog, kernel configuration will switch from currently loaded kernel.config (=the file genkernel is using) to the now loaded file. If you will now exit kernel configuration dialog and save without changing file back to $KERNEL_OUTPUTDIR/.config, you changed nothing (or just the loaded kernel.config which won't be used).
_________________
Regards,
Whissi
Back to top
View user's profile Send private message
claudecat
n00b
n00b


Joined: 26 Mar 2012
Posts: 28
Location: Md, Usa

PostPosted: Fri Mar 19, 2021 4:04 am    Post subject: Reply with quote

Whissi wrote:
It's important to understand that when you use the load mechanism from kernel configuration dialog, kernel configuration will switch from currently loaded kernel.config (=the file genkernel is using) to the now loaded file. If you will now exit kernel configuration dialog and save without changing file back to $KERNEL_OUTPUTDIR/.config, you changed nothing (or just the loaded kernel.config which won't be used).


Hmm... Alright, so when I loaded my own config into the menuconfig UI, then exited telling it to save, genkernel's default behavior is/was/will be to revert to $KERNEL_OUTPUTDIR/.config?

That seems intensely counterintuitive, not to mention undocumented (until now). Perhaps the wiki could be made aware of this as well, as there is no mention of KERNEL_OUTPUTDIR per se. I mean, if one invokes menuconfig, the expectation would naturally be for whatever gets set therein to stick without having to do more than "save" before exiting!

Thanks for the clarification though. I suspected that this was what was happening after rereading your posts.
_________________
Don't crush that dwarf, hand me the pliers...
Back to top
View user's profile Send private message
Whissi
Retired Dev
Retired Dev


Joined: 12 Jan 2011
Posts: 222

PostPosted: Fri Mar 19, 2021 1:01 pm    Post subject: Reply with quote

claudecat wrote:
Hmm... Alright, so when I loaded my own config into the menuconfig UI, then exited telling it to save, genkernel's default behavior is/was/will be to revert to $KERNEL_OUTPUTDIR/.config?

That seems intensely counterintuitive, not to mention undocumented (until now). Perhaps the wiki could be made aware of this as well, as there is no mention of KERNEL_OUTPUTDIR per se. I mean, if one invokes menuconfig, the expectation would naturally be for whatever gets set therein to stick without having to do more than "save" before exiting!
Well, this has actually not much to do with genkernel:

All we (genkernel) do is calling "make menuconfig" in CWD which is $KERNEL_OUTPUTDIR (usually identical with $KERNEL_DIR aka /usr/src/linux but don't have to!). This is like calling your favorite editor (`$EDITOR .config`). The editor will now load .config from CWD. But now you click File -> Open and will open a different file. Your $EDITOR will switch to the file you just told $EDITOR to load and will not just load the content into the already opened on. That's the normal behavior of any program. So when you now make any modification and exit $EDITOR you will get prompted to save changes, i.e. $EDITOR is asking you to save current active file (which is the last file you opened, the file you loaded manually and not the file you opened first when invoking your editor).

Just make sure that you are 'loading' the kernel.config you want to use by passing --kernel-config parameter to genkernel and you will avoid any confusion (of course, additional confusion can be created when specifying --no-clean and -no-mrproper but that's a different story; just pay attention to output).

And please prefer man page > Wiki. 8) $KERNEL_OUTPUTDIR is more or less an internal variable. You will only get in touch with it when doing advanced stuff like building an out-of-tree kernel (it's advanced stuff because it isn't compatible with emerge which expects that $KERNEL_DIR is identical with $KERNEL_OUTPUTDIR).
_________________
Regards,
Whissi
Back to top
View user's profile Send private message
claudecat
n00b
n00b


Joined: 26 Mar 2012
Posts: 28
Location: Md, Usa

PostPosted: Fri Mar 19, 2021 6:03 pm    Post subject: Reply with quote

Whissi wrote:
Well, this has actually not much to do with genkernel:

All we (genkernel) do is calling "make menuconfig" in CWD which is $KERNEL_OUTPUTDIR (usually identical with $KERNEL_DIR aka /usr/src/linux but don't have to!). This is like calling your favorite editor (`$EDITOR .config`). The editor will now load .config from CWD. But now you click File -> Open and will open a different file. Your $EDITOR will switch to the file you just told $EDITOR to load and will not just load the content into the already opened on. That's the normal behavior of any program. So when you now make any modification and exit $EDITOR you will get prompted to save changes, i.e. $EDITOR is asking you to save current active file (which is the last file you opened, the file you loaded manually and not the file you opened first when invoking your editor).

Just make sure that you are 'loading' the kernel.config you want to use by passing --kernel-config parameter to genkernel and you will avoid any confusion (of course, additional confusion can be created when specifying --no-clean and -no-mrproper but that's a different story; just pay attention to output).

And please prefer man page > Wiki. 8) $KERNEL_OUTPUTDIR is more or less an internal variable. You will only get in touch with it when doing advanced stuff like building an out-of-tree kernel (it's advanced stuff because it isn't compatible with emerge which expects that $KERNEL_DIR is identical with $KERNEL_OUTPUTDIR).


Hey, thanks so much for the clarity! I'm not as savvy as I would assume most Gentoo users are, and you explained a (for me) complex concept very clearly. Clearly enough that even I now understand exactly what to do should I decide to return to using genkernel, which I may just do out of newfound curiosity. I'm sure the build process will be much much shorter than it's been!
_________________
Don't crush that dwarf, hand me the pliers...
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