archlinux.ipxe.j2 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #!ipxe
  2. # Arch Linux Operating System
  3. # http://www.archlinux.org
  4. set os_arch ${arch}
  5. iseq ${os_arch} x86_64 && set os_arch x86_64 ||
  6. iseq ${os_arch} i386 && set os_arch i686 ||
  7. isset ${dhcp-server} || goto static_ip
  8. set ipparam BOOTIF=${netX/mac} ip=dhcp
  9. set real_archlinux_mirror ${archlinux_mirror}
  10. goto goto_menu
  11. :static_ip
  12. # Arch Linux cannot use DNS if booted with a static IP
  13. # See https://bugs.archlinux.org/task/63174
  14. # Remove this hack when the above bug is properly resolved
  15. nslookup real_archlinux_mirror ${archlinux_mirror}
  16. set ipparam BOOTIF=${netX/mac} ip=${ip}::${gateway}:${netmask}
  17. :goto_menu
  18. goto ${menu} ||
  19. :archlinux
  20. set os {{ releases.archlinux.name }}
  21. clear arch_version
  22. menu ${os} - ${arch}
  23. item --gap Latest Releases
  24. {% for item in releases.archlinux.versions %}
  25. item {{ item.code_name }} ${space} ${os} {{ item.name }}
  26. {% endfor %}
  27. choose arch_version || goto archlinux_exit
  28. iseq ${os_arch} amd64 && goto boot ||
  29. iseq ${os_arch} i686 && goto boot32 ||
  30. :boot
  31. imgfree
  32. set dir ${archlinux_base_dir}/iso/${arch_version}/arch/boot
  33. set params archiso_http_srv=http://${real_archlinux_mirror}/${archlinux_base_dir}/iso/${arch_version}/ archisobasedir=arch cms_verify=y ${ipparam} net.ifnames=0 {{ kernel_params }}
  34. kernel http://${archlinux_mirror}/${dir}/${os_arch}/vmlinuz-linux ${params}
  35. initrd http://${archlinux_mirror}/${dir}/${os_arch}/initramfs-linux.img
  36. echo
  37. echo MD5sums:
  38. md5sum vmlinuz-linux initramfs-linux.img
  39. boot
  40. goto archlinux_exit
  41. :boot32
  42. {% for key, value in endpoints.items() | sort %}
  43. {% if key == "archlinux-32" %}
  44. set arch32_url ${live_endpoint}{{ value.path }}
  45. {% endif %}
  46. {% endfor %}
  47. imgfree
  48. set params archiso_http_srv=${arch32_url} archisobasedir=arch checksum=y ${ipparam} net.ifnames=0 {{ kernel_params }}
  49. kernel ${arch32_url}vmlinuz-linux ${ipparam} ${params}
  50. initrd ${arch32_url}initramfs-linux.img
  51. echo
  52. echo MD5sums:
  53. md5sum vmlinuz-linux initramfs-linux.img
  54. boot
  55. goto archlinux_exit
  56. :archlinux_exit
  57. clear menu
  58. exit 0