boot.cfg.j2 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. ######################################
  18. # Media Locations for Licensed Distros
  19. ######################################
  20. set rhel_base_url {{ rhel_base_url | default("") }}
  21. set win_base_url {{ win_base_url | default("") }}
  22. ##################
  23. # official mirrors
  24. ##################
  25. :mirrors
  26. {% for key, value in releases.items() | sort(attribute='1.name') %}
  27. {% if value.mirror is defined and value.base_dir is defined %}
  28. ### {{ value.name }}
  29. set {{ key }}_mirror {{ value.mirror }}
  30. set {{ key }}_base_dir {{ value.base_dir }}
  31. {% endif %}
  32. {% endfor %}
  33. #################################################
  34. # determine architectures and enable menu options
  35. #################################################
  36. :architectures
  37. set menu_linux 1
  38. set menu_bsd 1
  39. set menu_unix 1
  40. set menu_freedos 1
  41. set menu_live 1
  42. set menu_windows 1
  43. set menu_utils 1
  44. iseq ${buildarch} i386 && goto x86_64 ||
  45. iseq ${buildarch} x86_64 && goto x86_64 ||
  46. iseq ${buildarch} arm64 && goto arm64 ||
  47. goto architectures_end
  48. :x86_64
  49. iseq ${platform} efi && goto efi ||
  50. goto architectures_end
  51. :arm64
  52. set menu_freedos 0
  53. set menu_live 0
  54. set menu_security 0
  55. set menu_windows 0
  56. set menu_utils 0
  57. iseq ${platform} efi && goto efi ||
  58. goto architectures_end
  59. :efi
  60. set menu_bsd 0
  61. set menu_freedos 0
  62. set menu_security 0
  63. goto architectures_end
  64. :architectures_end
  65. goto clouds
  66. ###################################
  67. # set iPXE cloud provider specifics
  68. ###################################
  69. :clouds
  70. iseq ${ipxe_cloud_config} gce && goto gce ||
  71. iseq ${ipxe_cloud_config} packet && goto packet ||
  72. goto clouds_end
  73. :gce
  74. set console console=ttyS0,115200n8
  75. goto clouds_end
  76. :packet
  77. iseq ${buildarch} i386 && goto packet_x86_64 ||
  78. iseq ${buildarch} x86_64 && goto packet_x86_64 ||
  79. iseq ${buildarch} arm64 && goto packet_arm64 ||
  80. goto clouds_end
  81. :packet_x86_64
  82. set console console=ttyS1,115200n8
  83. iseq ${platform} efi && set ipxe_disk netboot.xyz-packet.efi || set ipxe_disk netboot.xyz-packet.kpxe
  84. set menu_freedos 0
  85. set menu_windows 0
  86. set menu_utils 0
  87. goto clouds_end
  88. :packet_arm64
  89. set console console=ttyAMA0,115200
  90. set ipxe_disk netboot.xyz-packet-arm64.efi
  91. set menu_bsd 0
  92. set menu_freedos 0
  93. set menu_live 0
  94. set menu_security 0
  95. set menu_windows 0
  96. set menu_utils 0
  97. goto clouds_end
  98. :clouds_end
  99. goto end
  100. :end
  101. exit