iPXE discussion forum
Is there a way to do like keyword 'e' in grub - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: Is there a way to do like keyword 'e' in grub (/showthread.php?tid=21801)



Is there a way to do like keyword 'e' in grub - hugogong - 2020-02-11 13:25

There is keyword 'e' which provides me to edit the grub menu before a actually kernel loading or OS loading/boot. Is iPXE menu also have a similar way to do it so that it would be easier to add or remove this or that kernel parameter.


RE: Is there a way to do like keyword 'e' in grub - alhyene - 2020-02-11 15:45

May be with TAB key or go to shell (cmdline) ?


RE: Is there a way to do like keyword 'e' in grub - hugogong - 2020-02-12 05:16

It not more convenient than the keyword 'e' in grub. If I get into iPXE cmdline, I have to type a long string somewhat like,
kernel xxxxxxx kernel parameter
initrd xxxxxxx
boot


RE: Is there a way to do like keyword 'e' in grub - myxal - 2020-02-12 20:21

I don't think the exact functionality is possible to do in ipxe, as here the menu entries are simple jumps to a label in the script - you don't necessarily have them 1:1 associated with kernel image and parameters.

What you probably could do is to have another item toggling a true/false variable if the user wants to edit the kernel + command line, and use the read command if it should prompt the user. A variant with no menu is actually used as an example in the docs:

Quote:Allow user to edit a kernel command line before booting
Code:
set cmdline selinux=0 console=ttyS0,115200n8 console=tty0
  echo -n Kernel command line: ${}
  read cmdline
  chain http://my.web.server/vmlinuz ${cmdline}



RE: Is there a way to do like keyword 'e' in grub - hugogong - 2020-02-14 02:42

thanks, that might be the only way to implement.


RE: Is there a way to do like keyword 'e' in grub - alhyene - 2020-02-15 22:52

You could read this if you want...
https://forum.ipxe.org/printthread.php?tid=11058

there's a variable named ${scriptlet} who could could be usefull.