Kernel parameters

Asked by Henry3

Hi,
I want to make a number of entries in Grub that differ only in the kernel parameters used. This is to quickly try and find a configuration that works on my old laptop (it has troubles with acpi, acpi=off works, but is not optimal).

How can I do that? Can I somehow make copies of the standard/default menu entry, and then edit the kernel parameters for each copy?

I've seen the kernel parameters in the advanced tab. It is not clear to me if these are universally used parameters or if they apply only to the selected menu entry.

Thank you very much,
Henry

Question information

Language:
English Edit question
Status:
Solved
For:
Grub Customizer Edit question
Assignee:
No assignee Edit question
Solved by:
Daniel Richter
Solved:
Last query:
Last reply:
Revision history for this message
Daniel Richter (danielrichter2007) said :
#1

The kernel parameters on the advanced tab are applied for the default system (on the linux-script) only.

Grub Customizer doesn't provide a mechanism to copy menuentries, so you have to go the manual way:

 * copy your linux entry from /boot/grub/grub.cfg to /etc/grub.d/40_custom (prefix may be different, should begin with "#!/bin/sh exec tail -n +3 $0)".
 * if you always want to use the latest kernel, replace "/boot/vmlinuz-XXX-generic" to "/vmlinuz" and "/boot/initrd.img-XXX-generic" to "/initrd.img"
 * then duplicate the menuentry and do your modifications
 * use Grub Customizer to position the new menuentries and/or disable the old menuentries

Revision history for this message
Henry3 (henry3-g) said :
#2

I will try the manual way, thanks for the detailed how-to.
Will I need to duplicate the 40_custom script, or can there be more that one menu entry in that file?

Thanks & keep up the good work!

Revision history for this message
Henry3 (henry3-g) said :
#3

BTW, if it's technically possible at all, maybe it would be an idea for a future version of Grub customizer to make possible different kernel parameters for different menu entries. Could be useful.
Cheers, Henry

Revision history for this message
Best Daniel Richter (danielrichter2007) said :
#4

You can put multiple menuentries to the 40_custom script.

Currently I don't think there are much users which would need such a feature. However I'll do something to allow modifications of the menuentry contents (this functionality copies the generated entries to 40_custom) in version 3.

Revision history for this message
Henry3 (henry3-g) said :
#5

Thanks Daniel Richter, that solved my question.

Revision history for this message
Henry3 (henry3-g) said :
#6

I just pressed the Thank you button, but let me say a bit more:
I found the right kernel parameters for my old laptop, yay! Thank you for your help!

Following your instructions I was able to make a number of menu entries (9!) with different acpi-related parameters. Then I booted, choosing one option, which failed, so I rebooted choosing the next... until menu entry no.4, which did the trick (pnpacpi=off). This, I believe, was way quicker than editing the default linux line in grub for every reboot (which I actually did a few times before).

I still think it would be cool to give Grub Customizer an option to do something similar like editing the 40_custom script. Then it would be the one-stop tool for all grub-related problems and tune-ups.

Thanks again, lots of success, and keep up the good work!