Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

Signing Keys, Secure Boot Question

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
2 posts • Page 1 of 1
Author
Message
juliedeville
n00b
n00b
Posts: 58
Joined: Mon Oct 14, 2024 8:40 pm

Signing Keys, Secure Boot Question

  • Quote

Post by juliedeville » Wed Jan 28, 2026 8:08 pm

Hello,

I have a question about how module signature keys are supposed to work in gentoo. On my laptop, in make.conf, I have my module signing keys set to my secure boot key, while for my kernel, I use the default signing key in /var/tmp/portage/<sources>, and it compiles, signs, and boots without issue.

I just installed gentoo on another computer I have, and I had module signing keys set to sbctl keys in make.conf, and while I was using a distribution kernel, it booted without issue. Yesterday, I configured a custom kernel, and it compiles fine, but I am unable to load the zfs module when it boots into the initramfs because the key isn't trusted by the kernel.

I tried setting the default module_sig key in the kernel to my sbctl keys, however, it gives errors when compiling and installing modules.

My question is how do I properly configure the keys in the kernel and make.conf for secure boot to work, and for my zfs module to work so I can decrypt my system.
Top
Nowa
Developer
Developer
User avatar
Posts: 522
Joined: Wed Jun 25, 2014 7:07 am
Location: Hilversum

Re: Signing Keys, Secure Boot Question

  • Quote

Post by Nowa » Tue Feb 03, 2026 7:23 pm

juliedeville wrote: My question is how do I properly configure the keys in the kernel and make.conf for secure boot to work, and for my zfs module to work so I can decrypt my system.
To sign modules enable the "modules-sign" USE flag and set MODULES_SIGN_KEY and MODULES_SIGN_CERT to your sbctl key (or a different key) in your make.conf. Then rebuild zfs.

Module signing is something separate from secureboot, though in Gentoo if you build your own sys-kernel/gentoo-kernel with USE=secureboot enabled this will also automatically enable "lockdown" mode which enforces that kernel modules are signed. You may override this via /etc/kernel/config.d. If you do not specify a MODULES_SIGN_KEY or MODULES_SIGN_CERT then the kernel build system will generate a key for you, the zfs package should pick this up automatically when you rebuild it and sign with that key. However the key will be re-generated every time you build the kernel so I recommend specifying the module signing key explicitly in make.conf to ensure consistency. This does not apply to sys-kernel/gentoo-kernel-bin.
OS: Gentoo 6.19.3-gentoo-dist, ~amd64, 23.0/desktop/plasma/systemd
MB: MSI Z370-A PRO
CPU: Intel Core i9-9900KS
GPU: Intel Arc A770 16GB & Intel UHD Graphics 630
SSD: Samsung 970 EVO Plus 2 TB
RAM: Crucial Ballistix 32GB DDR4-2400
Top
Post Reply

2 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic