boot.cfg.j2 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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_pci 1
  45. set menu_windows 1
  46. set menu_utils 1
  47. iseq ${arch} i386 && goto i386 ||
  48. iseq ${arch} x86_64 && goto x86_64 ||
  49. iseq ${arch} arm64 && goto arm64 ||
  50. goto architectures_end
  51. :x86_64
  52. set menu_linux_i386 0
  53. iseq ${platform} efi && goto efi ||
  54. goto architectures_end
  55. :i386
  56. set menu_linux 0
  57. set menu_linux_i386 1
  58. set menu_bsd 1
  59. set menu_unix 0
  60. set menu_freedos 1
  61. set menu_live 0
  62. set menu_windows 0
  63. set menu_utils 1
  64. iseq ${platform} efi && goto efi ||
  65. goto architectures_end
  66. :arm64
  67. set menu_linux 0
  68. set menu_linux_arm 1
  69. set menu_unix 0
  70. set menu_freedos 0
  71. set menu_live 0
  72. set menu_live_arm 1
  73. set menu_windows 0
  74. set menu_utils 0
  75. set menu_utils_arm 1
  76. set menu_pci 0
  77. iseq ${platform} efi && goto efi ||
  78. goto architectures_end
  79. :efi
  80. set menu_bsd 0
  81. set menu_freedos 0
  82. set menu_unix 0
  83. set menu_pci 0
  84. goto architectures_end
  85. :architectures_end
  86. goto clouds
  87. ###################################
  88. # set iPXE cloud provider specifics
  89. ###################################
  90. :clouds
  91. iseq ${ipxe_cloud_config} gce && goto gce ||
  92. iseq ${ipxe_cloud_config} metal && goto metal ||
  93. iseq ${ipxe_cloud_config} packet && goto metal ||
  94. goto clouds_end
  95. :gce
  96. set cmdline console=ttyS0,115200n8
  97. goto clouds_end
  98. :metal
  99. iseq ${arch} i386 && goto metal_x86_64 ||
  100. iseq ${arch} x86_64 && goto metal_x86_64 ||
  101. iseq ${arch} arm64 && goto metal_arm64 ||
  102. goto clouds_end
  103. :metal_x86_64
  104. set cmdline console=ttyS1,115200n8
  105. iseq ${platform} efi && set ipxe_disk netboot.xyz-metal-snp.efi || set ipxe_disk netboot.xyz-metal.kpxe
  106. set menu_linux_i386 0
  107. set menu_freedos 0
  108. set menu_windows 0
  109. iseq ${platform} efi && set menu_pci 0 ||
  110. goto clouds_end
  111. :metal_arm64
  112. set cmdline console=ttyAMA0,115200
  113. set ipxe_disk netboot.xyz-metal-arm64-snp.efi
  114. set menu_bsd 0
  115. set menu_freedos 0
  116. set menu_live 0
  117. set menu_windows 0
  118. set menu_utils 0
  119. set menu_pci 0
  120. goto clouds_end
  121. :clouds_end
  122. goto end
  123. :end
  124. exit