1
0

boot.cfg.j2 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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 ${buildarch} i386 && goto x86_64 ||
  47. iseq ${buildarch} x86_64 && goto x86_64 ||
  48. iseq ${buildarch} arm64 && goto arm64 ||
  49. goto architectures_end
  50. :x86_64
  51. iseq ${platform} efi && goto efi ||
  52. goto architectures_end
  53. :arm64
  54. set menu_linux 0
  55. set menu_linux_arm 1
  56. set menu_unix 0
  57. set menu_freedos 0
  58. set menu_live 0
  59. set menu_live_arm 1
  60. set menu_security 0
  61. set menu_windows 0
  62. set menu_utils 0
  63. set menu_utils_arm 1
  64. iseq ${platform} efi && goto efi ||
  65. goto architectures_end
  66. :efi
  67. set menu_bsd 0
  68. set menu_freedos 0
  69. set menu_security 0
  70. set menu_unix 0
  71. goto architectures_end
  72. :architectures_end
  73. goto clouds
  74. ###################################
  75. # set iPXE cloud provider specifics
  76. ###################################
  77. :clouds
  78. iseq ${ipxe_cloud_config} gce && goto gce ||
  79. iseq ${ipxe_cloud_config} packet && goto packet ||
  80. goto clouds_end
  81. :gce
  82. set cmdline console=ttyS0,115200n8
  83. goto clouds_end
  84. :packet
  85. iseq ${buildarch} i386 && goto packet_x86_64 ||
  86. iseq ${buildarch} x86_64 && goto packet_x86_64 ||
  87. iseq ${buildarch} arm64 && goto packet_arm64 ||
  88. goto clouds_end
  89. :packet_x86_64
  90. set cmdline console=ttyS1,115200n8
  91. iseq ${platform} efi && set ipxe_disk netboot.xyz-packet.efi || set ipxe_disk netboot.xyz-packet.kpxe
  92. set menu_freedos 0
  93. set menu_windows 0
  94. set menu_utils 0
  95. goto clouds_end
  96. :packet_arm64
  97. set cmdline console=ttyAMA0,115200
  98. set ipxe_disk netboot.xyz-packet-arm64.efi
  99. set menu_bsd 0
  100. set menu_freedos 0
  101. set menu_live 0
  102. set menu_security 0
  103. set menu_windows 0
  104. set menu_utils 0
  105. goto clouds_end
  106. :clouds_end
  107. goto end
  108. :end
  109. exit