View previous topic :: View next topic |
Author |
Message |
G3nt00 Guru
Joined: 09 Apr 2023 Posts: 337
|
Posted: Thu May 11, 2023 5:10 am Post subject: [Solved] New version of gentoo-sources - what do I do? |
|
|
Hi,
Well, of course I want to compile and install the new kernel, but the question is more, this is not automatically done, but a manual activity, right?
I was using Genkernel when installing so I should just follow the same procedure I did then, with compiling and then updating grub?
Thanks
Last edited by G3nt00 on Fri May 12, 2023 7:06 pm; edited 3 times in total |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30909 Location: here
|
Posted: Thu May 11, 2023 5:13 am Post subject: Re: New version of gentoo-sources - what do I do? |
|
|
G3nt00 wrote: | I was using Genkernel when installing so I should just follow the same procedure I did then, with compiling and then updating grub? |
Yes but you can also use a dist-kernel.
Quote: | Distribution Kernels are ebuilds that cover the complete process of unpacking, configuring, compiling, and installing the kernel. The primary advantage of this method is that the kernels are updated to new versions by the package manager as part of @world upgrade. This requires no more involvement than running an emerge command. Distribution kernels default to a configuration supporting the majority of hardware, however two mechanisms are offered for customization: savedconfig and config snippets. See the project page for more details on configuration. |
_________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
G3nt00 Guru
Joined: 09 Apr 2023 Posts: 337
|
Posted: Thu May 11, 2023 6:27 am Post subject: Re: New version of gentoo-sources - what do I do? |
|
|
fedeliallalinea wrote: | G3nt00 wrote: | I was using Genkernel when installing so I should just follow the same procedure I did then, with compiling and then updating grub? |
Yes but you can also use a dist-kernel.
Quote: | Distribution Kernels are ebuilds that cover the complete process of unpacking, configuring, compiling, and installing the kernel. The primary advantage of this method is that the kernels are updated to new versions by the package manager as part of @world upgrade. This requires no more involvement than running an emerge command. Distribution kernels default to a configuration supporting the majority of hardware, however two mechanisms are offered for customization: savedconfig and config snippets. See the project page for more details on configuration. |
|
Yes tbh I haven't checked out the dist-kernel option thoroughly. I thought I was going towards manual compilation, but as you mention 'savedconfig' & 'config snippets', this may perhaps change my mind on that. I don't have all that nifty stuff that really requires me to compile my own kernel. If not for fun or optimization purposes that is... Anyways, thanks for confirming and spark interest in dist-kernels! |
|
Back to top |
|
|
G3nt00 Guru
Joined: 09 Apr 2023 Posts: 337
|
Posted: Fri May 12, 2023 3:34 am Post subject: |
|
|
What...
I just tried to start the same genkernel compile as when I initially installed. This is in total my second (kernel) compile on this system. I got this message;
Code: | # genkernel --lvm --luks --mrproper --mountboot --install all
* Gentoo Linux Genkernel; Version 4.3.2
* Using genkernel configuration from '/etc/genkernel.conf' ...
* Running with options: --lvm --luks --mrproper --mountboot --install all
* ERROR: Kernel Makefile (/usr/src/linux/Makefile) missing. Maybe re-install the kernel sources.
* Please consult '/var/log/genkernel.log' for more information and any
* errors that were reported above.
*
* Report any genkernel bugs to bugs.gentoo.org and
* assign your bug to genkernel@gentoo.org. Please include
* as much information as you can in your bug report; attaching
* '/var/log/genkernel.log' so that your issue can be dealt with effectively.
*
* Please do *not* report kernel compilation failures as genkernel bugs!
* |
I have no clue, new kernel sources was installed the other day, so thought it would just be a matter of issuing a compile & install, but no?
I understand what it says, that the makefile is missing, what I don't is why. Kernel sources IS installed, and was merely upgraded...
Code: | # equery l gentoo-sources
* Searching for gentoo-sources ...
[IP-] [ ] sys-kernel/gentoo-sources-6.1.27-r1:6.1.27-r1 |
Edit: I have a vague memory of the old sources being uninstalled when running 'emerge --depclean' after @world, and with that, apparently my config too(?) Shouldn't configs etc be moved to the new kernel sources when upgraded? Is this "normal" to have copies of these elsewhere? Or should this have worked? |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30909 Location: here
|
|
Back to top |
|
|
vladimir1986 n00b
Joined: 09 Dec 2010 Posts: 74
|
Posted: Fri May 12, 2023 10:15 am Post subject: |
|
|
I remember when installed Gentoo, I keep getting kernel panics, even if I used to do manual kernels constantly. Eventually I also settled for Genkernel and just started removing unneded modules and tweaking the kernel after my first install.
This is the process I follow when upgrading kernels:
-Check which is the latest kernel available on my system "eselect kernel list"
-Setting it up to update the link to /usr/stc/linux "eselect kernel set 2" (change 2 with the list number of the desired kernel)
-copy the old config file to the new kernel: "cd /usr/src/linux && cp /boot/config-<version>-gentoo-x86_64 ./"
-update the old config version to the new one and check for new functionality. Tip: If you want to know what something does, you can type "?" and get a description: "make oldconifg"
-now if you want to tweak the kernel, it is a good time. Trust me, compiling a huge kernel with unneded drivers is a pain in the a$$: "make menuconfig"
-now compile. Remember that make can use the -j<n> switch to compile faster. n being the number of threads you want to dedicate to compile: "make"
-install kernel and modules: "make install && make modules_install"
-if you got an initramfs image: "dracut --kver <new kernel version>"
-now I like to reboot, and manually set the grub option to boot into the new kernel, just to make sure it works (the old kernel is still there chilling). You do it by pressing "e" in the grub menu. If everything works, you can remove the old kernel
rm /boot/*<old kernel number>*
rm -r /usr/src/linux-<old version>
rm -r /lib/modules/<old version>
And then update grub (if you have done before, you are supposed to have option to boot from both kernels)
grub-mkconfig -o /boot/grub/grub.cfg |
|
Back to top |
|
|
G3nt00 Guru
Joined: 09 Apr 2023 Posts: 337
|
Posted: Fri May 12, 2023 3:25 pm Post subject: |
|
|
vladimir1986 wrote: | I remember when installed Gentoo, I keep getting kernel panics, even if I used to do manual kernels constantly. Eventually I also settled for Genkernel and just started removing unneded modules and tweaking the kernel after my first install.
This is the process I follow when upgrading kernels:
-Check which is the latest kernel available on my system "eselect kernel list"
-Setting it up to update the link to /usr/stc/linux "eselect kernel set 2" (change 2 with the list number of the desired kernel)
-copy the old config file to the new kernel: "cd /usr/src/linux && cp /boot/config-<version>-gentoo-x86_64 ./"
-update the old config version to the new one and check for new functionality. Tip: If you want to know what something does, you can type "?" and get a description: "make oldconifg"
-now if you want to tweak the kernel, it is a good time. Trust me, compiling a huge kernel with unneded drivers is a pain in the a$$: "make menuconfig"
-now compile. Remember that make can use the -j<n> switch to compile faster. n being the number of threads you want to dedicate to compile: "make"
-install kernel and modules: "make install && make modules_install"
-if you got an initramfs image: "dracut --kver <new kernel version>"
-now I like to reboot, and manually set the grub option to boot into the new kernel, just to make sure it works (the old kernel is still there chilling). You do it by pressing "e" in the grub menu. If everything works, you can remove the old kernel
rm /boot/*<old kernel number>*
rm -r /usr/src/linux-<old version>
rm -r /lib/modules/<old version>
And then update grub (if you have done before, you are supposed to have option to boot from both kernels)
grub-mkconfig -o /boot/grub/grub.cfg |
Thank you! This is a good list of steps to remember it all! I will keep this I usually want to keep the old kernel, one never knows a few weeks down the line if everything really is what it should, but usually is... |
|
Back to top |
|
|
|
|
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
|
|