ipxe-dhcp.j2 704 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!ipxe
  2. :start
  3. set version {{ loader_version }}
  4. echo {{ domain_name }} iPXE loader v${version}
  5. goto dhcp
  6. :dhcp
  7. dhcp || goto static
  8. goto menu
  9. :static
  10. echo DHCP Server not found, enabling manual override:
  11. imgfree
  12. ifclose net0
  13. echo -n IP: && read net0/ip
  14. echo -n Subnet mask: && read net0/netmask
  15. echo -n Gateway: && read net0/gateway
  16. echo -n DNS: && read dns
  17. ifopen net0
  18. echo Attempting chainload of {{ domain_name }}...
  19. goto menu || goto failsafe
  20. :menu
  21. chain --autofree http://{{ domain_name }}/menu.ipxe
  22. goto boot
  23. :failsafe
  24. echo Attempt to load {{ domain_name }} failed... restarting...
  25. goto start
  26. :boot
  27. sanboot --no-describe --drive 0x80
  28. :debug
  29. echo Type "exit" to return to menu
  30. shell
  31. goto start