boot.cfg.j2 2.8 KB

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