Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

Question concerning using hooks in /etc/kernel/*.d/

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
WizNut
n00b
n00b
Posts: 37
Joined: Wed Nov 09, 2005 6:09 am
Location: Earth

Question concerning using hooks in /etc/kernel/*.d/

  • Quote

Post by WizNut » Sat Mar 28, 2026 3:24 am

Hello.

In the Wiki page on the Distribution Kernel, in the section on Installation, it says:
It is possible to use a hook in /etc/kernel/*.d/ to automatically update other bootloaders or run arbitrary commands at the point of kernel installation. See the AMD64 Handbook for more details.
, which links to the Gentoo AMD64 Handbook, in the chapter on Configuring the kernel, in the section on Kernel selection, where it says:
It is possible provide a custom kernel configuration file if customization is necessary.
, which links to the project page for the Distribution Kernel.

Furthermore, in the section on Distribution kernels, it says:
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.
,which (again) links to the project page for the Distribution Kernel.

Looking at the project page for the Distribution Kernel, it says:
User documentation — a (semi-)automatic way of configuring, building and installing kernels with the package manager
, which links to the Wiki page for the Distribution Kernel, which contains the quote at the top of this post.

Nowhere, in any of these three pages does it tell how to do what is mentioned in this quote, and the best that I can tell (from examining the histories of all three pages), none of them have ever contained this information.

I believe this is what is referred to as “circular references”.

Could someone please tell me how using hooks in /etc/kernel/*.d/ works (and, please, fix the appropriate wiki article(s)).
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2110
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Sun Mar 29, 2026 1:24 am

/etc/kernel/config.d is used by sys-kernel/gentoo-kernel and is described in this part of the article about the distribution kernel.

/etc/kernel/preinst.d and /etc/kernel/postinst.d are used by Gentoo's installkernel, and are described in this part of the corresponding article.

/etc/kernel/install.d is used by systemd's kernel-install —which is called by installkernel if sys-kernel/installkernel was installed with the systemd USE flag set—, and is described in this other part of the article about installkernel.
NeddySeagoon wrote:I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Top
pietinger
Moderator
Moderator
Posts: 6610
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Sun Mar 29, 2026 10:57 am

Moved from Installing Gentoo to Documentation, Tips & Tricks.
https://wiki.gentoo.org/wiki/User:Pietinger --> https://wiki.gentoo.org/wiki/User:Pieti ... _at_Gentoo
Top
WizNut
n00b
n00b
Posts: 37
Joined: Wed Nov 09, 2005 6:09 am
Location: Earth

  • Quote

Post by WizNut » Mon Mar 30, 2026 8:40 am

GDH-gentoo wrote:/etc/kernel/config.d is used by sys-kernel/gentoo-kernel and is described in this part of the article about the distribution kernel.

/etc/kernel/preinst.d and /etc/kernel/postinst.d are used by Gentoo's installkernel, and are described in this part of the corresponding article.

/etc/kernel/install.d is used by systemd's kernel-install —which is called by installkernel if sys-kernel/installkernel was installed with the systemd USE flag set—, and is described in this other part of the article about installkernel.
Oh! Thank you! I didn’t see that! Must’ve been tired…
Top
Post Reply

4 posts • Page 1 of 1

Return to “Documentation, Tips & Tricks”

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