Adding new entries to Grub with alternate kernel parameters
+3
−0
I installed Grub in the normal way and now I have entries in the Grub menu for linux, linux-lts, and the fallback versions of them.
I want to add more entries to this. For example, I want to add linux-lts nomodeset
that is the same as linux-lts
but without nvidia-drm.modeset=1
.
Do I have to manually edit /boot/grub/grub.cfg
for this? Or is there a more user friendly way? The syntax of grub.cfg
is bad, and I fear my manual changes will get overwritten by grub-mkconfig
.
1 answer
+1
−0
On Ubuntu and Debian (and their derivates) you can use the file /etc/grub.d/40_custom
which is intended exactly for this:
Content of /etc/grub.d/40_custom:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
Just add your menu entries there and they will be added when the grub config is recreated.
1 comment thread