1
0

boot.cfg.j2 2.7 KB

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