Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 How to edit ventoy_grub.cfg
#1
Is there any way to amend ventoy_grub.cfg from within the grub menu, or do I need boot some OS first?

Such a feature would be useful.
Reply
#2
(01-29-2024, 11:52 AM)balanga Wrote: Is there any way to amend ventoy_grub.cfg from within the grub menu, or do I need boot some OS first?

Such a feature would be useful.

Any grub entry can be edited IIRC.  Just press 'e' on the menu entry you'd like to alter.  Or am I missing something here?
Reply
#3
(02-05-2024, 11:11 PM)0x6A7232 Wrote:
(01-29-2024, 11:52 AM)balanga Wrote: Is there any way to amend ventoy_grub.cfg from within the grub menu, or do I need boot some OS first?

Such a feature would be useful.

Any grub entry can be edited IIRC.  Just press 'e' on the menu entry you'd like to alter.  Or am I missing something here?
 
If I get to the grub> prompt I can run

grub> ls (hd0,gpt1)/ventoy/ventoy_grub.cfg

and this shows

ventoy_grub.cfg

but I don't see any way to edit it. Is there a way?
Reply
#4
(02-10-2024, 11:47 AM)balanga Wrote:
(02-05-2024, 11:11 PM)0x6A7232 Wrote:
(01-29-2024, 11:52 AM)balanga Wrote: Is there any way to amend ventoy_grub.cfg from within the grub menu, or do I need boot some OS first?

Such a feature would be useful.

Any grub entry can be edited IIRC.  Just press 'e' on the menu entry you'd like to alter.  Or am I missing something here?
 
If I get to the grub> prompt I can run

grub> ls (hd0,gpt1)/ventoy/ventoy_grub.cfg

and this shows

ventoy_grub.cfg

but I don't see any way to edit it. Is there a way?

You can manually enter the lines one at a time.  You can display a file's contents with
Code:
cat (hd0,gpt1)/ventoy/ventoy_grub.cfg
.  You can also use redirects with cat to edit files, but it will overwrite them if they exist!  So you'd want to display it first, then edit it.  See here: https://www.fosslinux.com/20889/how-to-c...rminal.htm

So, probably you'd want to make a backup (if cp doesn't work, perhaps redirect with
Code:
cat (hd0,gpt1)/ventoy/ventoy_grub.cfg > (hd0,gpt1)/ventoy/ventoy_grub.cfg.bk
  -- this would output the file but instead of the display, you redirect it ( > ) to a new file.  Then you can play with overwriting ventoy_grub.cfg.

Honestly much easier to boot another OS and use a normal text editor, though.  Why can't you do that?
Reply
#5
I do do that but it means booting up and OS just to edit a file.

grub has cat available so you can cat the cfg. Having vi available would be ideal.

Is cat built into busybux? If so, couldn't vi also be built in?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)