boot.cfg.j2 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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. # set location of custom netboot.xyz live assets
  10. set live_endpoint {{ live_endpoint }}
  11. # signature check enabled?
  12. set sigs_enabled {{ sigs_enabled | default(false) | bool | lower }}
  13. # set location of signatures for sources
  14. set sigs {{ sigs_location }}
  15. # set location of latest iPXE
  16. iseq ${platform} efi && set ipxe_disk netboot.xyz-snponly.efi || set ipxe_disk netboot.xyz-undionly.kpxe
  17. # set default boot timeout
  18. set boot_timeout {{ boot_timeout }}
  19. ######################################
  20. # Media Locations for Licensed Distros
  21. ######################################
  22. set rhel_base_url {{ rhel_base_url | default("") }}
  23. set win_base_url {{ win_base_url | default("") }}
  24. ##################
  25. # official mirrors
  26. ##################
  27. :mirrors
  28. {% for key, value in releases.items() | sort(attribute='1.name') %}
  29. {% if value.mirror is defined and value.base_dir is defined %}
  30. ### {{ value.name }}
  31. set {{ key }}_mirror {{ value.mirror }}
  32. set {{ key }}_base_dir {{ value.base_dir }}
  33. {% endif %}
  34. {% endfor %}
  35. #################################################
  36. # determine architectures and enable menu options
  37. #################################################
  38. :architectures
  39. set menu_linux 1
  40. set menu_bsd 1
  41. set menu_unix 1
  42. set menu_freedos 1
  43. set menu_live 1
  44. set menu_windows 1
  45. set menu_utils 1
  46. iseq ${arch} i386 && goto i386 ||
  47. iseq ${arch} x86_64 && goto x86_64 ||
  48. iseq ${arch} arm64 && goto arm64 ||
  49. goto architectures_end
  50. :x86_64
  51. set menu_linux_i386 0
  52. iseq ${platform} efi && goto efi ||
  53. goto architectures_end
  54. :i386
  55. set menu_linux 0
  56. set menu_linux_i386 1
  57. set menu_bsd 1
  58. set menu_unix 0
  59. set menu_freedos 1
  60. set menu_live 0
  61. set menu_windows 0
  62. set menu_utils 1
  63. iseq ${platform} efi && goto efi ||
  64. goto architectures_end
  65. :arm64
  66. set menu_linux 0
  67. set menu_linux_arm 1
  68. set menu_unix 0
  69. set menu_freedos 0
  70. set menu_live 0
  71. set menu_live_arm 1
  72. set menu_windows 0
  73. set menu_utils 0
  74. set menu_utils_arm 1
  75. iseq ${platform} efi && goto efi ||
  76. goto architectures_end
  77. :efi
  78. set menu_bsd 0
  79. set menu_freedos 0
  80. set menu_unix 0
  81. goto architectures_end
  82. :architectures_end
  83. goto clouds
  84. ###################################
  85. # set iPXE cloud provider specifics
  86. ###################################
  87. :clouds
  88. iseq ${ipxe_cloud_config} gce && goto gce ||
  89. iseq ${ipxe_cloud_config} packet && goto packet ||
  90. goto clouds_end
  91. :gce
  92. set cmdline console=ttyS0,115200n8
  93. goto clouds_end
  94. :packet
  95. iseq ${arch} i386 && goto packet_x86_64 ||
  96. iseq ${arch} x86_64 && goto packet_x86_64 ||
  97. iseq ${arch} arm64 && goto packet_arm64 ||
  98. goto clouds_end
  99. :packet_x86_64
  100. set cmdline console=ttyS1,115200n8
  101. iseq ${platform} efi && set ipxe_disk netboot.xyz-packet.efi || set ipxe_disk netboot.xyz-packet.kpxe
  102. set menu_linux_i386 0
  103. set menu_freedos 0
  104. set menu_windows 0
  105. goto clouds_end
  106. :packet_arm64
  107. set cmdline console=ttyAMA0,115200
  108. set ipxe_disk netboot.xyz-packet-arm64.efi
  109. set menu_bsd 0
  110. set menu_freedos 0
  111. set menu_live 0
  112. set menu_windows 0
  113. set menu_utils 0
  114. goto clouds_end
  115. :clouds_end
  116. goto end
  117. :end
  118. exit