boot.cfg.j2 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. # signature check enabled?
  10. set sigs_enabled {{ sigs_enabled | default(false) | bool }}
  11. # image signatures check enabled?
  12. set img_sigs_enabled {{ img_sigs_enabled | default(false) | bool }}
  13. # set location of signatures for sources
  14. set sigs {{ sigs_location }}
  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 {{ live_endpoint }}
  19. #################################################
  20. # determine architectures and enable menu options
  21. #################################################
  22. :architectures
  23. set menu_linux 1
  24. set menu_bsd 1
  25. set menu_freedos 1
  26. set menu_live 1
  27. set menu_security 1
  28. set menu_windows 1
  29. set menu_utils 1
  30. iseq ${buildarch} i386 && goto x86_64 ||
  31. iseq ${buildarch} x86_64 && goto x86_64 ||
  32. iseq ${buildarch} arm64 && goto arm64 ||
  33. goto architectures_end
  34. :x86_64
  35. goto architectures_end
  36. :arm64
  37. set menu_freedos 0
  38. set menu_live 0
  39. set menu_security 0
  40. set menu_windows 0
  41. set menu_utils 0
  42. goto architectures_end
  43. :architectures_end
  44. goto clouds
  45. ###################################
  46. # set iPXE cloud provider specifics
  47. ###################################
  48. :clouds
  49. iseq ${ipxe_cloud_config} gce && goto gce ||
  50. iseq ${ipxe_cloud_config} packet && goto packet ||
  51. goto clouds_end
  52. :gce
  53. set console console=ttyS0,115200n8
  54. goto clouds_end
  55. :packet
  56. iseq ${buildarch} i386 && goto packet_x86_64 ||
  57. iseq ${buildarch} x86_64 && goto packet_x86_64 ||
  58. iseq ${buildarch} arm64 && goto packet_arm64 ||
  59. goto clouds_end
  60. :packet_x86_64
  61. set console console=ttyS1,115200n8
  62. iseq ${platform} efi && set ipxe_disk netboot.xyz-packet.efi || set ipxe_disk netboot.xyz-packet.kpxe
  63. set menu_freedos 0
  64. set menu_windows 0
  65. set menu_utils 0
  66. goto clouds_end
  67. :packet_arm64
  68. set console console=ttyAMA0,115200
  69. set ipxe_disk netboot.xyz-packet-arm64.efi
  70. set menu_bsd 0
  71. set menu_freedos 0
  72. set menu_live 0
  73. set menu_security 0
  74. set menu_windows 0
  75. set menu_utils 0
  76. goto clouds_end
  77. :clouds_end
  78. goto end
  79. :end
  80. exit