installkernel: Support drop-in files for install.conf - #41
Merged
Conversation
systemd's kernel-install supports drop-in files for install.conf: if users want to override just some settings in /usr/lib/kernel/install.conf, they can create a drop-in file under directory /etc/kernel/install.conf.d/ and define just those settings in it. A drop-in file need not define all settings in the original install.conf because it is overlaid atop install.conf rather than completely replace install.conf. Since the Gentoo Wiki page for installkernel has a statement "Gentoo strives to ensure a rough feature parity between both implementations", it would be great if Debian's traditional installkernel script also supports install.conf drop-in files. This commit adds such support. The verbose messages that print settings' values are changed to reflect drop-in file support. They would previously say something like "/usr/lib/kernel/install.conf configures layout=grub", but with drop-in file support, the setting's final value may come from either a install.conf file or any drop-in file. If a setting was read from a drop-in file, a message that still mentions a install.conf would be inaccurate. However, we cannot know which file defined each setting unless we add some extra code to track it (which could be lots of code). More generic messages like "Read configuration layout=grub" are a simpler resolution. Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
Feel free to amend this commit into the previous one. This commit was created only to make the previous commit easier to review by making its diff easier to understand. Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
Nowa-Ammerlaan
approved these changes
Jul 17, 2026
Nowa-Ammerlaan
left a comment
Collaborator
There was a problem hiding this comment.
This is great, Thanks!!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
systemd's
kernel-installsupports drop-in files forinstall.conf: if users want to override just some settings in/usr/lib/kernel/install.conf, they can create a drop-in file under directory/etc/kernel/install.conf.d/and define just those settings in it. A drop-in file need not define all settings in the originalinstall.confbecause it is overlaid atopinstall.confrather than completely replaceinstall.conf. I discovered this recently while reading thekernel-install(8)manual page and added instructions to create drop-in files to Gentoo Wiki's page forinstallkernel.Since the Wiki page has a statement
it would be great if Debian's traditional
installkernelscript also supportsinstall.confdrop-in files. This pull request adds such support to the script itself and relevant documentation to theinstallkernel.8manual page.To make it easier to review the changes, I split changes to the
installkernelscript into two commits:installkernel: Support drop-in files for install.conf: All functional changes are in this commit.installkernel: Fix code indentation: This commit only entails code reformatting.The split makes the first commit's diff easier to read and understand. That said, feel free to amend the second commit into the first one after review is complete, or just let me know and I can amend it.