Skip to content

installkernel: Support drop-in files for install.conf - #41

Merged
Nowa-Ammerlaan merged 3 commits into
projg2:masterfrom
Leo3418:master
Jul 17, 2026
Merged

installkernel: Support drop-in files for install.conf#41
Nowa-Ammerlaan merged 3 commits into
projg2:masterfrom
Leo3418:master

Conversation

@Leo3418

@Leo3418 Leo3418 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

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. I discovered this recently while reading the kernel-install(8) manual page and added instructions to create drop-in files to Gentoo Wiki's page for installkernel.

Since the Wiki page 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 pull request adds such support to the script itself and relevant documentation to the installkernel.8 manual page.

To make it easier to review the changes, I split changes to the installkernel script 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.

Leo3418 added 2 commits July 14, 2026 19:48
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 Nowa-Ammerlaan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, Thanks!!

@Nowa-Ammerlaan
Nowa-Ammerlaan merged commit c2b285b into projg2:master Jul 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants