Handbook Talk:AMD64/Installation/Kernel

From Gentoo Wiki
Jump to:navigation Jump to:search
Note
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]] 11:29, 4 September 2026 (UTC)
:: Your reply ~~~~
Note
Some closed discussions have been moved to an archive subpage: Handbook Talk:AMD64/Installation/Kernel/Archive.


CONFIG_EFI_VARS removed in 6.0 kernels

Talk status
This discussion is done as of 2024年09月21日.

EFI_VARS was removed in 6.0 and its replacement is EFIVAR_FS. All versions of the kernel in tree are new enough to have the option so changing all mentions to EFIVAR_FS would work better than having a "6.0 and later" bit.

Parona (talk) 01:13, 7 October 2023 (UTC)

I am trying to install Gentoo following the handbook and stumbled a bit on this since the kernel config option that was listed did not exist in my kernel. More specifically, I couldn't find this option:
KERNEL Enable support for UEFI
Device Drivers
 Firmware Drivers --->
 EFI (Extensible Firmware Interface) Support --->
 <*> EFI Variable Support via sysfs
Am I understanding Alfred Wingate (Parona) correctly that this option should be changed to this?
KERNEL Enable support for UEFI
File Systems
 Pseudo filesystems --->
 <*> EFI variable filesystem
Thanks! --Goatshriek (talk) 00:02, 22 November 2023 (UTC)
I believe this is fixed in Special:Diff/1284042/1298174, would you mind confirming? Thanks!
--csfore (talk) 20:01, 11 May 2024 (UTC)
My apologies for the delay in response; this looks great to me, thanks!
Goatshriek (talk) 00:46, 19 July 2024 (UTC)
No problem! Thanks for confirming!
--csfore (talk) 20:08, 21 September 2024 (UTC)

Mention sys-firmware/sof-firmware

Talk status
This discussion is done as of 2024年01月07日.

I think it could fit on "Optional: Installing firmware and/or microcode" section. Most recent intel systems will rely on sof-firmware to have sound working properly (if not, most of those users will get a semi-working setup, like microphone not working and similar). There is a bit more information here: https://fedoraproject.org/wiki/Changes/SofDefaultForIntelLpe

It could maybe be mentioned after the notes for CPU microcodes, maybe noting that people compiling the kernel from scratch (as I do) will need to review the options under CONFIG_SND_SOC_SOF_TOPLEVEL (for distribution kernels it shouldn't be needed as they are based on Fedora kernels, that already enabled the needed parts some years ago).

Thanks --Pacho (talk) 09:52, 19 October 2023 (UTC)

Added in Special:Diff/1273053 and Special:Diff/1273054
Thanks! --Xarvatium (talk) 18:58, 7 January 2024 (UTC)

sys-firmware/sof-firmware might be required for 11gen Intel

Talk status
This discussion is done as of 2024年02月04日.

Just did a new install and had a bit of a head scratch because my "11th Gen Intel(R) Core(TM) i5-1135G7" actually did need sys-firmware/sof-firmware for sound to work. My eyes did cross this section, but I chose not to emerge sys-firmware/sof-firmware at that point because it said 12gen+. It's perhaps worth updating on the page, or including a note explaining this may be worth coming back to if after install sound isn't working, even if the CPU isn't 12gen+.

Thanks! --Archie (talk) 21:57, 29 January 2024 (UTC)

Should be fixed in Special:Diff/1276409/1277100, thanks!. Lowered it down to 10 because they reference Ice Lake as well. Will likely have to add Apollo Lake as well since people have issues on that one as well. Not too sure about what to do for Cannon Lake though since it seems only one CPU was ever made for that.
Thanks! --Xarvatium (talk) 05:11, 4 February 2024 (UTC)

alternative to genkernel / help with manual configuration

I suggest making a mention of

Template:Cmd:make localyesconfig

or

Template:Cmd:make localmodconfig

Engrenage (talk) 09:05, 4 February 2024 (UTC)

initramfs needed for /usr on separate partition

following the recent news, IMHO this should clearly be mentioned in the manual

Engrenage (talk) 09:05, 4 February 2024 (UTC)

Typo in Kernel configuration and compilation #1 Tip

Talk status
This discussion is done as of 2024年09月11日.

" Always having a known working kernel to fallback on can speed up debugging and elevate anxiety " should be " can speed up debugging and alleviate anxiety " -tty13 (talk) 00:07, 11 September 2024 (UTC)

Thank you for pointing this out, it's been corrected. Zen desu (talk) 00:16, 11 September 2024 (UTC)

Recommended order for kernel management approaches based on administrator involvement

Talk status
This discussion is still ongoing as of 2024年09月17日.

To enhance clarity and logical flow, please rearrange the list to reflect the increasing level of involvement from the system administrator. Specifically, in Kernel configuration and compilation move the "Full Automation Approach: Distribution Kernels" to the top, followed by the "Hybrid Approach: Genkernel," and place the "Full Manual Approach" at the end. This order will better represent the progression from the least to the most involved methods for managing kernel.

John82 (talk) 12:48, 17 September 2024 (UTC)

Hi John82, I see your logic behind this and this was how it was for a time however, this goes against the way the Handbook is designed (explained in Handbook:AMD64/Installation/About#How_the_installation_is_structured where cycle through the options that we believe a user will take.
I'll put this into an example so you can see how a user would run though the steps, hence the ordering:
1. User first uses the dist-kernel to make sure there are no user caused errors.
2. User would use sys-boot/modprobed-db to help create a manual kernel.
2. User finds some niche usage case where genkernel is the best choice for them
I'll leave this topic open encase you have more views to share why this wrong but, please close if this answers you question.
Immolo (talk) 20:20, 21 September 2024 (UTC)
About this part, I think the current order is good. Furthermore, "genkernel" is deprecated as state later on that page.
So order should stay dist/manual/genkernel
Genkernel should be also marked as deprecated on that list. Like "Deprecated hybrid approach: Genkernel"
Sébastien P. (talk) 20:43, 3 August 2025 (UTC)
Good idea, we should add this while the work is underway to remove the need to even highlight the need for it in the Handbook.
Immolo (talk) 20:18, 4 August 2025 (UTC)

make commands in "Compiling and installing" don't generate a compressed kernel image.

Talk status
This discussion is done as of 2025年04月12日.

shouldn't the make command that's currently there (`make && make modules_install`) be replaced with `make all && make modules_install`? The command that's there currently doesn't build a compressed kernel image and gave me a huge headache trying to figure that out. Even just a mention of the `make bzimage` or using `make all` would be a huge improvement to this section.

Leah (talk) 08:55, 7 October 2024 (UTC)

If you run make help (while inside /usr/src/linux), at the bottom, you will get the text:
Execute "make" or "make all" to build all targets marked with [*]
The targets marked with '*' are "vmlinux", "modules", and "bzImage". Running make or make all should give the same result.
FlyingBullets (talk) 19:29, 14 December 2024 (UTC)
I believe I've addressed this with Special:Diff/1369453/1369473, informing users that the command is there for them to browse through, if they wish. Thanks!
--csfore (talk) 17:55, 12 April 2025 (UTC)

Update on commands

Talk status
This discussion is done as of 2025年04月12日.

For the commands using openssl, -nodes should be -noenc. The man page says that the old option is deprecated.

For the commands using sbsign, --out should be --output. The old option doesn't exist.

FlyingBullets (talk) 19:19, 14 December 2024 (UTC)

Fixed in Special:Diff/1352183/1369450 and Special:Diff/1352116/1369453, thanks! I think sbsign still recognizes --out since it did not error when I tried it, but it's still better to follow the arguments in the man page imo.
--csfore (talk) 17:48, 12 April 2025 (UTC)

wiki page layout

Talk status
This discussion is still ongoing as of 2025年03月12日.

All this page is a mess. User, I am, don't need this. All I need to know where and which kernel files should be located and short description for GRUB loader - because it is most popular. All other variants should be only outlined. Partition table should be prepared for both Legacy BIOS and EFI boot before ahead.

Main steps:

  • what files with which names should be at /boot
  • installing kernel variants
  • when initramfs required and generation variants
  • Grub configuration for Legacy BIOS
  • Grub and kernel configuration for EFI

Everything other should be available by links.

Maybe add description of "kexec -l vmlinuz --initrd initramfs" for testing kernel loading?

UEFI typical messages at screen should be described:

  • POST messages or motherboard Logo and GRUB menu?
  • "Loading Linux 6.12-gentoo ..."
  • "Loading initial ramdist ..."
  • "EFI stub: Loading initrd from LINUX_EFI_INITRD_MEDIA_GRUB device path"
  • Kernel loading messages? - when they should not appear?
  • OpenRC loading messages? - when they should not appear?
  • elogind should appear or /sbin/agetty?

--Trickygnome 00:43, 12 March 2025 (UTC)

I think everyone agrees the page still needs works, however I'm not 100% sure your solution would completely work yet and provide user choice.
Would you mind making a draft edit in your userspace on the wiki so we can take a look with an example please?
Immolo (talk) 00:57, 12 March 2025 (UTC)
I am a returning Gentoo user. I used it for my main driver for a decade and I am now trying to get back. This guide is totally unreadable compared to the Installation Handbook 10 years ago. I will be happy to make some changes after I actually understand all this new UEFI stuff and how it works. This page should only contain the basic installation and be much clearer on which are options and what is the default recommended way. --Hommis 20:43, 15 August 2025 (UTC)
Hi Hommis, I have also used recently this handbook (install a new Gentoo 18 years later, handbook was an old HTML page at that time). It changes a lot. Me too, I had to handle UEFI & other stuffs like I said in Talk:Rootfs_encryption#Various_improvement.
There is a lot of optional/deprecated/alternative. Except Unified Kernel Image and all signing stuff (because to be really useful you need an external card/USB stick/whatever you want to secure the key for SecureBoot). Gentoo is about choice and alternative should be on the handbook. But handbook should give enough information in order to help the user to understand if we need (or not) optional/alternative. I skip a lot of paragraph during my installation because I knew I did not need it.
That said, yes it must be difficult for a beginner to use the handbook. More difficult that 10/18 years ago!
Since I wrote in bellow, there may be something to do with Genkernel: remove it. It is deprecated. Gentoo should not guide user to Genkernel for a new installation.
Could you sign at the end like everyone :) Help:Signatures. Sébastien P. (talk) 15:21, 15 August 2025 (UTC)
Hello Hommis and Welcome back! Installation instructions always have the same problem: explaining as much as necessary and as little as possible. For some, it's not enough; they then have to read further articles in the wiki. For others, it's too much; for them, there is an ancient wiki article... outdated... but you will find a link there (in the warning) to a current article (revised by me and @immolo)... Why not use this one?
-> Quick_Installation_Checklist -> User:Pietinger/Draft/Quick_Installation_OpenRC_for_an_UEFI_System
pietinger 15:31, 15 August 2025 (UTC)

Step 3.2 "Installing the kernel sources" should be edited to "Alternative: Installing the kernel sources"

Talk status
This discussion is still ongoing as of 2025年05月31日.

Since step 3.2 "Installing the kernel sources" is an alternate step to step 3.1, just like step 3.3 "Alternative: Manual configuration" is, it should be edited to "Alternative: Installing the kernel sources" for unity and to make it clear that this isn't an additional step for users of the distribution kernel. Zesty (talk) 00:59, 31 May 2025 (UTC)

The command to create the key for kernel signing is only valid one month

Talk status
This discussion is still ongoing as of 2025年11月06日.

The line reads: openssl req -new -noenc -utf8 -sha256 -x509 -outform PEM -out kernel_key.pem -keyout kernel_key.pem

...it does not contain a -days option so it will take the default of 30 days for key/certificate validity - this should be mentioned and a recommendation given how long a key should last. Also the key strength is undefined. The German BSI recommends keys of at least 3k bits so adding -newkey rsa:4096 would not be a bad idea.

— The preceding unsigned comment was added by AZeroEight (talkcontribs)

I think some clearer instructions could be useful here, I'm not up to date on best practises any more though.
Would you might writing a short proposal using Handbook_Talk:Parts/Installation/Kernel#Hostonly_be_default as a rough guide to how they are normally done please? I'll try to get your changes reviewed and added to the new kernel article design before it goes live in return.
Please also remember to sign your comments with four ~ as it helps us keep track.
Immolo (talk) 14:26, 6 November 2025 (UTC)

UEFI boot layout with "default" installation

Talk status
This discussion is done as of 2025年12月12日.

There seems to be some missing explanation around installing the kernel for GRUB on UEFI systems. Handbook:AMD64/Installation/Base#UEFI_systems says to mount the ESP at /efi. But when using the suggested default GRUB installation with sys-kernel/installkernel grub , the kernel gets installed to /boot. Maybe this is also a deficiency with installkernel --- either way I think that for a user following the "default" path, this should just work. Can anyone confirm? Jkxyz (talk) 12:24, 12 December 2025 (UTC)

As a quick summary, the other boot loaders supported in the HB do install the kernel to /efi and GRUB uses /boot as it supports a lot more options.
We went with idea of trying to keep a simple set of steps that work with all options we have, that way users can just switch between boot loaders if they don't like the first one.
If you have any suggestions to improve how we explain without overloading the user then feel free to share.
Immolo (talk) 12:55, 12 December 2025 (UTC)
This is intended behaviour for GRUB. The idea is that only GRUB (so /efi/EFI/gentoo/grubx64.efi) is installed to the ESP and that it can then access the kernels from /boot by itself.
This of course assumes that the filesystem of the partition that /boot resides is supported by GRUB. At a quick glance I don't see the handbook making that caveat clear. Although for most people that won't matter as it supports the most relevant filesystems that someone may use for their roots, only unsupported cases I can think of are bcachefs and more advanced setups involving encryption.
--Alfred Wingate (talk) 13:04, 12 December 2025 (UTC)
Thanks both for the explanations. The behavior is different from systemd-boot that expects the kernel to reside on the ESP as well. Clearly I'm too systemd-brained to anticipate that GRUB would mount the root filesystem to find the kernel. Anyway, I'm satisfied that there's not an issue with the handbook. --Jkxyz (talk) 13:14, 12 December 2025 (UTC)
The Handbook has supplement articles for setups that require extra work which are open to be community maintained. See ZFS/rootfs for an example.

Manual kernel install with EFI system partition

Talk status
This discussion is still ongoing as of 2026年01月16日.

The earlier portions of the handbook have been updated to use the /efi directory for an ESP but when running make install it defaults to installing the kernel files in /boot. The resolution is to set the INSTALL_PATH and INSTALL_MOD_PATH before installing the kernel [1].

Unassailable (talk) 18:03, 16 January 2026 (UTC)

Could you please provide some information on how you set your system up please, by providing what stage, bootloader you use and what USEFLAGS are set for installkernel.
Immolo (talk) 18:20, 16 January 2026 (UTC)
I should have clarified that this is for manually installing a kernel, using make, no fancy install scripts. Using stage3 and GRUB with UEFI. I'm confused on the following, does the kernel and sysmap need to reside on the EFI partition?
For Context: Historically /boot was a separate disk partition which contained the kernel, sysmap, and the grub files. We used to have /boot/efi as the default for EFI. It sounds like the new standard is to have EFI on its own partition (/efi). But it is unclear if make should still install the kernel and sysmap to /boot or if it should put these on the ESP.
Unassailable (talk) 19:11, 16 January 2026 (UTC)
Thank you, so GRUB uses /boot for the kernel due to its ability to boot on more systems than just EFI. Systemd-boot on the other hand moves it to /EFI as it only supports one.
Mind taking a long at the talk point above this one and seeing if there is anything we can improve, or correct me if I have misunderstood you please.
Immolo (talk) 19:21, 16 January 2026 (UTC)

The warning in Secure Boot is incorrect

Talk status
This discussion is still ongoing as of 2026年04月21日.

The link seems to be Kernel when it should, in fact, be Signing the kernel image. I do not have Handbook editing privileges, so posting here. Johngalt (talk) 18:36, 21 April 2026 (UTC)