0

This is not a duplicate. I want to change the following kernel parameters which I find in the default Linux kernel of Ubuntu 16.04LTS/32 4.4.0-59-generic:

CONFIG_MODULE_SIG=y
CONFIG_MODULE_SIG_ALL=y
CONFIG_MODULE_SIG_UEFI=y
CONFIG_MODULES_USE_ELF_REL=y

Of course I can recompile the kernel but I want to avoid it for several reasons. Can I change temporally or permanently grub like this:

GRUB_CMDLINE_LINUX=" … CONFIG_MODULE_SIG=n CONFIG_MODULE_SIG_ALL=n CONFIG_MODULE_SIG_UEFI=n CONFIG_MODULES_USE_ELF_REL=n"

Is this the correct way to do so or has this no effect on the kernel parameters?

1

You are confusing "kernel boot parameters" with "kernel configuration parameters". To do what you want, even though you don't want to, you need to modify the kernel configuration file and re-compile the kernel.

Because they are compile time directives, it is not possible to change kernel configuration parameters via the grub command line. However, and depending on what they are, sometimes the users objectives can still be achieved via kernel command line in grub. For example, say my kernel configuration had CONFIG_X86_INTEL_PSTATE=y. I can still tell the kernel not to use the Intel P-state CPU frequency scaling driver via this:

GRUB_CMDLINE_LINUX_DEFAULT="intel_pstate=disable"

in grub. So even though it is compiled into the kernel, it will not be used.

  • If I understand your answer correctly you want to say that it is not possible to change kernel configuration parameters via grub. Is this correct? – musbach Jan 21 '17 at 16:26
  • yes, it is not possible. I attempted to clarify my answer. – Doug Smythies Jan 21 '17 at 16:50
  • Yes, I know that I can change some(?) kernel configuration parameter via grub. But it looks that there is no general way. Do you know if I can change the requested kernel parameter by grub? By the way I didn’t confuse kernel parameter and boot parameter :-) – musbach Jan 21 '17 at 16:57
  • You can not change any kernel configuration parameter via grub. Since I don't know what your objective is, I can not comment further. You could review Documentation/admin-guide/kernel-parameters.txt (old location is Documentation/kernel-parameters.txt) yourself, but I didn't see anything obvious therein. – Doug Smythies Jan 21 '17 at 18:14
  • I have posted an Ubuntu bug : bugs.launchpad.net/ubuntu/+source/linux-lts-xenial/+bug/1656670 and I am looking for a workaround. – musbach Jan 21 '17 at 19:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.