boot.ipxe.j2 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. #!ipxe
  2. :global_vars
  3. # set site name
  4. set site_name netboot.xyz
  5. # set boot domain
  6. set boot_domain boot.netboot.xyz
  7. # set location of memdisk
  8. set memdisk http://${boot_domain}/memdisk
  9. # signature check enabled?
  10. set sigs_enabled true
  11. # image signatures check enabled?
  12. set img_sigs_enabled true
  13. # set location of signatures for sources
  14. set sigs http://${boot_domain}/sigs/
  15. # set location of latest iPXE
  16. set ipxe_disk netboot.xyz-undionly.kpxe
  17. # set location of custom netboot.xyz live assets
  18. set live_endpoint https://github.com/netbootxyz
  19. ##################
  20. # official mirrors
  21. ##################
  22. :mirrors
  23. ### Alpine Linux
  24. set alpinelinux_mirror dl-cdn.alpinelinux.org
  25. set alpinelinux_base_dir alpine
  26. ### ArchLinux
  27. set archlinux_mirror mirror.rackspace.com
  28. set archlinux_base_dir archlinux
  29. ### CentOS
  30. set centos_mirror mirror.centos.org
  31. set centos_base_dir centos
  32. ### Devuan
  33. set devuan_mirror auto.mirror.devuan.org
  34. set devuan_base_dir devuan
  35. ### Fedora
  36. set fedora_mirror mirrors.kernel.org
  37. set fedora_base_dir fedora
  38. ### Mageia
  39. set mageia_mirror mirrors.kernel.org
  40. set mageia_base_dir mageia
  41. ### OpenSUSE
  42. set opensuse_mirror download.opensuse.org
  43. set opensuse_base_dir distribution/leap
  44. ### Slackware
  45. set slackware_mirror mirror.rackspace.com
  46. set slackware_base_dir slackware
  47. ### Ubuntu
  48. set ubuntu_mirror archive.ubuntu.com
  49. set ubuntu_base_dir ubuntu
  50. ##############################
  51. # netboot-xyz hosted endpoints
  52. ##############################
  53. {% for key, value in endpoints.iteritems() %}
  54. set {{ key }} {{ value['path'] }}
  55. {% endfor %}
  56. #################################################
  57. # determine architectures and enable menu options
  58. #################################################
  59. :architectures
  60. set menu_linux 1
  61. set menu_bsd 1
  62. set menu_freedos 1
  63. set menu_live 1
  64. set menu_security 1
  65. set menu_windows 1
  66. set menu_utils 1
  67. iseq ${buildarch} i386 && goto x86_64 ||
  68. iseq ${buildarch} x86_64 && goto x86_64 ||
  69. iseq ${buildarch} arm64 && goto arm64 ||
  70. goto architectures_end
  71. :x86_64
  72. goto architectures_end
  73. :arm64
  74. set menu_freedos 0
  75. set menu_live 0
  76. set menu_security 0
  77. set menu_windows 0
  78. set menu_utils 0
  79. goto architectures_end
  80. :architectures_end
  81. goto clouds
  82. ###################################
  83. # set iPXE cloud provider specifics
  84. ###################################
  85. :clouds
  86. iseq ${ipxe_cloud_config} gce && goto gce ||
  87. iseq ${ipxe_cloud_config} packet && goto packet ||
  88. goto clouds_end
  89. :gce
  90. set console console=ttyS0,115200n8
  91. goto clouds_end
  92. :packet
  93. iseq ${buildarch} i386 && goto packet_x86_64 ||
  94. iseq ${buildarch} x86_64 && goto packet_x86_64 ||
  95. iseq ${buildarch} arm64 && goto packet_arm64 ||
  96. goto clouds_end
  97. :packet_x86_64
  98. set console console=ttyS1,115200n8
  99. set ipxe_disk netboot.xyz-packet.kpxe
  100. set menu_freedos 0
  101. set menu_windows 0
  102. set menu_utils 0
  103. goto clouds_end
  104. :packet_arm64
  105. set console console=ttyAMA0,115200
  106. set ipxe_disk netboot.xyz-packet-arm64.efi
  107. set menu_bsd 0
  108. set menu_freedos 0
  109. set menu_live 0
  110. set menu_security 0
  111. set menu_windows 0
  112. set menu_utils 0
  113. goto clouds_end
  114. :clouds_end
  115. goto end
  116. :end
  117. exit