1
0

boot.cfg.j2 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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. # image signatures check enabled?
  14. set img_sigs_enabled {{ img_sigs_enabled | default(false) | bool | lower }}
  15. # set location of signatures for sources
  16. set sigs {{ sigs_location }}
  17. # set location of latest iPXE
  18. iseq ${platform} efi && set ipxe_disk netboot.xyz-snponly.efi || set ipxe_disk netboot.xyz-undionly.kpxe
  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_freedos 1
  42. set menu_live 1
  43. set menu_security 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. iseq ${platform} efi && goto efi ||
  60. goto architectures_end
  61. :efi
  62. set menu_bsd 0
  63. set menu_freedos 0
  64. set menu_security 0
  65. goto architectures_end
  66. :architectures_end
  67. goto clouds
  68. ###################################
  69. # set iPXE cloud provider specifics
  70. ###################################
  71. :clouds
  72. iseq ${ipxe_cloud_config} gce && goto gce ||
  73. iseq ${ipxe_cloud_config} packet && goto packet ||
  74. goto clouds_end
  75. :gce
  76. set console console=ttyS0,115200n8
  77. goto clouds_end
  78. :packet
  79. iseq ${buildarch} i386 && goto packet_x86_64 ||
  80. iseq ${buildarch} x86_64 && goto packet_x86_64 ||
  81. iseq ${buildarch} arm64 && goto packet_arm64 ||
  82. goto clouds_end
  83. :packet_x86_64
  84. set console console=ttyS1,115200n8
  85. iseq ${platform} efi && set ipxe_disk netboot.xyz-packet.efi || set ipxe_disk netboot.xyz-packet.kpxe
  86. set menu_freedos 0
  87. set menu_windows 0
  88. set menu_utils 0
  89. goto clouds_end
  90. :packet_arm64
  91. set console console=ttyAMA0,115200
  92. set ipxe_disk netboot.xyz-packet-arm64.efi
  93. set menu_bsd 0
  94. set menu_freedos 0
  95. set menu_live 0
  96. set menu_security 0
  97. set menu_windows 0
  98. set menu_utils 0
  99. goto clouds_end
  100. :clouds_end
  101. goto end
  102. :end
  103. exit