Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
creating menus
2011-12-18, 20:44
Post: #2
RE: creating menus
I've actually been thinking about the same thing, as I prefer to use iPXE directly instead of having to chain off to pxelinux for menuing.

The most obvious way is to use the echo command from http://ipxe.org/cmd to display some text on the screen and then use the "read" command to store some text input in a variable. You could then use the scripting support (goto command) to choose other parts of the same script (or chain off to other special scripts for each purpose).

Incomplete (not tested) code below:

Code:
#!ipxe
:retry
dhcp || goto retry
:menu
echo 1. iSCSI boot Windows 7
echo 2. iSCSI boot Ubuntu
echo 3. SystemRescueCD
echo 4. Ubuntu LTSP
echo 5. MythTV
read choice
goto menu_${choice} || exit
:menu_1
chain sanboot_win7.ipxe
goto menu
:menu_2
chain sanboot_ubuntu.ipxe
goto menu
:menu_3
chain sysrcd.ipxe
goto menu
...

If you get something working I'd be very much interested to hear back about it. I've been thinking about doing something like this myself, but never really gotten it off the ground. Something always seems to wisk me away somewhere else.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
creating menus - errorsmith - 2011-12-18, 17:29
RE: creating menus - robinsmidsrod - 2011-12-18 20:44
RE: creating menus - errorsmith - 2011-12-18, 23:43
RE: creating menus - robinsmidsrod - 2011-12-19, 08:07
RE: creating menus - errorsmith - 2011-12-19, 08:52
RE: creating menus - robinsmidsrod - 2011-12-21, 08:20
RE: creating menus - errorsmith - 2011-12-21, 09:15
RE: creating menus - robinsmidsrod - 2011-12-21, 13:47
RE: creating menus - errorsmith - 2011-12-24, 07:14
RE: creating menus - robinsmidsrod - 2012-04-03, 12:23



User(s) browsing this thread: 1 Guest(s)