Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
iPXE boot failed but 'boot || goto boot_menu' reback to boot menu NOT work
2016-08-16, 08:44 (This post was last modified: 2016-08-16 08:55 by lvii.)
Post: #1
Question iPXE boot failed but 'boot || goto boot_menu' reback to boot menu NOT work
Hi,

When I test iPXE boot menu, boot menu with wrong URL make boot failed.

I have added :

Code:
boot || goto boot_menu

to a boot menu entry, hoping to return back to boot menu when boot failed. But it seem that boot || goto boot_menu NOT work.

Boot failed with a message, and then exit iPXE boot to localdisk :

Code:
Could not boot: No such file or directory (http://ipxe.org/2d0c613b)
Could not boot image: No such file or directory
No more network devices

Here is the Failed screenshot :

[Image: Bqi3MO2.png]

My iPXE script :

Code:
#!ipxe
prompt --key 0x02 --timeout 1000 Press Ctrl-B for the iPXE command line... && shell ||

:boot_menu
menu iPXE Clone Menu
item clone      KS Auto Install : centos-7-kvm
item localboot  Boot From Local Disk
item static     gPXE Static Install
item shell      iPXE Shell

choose --default localboot --timeout 30000 target && goto ${target} ||
echo __NOTE: Cancel Enter Select Menu, Exit
exit

:localboot
sanboot --no-describe --drive 0x80 || goto boot_menu

:clone
kernel http=//192.168.10.199/iso/7/images/pxeboot/vmlinuz net.ifnames=0 biosdevname=0 inst.sshd ipv6.disable=1 inst.stage2=http=//192.168.10.199/iso/7 inst.ks=http=//192.168.10.199/ks/ks-centos-7-kvm.cfg ks.device
=bootif BOOTIF=01-${net0/mac:hexhyp}
initrd http=//192.168.10.199/iso/7/images/pxeboot/initrd.img
boot || goto boot_menu
goto boot_menu

:static
set 210:string http://${next-server}/pxe/
set 209:string ${210:string}pxelinux.cfg/default
echo __INFO: chain ${210:string}gpxelinux.0
echo __INFO: ${209:string}
chain ${210:string}gpxelinux.0 ||
goto boot_menu

:shell
echo __NOTE: Type 'config' enter iPXE config setting, 'exit' return to boot menu.
shell
goto boot_menu
Find all posts by this user
Quote this message in a reply
2016-08-16, 09:37 (This post was last modified: 2016-08-16 10:50 by MultimediaMan.)
Post: #2
RE: iPXE boot failed but 'boot || goto boot_menu' reback to boot menu NOT work
Instead of this:

Code:
:clone
kernel http=//192.168.10.199/iso/7/images/pxeboot/vmlinuz net.ifnames=0 biosdevname=0 inst.sshd ipv6.disable=1 inst.stage2=http=//192.168.10.199/iso/7 inst.ks=http=//192.168.10.199/ks/ks-centos-7-kvm.cfg ks.device
=bootif BOOTIF=01-${net0/mac:hexhyp}
initrd http=//192.168.10.199/iso/7/images/pxeboot/initrd.img
boot || goto boot_menu
goto boot_menu

Try this:

Code:
:clone
initrd http://192.168.10.199/iso/7/images/pxeboot/initrd.img ||
chain http://192.168.10.199/iso/7/images/pxeboot/vmlinuz net.ifnames=0 biosdevname=0 inst.sshd ipv6.disable=1 inst.stage2=http://192.168.10.199/iso/7 inst.ks=http://192.168.10.199/ks/ks-centos-7-kvm.cfg ks.device
=bootif BOOTIF=01-${net0/mac:hexhyp} ||
goto boot_menu

"Thus far, you have been adrift within the sheltered harbor of my patience..."
Find all posts by this user
Quote this message in a reply
Post Reply 




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