Talk:Kernel/Upgrade
Before creating a discussion or leaving a comment, please read about using talk pages. To create a new discussion, click here. Comments on an existing discussion should be signed using
~~~~
:
A comment [[User:Larry|Larry]] 13:52, 13 May 2024 (UTC) : A reply [[User:Sally|Sally]] 12:07, 21 December 2024 (UTC) :: Your reply ~~~~
About 'make modules_prepare'
Someone who knows better, please clarify: When exactly should make modules_prepare be run? Lee (talk) 13:28, 14 February 2015 (UTC)
- I'm also a bit confused as to the importance of the make modules_prepare command. I see from /usr/src/linux/Makefile that the target results in calls to other targets but once getting into the rabbit hole, I also started finding myself a tad confused. — The preceding unsigned comment was added by Cajacaliente (talk • contribs) 13 May 2015
- "Me too": While I think I know when make modules_prepare should be run, I'm not sure when emerge @module-rebuild should be run relative to the building of the kernel. The article is unnecessarily confusing about this, since the order it presents the information is:
- configure the kernel (section 5)
- make modules_prepare "may be" necessary before building the kernel (6th section, 1st "Important" box)
- don't forget to reconfigure the bootloader and initramfs (6th section, 2nd "Important" box)
- follow the manual configuration article to build the kernel (6th section, only line of regular text)
- "If the kernel has not been built", make modules_prepare before installing external modules (8th section, 1st "root" command box)
- emerge @module-rebuild to rebuild kernel-module packages (8th section, 2nd "root" command box)
- It would help immensely if the concepts were introduced strictly in the order the commands should actually be run.
- I assume the proper order is:
- configure the kernel
- make modules_prepare if any kernel modules have already been installed via emerge (or whatever)
- build and install the kernel using make, make modules_install, and make install
- emerge @module-rebuild if step #2 was necessary
- configure the bootloader and initramfs
- (double-check everything, including what modules are autoloaded, and) reboot
- Can someone who knows for sure please clarify this? Also, I know step #4 won't actually "do anything" if the command is run when it is not necessary; is that also true of step #2? Finally, should Kernel/Configuration also mention make modules_prepare? - dcljr (talk) 08:36, 26 October 2017 (UTC)
- "Me too": While I think I know when make modules_prepare should be run, I'm not sure when emerge @module-rebuild should be run relative to the building of the kernel. The article is unnecessarily confusing about this, since the order it presents the information is:
This was often confusing to me as well. Although the information is present in the wiki, it's scattered across multiple articles - this one links to another, and one has to come back to this one to finish the upgrade process - which makes it confusing. I think it would be good to add the complete build order to this article. I have a cheat sheet like this that I always look up (instead of looking up this article):
- cp /usr/src/linux/.config ~/`uname -r`.config
- eselect kernel set X
- cd /usr/src/linux
- make oldconfig
- make modules_prepare
- make -j4
- emerge --ask @module-rebuild
- make modules_install
- make install
- grub-mkconfig -o /boot/grub/grub.cfg
Saturnalia0 (talk) 13:56, 18 June 2023 (UTC)
- Saturnalia0 , feel free to revise as necessary if something important is missing from the article. --Maffblaster (talk) 03:50, 20 June 2023 (UTC)
- Matthew Marchese (Maffblaster) FYI, I revised the section in the hopes of clearing up the build order. Any improvements or further revisions are welcome. Saturnalia0 (talk) 13:47, 28 November 2023 (UTC)
Add genkernel instructions
I originally used genkernel to install the kernel. The important part to me is updating the new config from the old kernel. I think there should be a section on updating to the new kernel using genkernel.--Moaxcp (talk) 18:09, 21 May 2015 (UTC)
- Good point. I'll add this to my list of thing to do. Also, don't forget to use a signature following your commend on discussion pages! :) --Maffblaster (talk) 17:59, 21 May 2015 (UTC)
- Have you read the Genkernel? Does it contain the information you are looking for? --Maffblaster (talk) 18:30, 21 May 2015 (UTC)
Automated installation currently broken
The file block under Automated builds currently does not work because the architecture that the Linux kernel is expecting (x86) is different from the portage set $ARCH (amd64).
I got around that by adding `export ARCH=x86` before any of the make commands to fix this, but I'm not sure if that's the best solution --Mjsir911 (talk) 22:16, 13 June 2018 (UTC)
- Using CURRENT_KV=$(uname -m)-$(uname -r) should give correct results. However, it seems to still work out fine because of the second if statement (falls back to the .config for the old kernel under /usr/src/. For example under ps I see /usr/bin/genkernel --kernel-config=//usr/src/linux-5.1.16-gentoo/.config all) Mackal (talk) 19:09, 8 July 2019 (UTC)
- Based on the information stated here from Mackal , as far as I can tell, this is no longer an issue. No need to discuss further. --Maffblaster (talk) 23:21, 19 January 2022 (UTC)
make silentoldconfig
Any objections to deleting the 'make silentoldconfig' section? Its going out of date. Also, to me it doesn't seem like a good way to do things because it asks so many questions whereas make olddefconfig sets them all and you can diff to check it. Garbanzo (talk) 08:21, 8 September 2019 (UTC)
- Yes, do not remove 'make silentoldconfig' as long as the kernel branch 4.x is available in portage. It is needed, and there are users using this LTS kernels in gentoo. Don't remove this section. If the kernel is gone, then it could be removed. Needle (talk) 12:07, 20 April 2020 (UTC)
- Based on what I can see from this discussion, it does not look like there is anything left to discuss here. Closing for now. --Maffblaster (talk) 23:23, 19 January 2022 (UTC)
Removed chapter "Update your bootloader"
I think this command must be on wiki-page about Linux kernel update for x86 systems:
root #
grub-mkconfig -o /boot/grub/grub.cfg
This chapter is short, command is simply and universal, and this step is mandatory for most Gentoo users, especially newbies. Even if you don't use Grub, you do not destroy anything with this command. Please don't remove it. --Vazhnov (talk) 06:20, 29 May 2020 (UTC)
- Especially for noobs it was misleadingly short. Most common pitfall according to forums topics is that people forget mounting /boot before installing the newly compiled kernel. You didn't even mention to install the newly compiled kernel. Would grub-mkconfig do that for you?
- Generally, I understand your idea. And in fact some other articles tell people »After changes on kernel configuration do not forget to rebuild the kernel.« and link to the instructions. That way it's in one place for all articles which could use it.--Charles17 (talk) 06:56, 29 May 2020 (UTC)
Article flagged as dirty
Charles17 marked the article as dirty. I would like to help resolving the issues. Could you point them out? Saturnalia0 (talk) 18:15, 4 November 2020 (UTC)
- Just follow the wiki guidelines.
--Charles17 (talk) 06:36, 5 November 2020 (UTC)
- Just follow the wiki guidelines.