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

Post History

60%
+1 −0
Q&A Adding new entries to Grub with alternate kernel parameters

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 f...

posted 12d ago by GeraldS‭  ·  edited 12d ago by GeraldS‭

Answer
#3: Post edited by user avatar GeraldS‭ · 2024-06-19T06:54:27Z (12 days ago)
  • On Ubuntu and Debian you can use the file `/etc/grub.d/40_custom` which is intended exactly for this:
  • Content of _/etc/grub.d/40_custom_:
  • ```bash
  • #!/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.
  • 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_:
  • ```bash
  • #!/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.
#2: Post edited by user avatar GeraldS‭ · 2024-06-19T06:54:10Z (12 days ago)
added Debian, because it's the same there
  • On Ubuntu there is the file `/etc/grub.d/40_custom` which is intended exactly for this:
  • Content of _/etc/grub.d/40_custom_:
  • ```bash
  • #!/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.
  • On Ubuntu and Debian you can use the file `/etc/grub.d/40_custom` which is intended exactly for this:
  • Content of _/etc/grub.d/40_custom_:
  • ```bash
  • #!/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: Initial revision by user avatar GeraldS‭ · 2024-06-19T06:23:44Z (12 days ago)
On Ubuntu there is the file `/etc/grub.d/40_custom` which is intended exactly for this:

Content of _/etc/grub.d/40_custom_:

```bash
#!/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.