boot.cfg.j2 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #!ipxe
  2. :global_vars
  3. # set site name
  4. set site_name {{ site_name }}
  5. # set boot domain
  6. set boot_domain {{ boot_domain }}
  7. # set location of memdisk
  8. set memdisk {{ memdisk_location }}
  9. # signature check enabled?
  10. set sigs_enabled {{ sigs_enabled | default(false) | bool }}
  11. # image signatures check enabled?
  12. set img_sigs_enabled {{ img_sigs_enabled | default(false) | bool }}
  13. # set location of signatures for sources
  14. set sigs {{ sigs_location }}
  15. # set location of latest iPXE
  16. set ipxe_disk netboot.xyz-undionly.kpxe
  17. # set location of custom netboot.xyz live assets
  18. set live_endpoint {{ live_endpoint }}
  19. ##############################
  20. # netboot-xyz hosted endpoints
  21. ##############################
  22. {% for key, value in endpoints.iteritems() %}
  23. set {{ key }} {{ value['path'] }}
  24. {% endfor %}
  25. #################################################
  26. # determine architectures and enable menu options
  27. #################################################
  28. :architectures
  29. set menu_linux 1
  30. set menu_bsd 1
  31. set menu_freedos 1
  32. set menu_live 1
  33. set menu_security 1
  34. set menu_windows 1
  35. set menu_utils 1
  36. iseq ${buildarch} i386 && goto x86_64 ||
  37. iseq ${buildarch} x86_64 && goto x86_64 ||
  38. iseq ${buildarch} arm64 && goto arm64 ||
  39. goto architectures_end
  40. :x86_64
  41. goto architectures_end
  42. :arm64
  43. set menu_freedos 0
  44. set menu_live 0
  45. set menu_security 0
  46. set menu_windows 0
  47. set menu_utils 0
  48. goto architectures_end
  49. :architectures_end
  50. goto clouds
  51. ###################################
  52. # set iPXE cloud provider specifics
  53. ###################################
  54. :clouds
  55. iseq ${ipxe_cloud_config} gce && goto gce ||
  56. iseq ${ipxe_cloud_config} packet && goto packet ||
  57. goto clouds_end
  58. :gce
  59. set console console=ttyS0,115200n8
  60. goto clouds_end
  61. :packet
  62. iseq ${buildarch} i386 && goto packet_x86_64 ||
  63. iseq ${buildarch} x86_64 && goto packet_x86_64 ||
  64. iseq ${buildarch} arm64 && goto packet_arm64 ||
  65. goto clouds_end
  66. :packet_x86_64
  67. set console console=ttyS1,115200n8
  68. iseq ${platform} efi && set ipxe_disk netboot.xyz-packet.efi || set ipxe_disk netboot.xyz-packet.kpxe
  69. set menu_freedos 0
  70. set menu_windows 0
  71. set menu_utils 0
  72. goto clouds_end
  73. :packet_arm64
  74. set console console=ttyAMA0,115200
  75. set ipxe_disk netboot.xyz-packet-arm64.efi
  76. set menu_bsd 0
  77. set menu_freedos 0
  78. set menu_live 0
  79. set menu_security 0
  80. set menu_windows 0
  81. set menu_utils 0
  82. goto clouds_end
  83. :clouds_end
  84. goto end
  85. :end
  86. exit