[ipxe-devel] menu-timeout

Bottom Poster stappers at stappers.nl
Wed Jan 22 20:35:53 UTC 2020



In-Reply-To: <8bf4eeb16a364e27aadab1eec0ee5f7a at dalco.ch>
Previous-Subject: Re: [ipxe-devel] Select menu item by typing in its name

On Wed, Jan 22, 2020 at 08:25:17PM +0000, Matteo Guglielmi wrote:
> 
> this is an ipxe script which I generate via php.
> 
> What I would also need to preserve is the timeout option of
> the choose function so that if I do not type anything, the
> predefined item kicks in.
> 
> 
> Is this possible or not?

Tell us.
 
> 
> #!ipxe
> 
> set menu-timeout 10000
> set menu-default local
> set cluster_name BOB
> 
> :start
> menu iPXE boot menu for => ${hostname} <= on ${cluster_name}
> item --gap -- --------------------------------------------------------------------------
> item local local
> item install install
> item rescue rescue
> item rescuerw rescuerw
> item reboot reboot
> item --gap -- --------------------------------------------------------------------------
> choose --timeout ${menu-timeout} --default ${menu-default} selected || exit
> goto ${selected}
> 
> :local
> # boot from first drive
> sanboot --no-describe --drive 0x80
> 
> :install
> set boot-path http://10.123.123.1/fai
> initrd ${boot-path}/initrd
> kernel ${boot-path}/vmlinuz
> imgargs vmlinuz initrd=initrd ip=dhcp root=10.123.123.1:/srv/fai/nfsroot:vers=3 rootovl FAI_FLAGS=verbose,sshd,reboot FAI_ACTION=install consoleblank=0 nomodeset
> boot
> 
> :rescue
> set boot-path http://10.123.123.1/rescue
> initrd ${boot-path}/initramfs
> kernel ${boot-path}/vmlinuz
> imgargs vmlinuz initrd=initramfs root=10.123.123.1:/srv/live/cos8:vers=3 rootovl rootflags=nolock selinux=0 divider=10 elevator=noop preempt=0 rdblacklist=nouveau nouveau.modeset=0 rdblacklist=radeon radeon.modeset=0 consoleblank=0 rdblacklist=ast net.ifnames=0 biosdevname=0 nomodeset
> boot
> 
> :rescuerw
> set boot-path http://10.123.123.1/rescue
> initrd ${boot-path}/initramfs
> kernel ${boot-path}/vmlinuz
> imgargs vmlinuz initrd=initramfs root=10.123.123.1:/srv/live/cos8:vers=3 rw rootflags=nolock selinux=0 divider=10 elevator=noop preempt=0 rdblacklist=nouveau nouveau.modeset=0 rdblacklist=radeon radeon.modeset=0 consoleblank=0 rdblacklist=ast net.ifnames=0 biosdevname=0 nomodeset
> boot
> 
> :reboot
> reboot



More information about the ipxe-devel mailing list