On Mon, Mar 04, 2024 at 09:04:04 +0000, Simon Rowe wrote: > On 02/03/2024, 03:21, "Oskari Pirhonen" <xxc3ncore...@gmail.com> wrote: > > > Would it be better to have the kernel command line args in GRUB config > > override the ones in > > any drop-ins? At least for me it would be surprising behavior if my distro > > set something in > > /usr/lib/kernel.d/ and changing that value in my GRUB config didn't have an > > effect. > > That then makes it impossible for an admin to override any parameter > present in GRUB_CMDLINE_LINUX as that takes priority over files in > either /etc/kernel.d/ or /usr/lib/kernel.d/ > > In my hubris I imagine that distros would move all static or > install-time config to /usr/lib/kernel.d/ and GRUB_CMDLINE_LINUX would > be left just for backward compatibility. >
I imagine such a distro would ship their GRUB config with nothing set in GRUB_CMDLINE_LINUX and only use /usr/lib/kernel.d/ for that. Then the admin doesn't have to worry about overriding things in GRUB directly and can use /etc/kernel.d/ instead. If the distro makes use of GRUB_CMDLINE_LINUX_DEFAULT and GRUB_CMDLINE_LINUX_RECOVERY to create different command lines, the admin may still have to edit those by hand if they want custom options specific to normal and "recovery" entries. After all, this behavior isn't replicated by just slurping the files from {/usr/lib,/etc}/kernel.d/ and tacking them on to the end. > If a distro carries this change then the docs telling users how to set > their own parameters would need updating to mention /etc/kernel.d/ > instead of GRUB_CMDLINE_LINUX. > > I can switch the order if that's the preferred behaviour, but I feel > it diminishes the usefulness of the feature. > The main points that I currently disagree with are: 1. GRUB_CMDLINE_LINUX [should] be left just for backward compatibility 2. [switching the order] diminishes the usefulness of the feature I believe they can both coexist if a distro documents their preferred/supported way of setting the kernel command line (if they have one). This can even be added as a comment in the installed /etc/default/grub so that anyone going to edit the file will run across it and (hopefully) adapt accordingly. Diverging from the distro's policy is always at the discretion of the system administrator, and I believe that the friendliest option for GRUB is to maintain existing behavior as much as possible in these cases. But feel free to wait for additional comments before sending a v2 with the order changed. - Oskari PS: I was unable to find references to either /usr/lib/kernel.d/ or /etc/kernel.d/ being used after a brief search online, so I presume that they are to be provided by the distro's kernel package(s).
signature.asc
Description: PGP signature
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel