boot.cfg.j2 2.7 KB

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