Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Adding new entries to Grub with alternate kernel parameters

+2
−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.

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

Seeing grub alone modifying grub.conf would be the only option. For more handy options it would be ne... (2 comments)

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.

History
Why does this post require moderator attention?
You might want to add some details to your flag.

0 comment threads

Sign up to answer this question »