1
0

rhel.ipxe.j2 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!ipxe
  2. # Redhat Enterprise Linux (RHEL)
  3. # https://www.redhat.com
  4. isset ${dhcp-server} && set ipparam ip=dhcp || set ipparam ip=${ip}::${gateway}:${netmask}:::none nameserver=${dns}
  5. set ipparam BOOTIF=${netX/mac} ${ipparam}
  6. set rhel_arch x86_64
  7. goto ${menu} ||
  8. :rhel
  9. set os Red Hat Enterprise Linux
  10. clear rhel_version
  11. menu ${os}
  12. item --gap Installers
  13. item rhel_install ${space} Load ${os} Installer...
  14. item --gap Options:
  15. item arch_set ${space} Architecture [ ${rhel_arch} ]
  16. item url_set ${space} Base URL [ ${rhel_base_url} ]
  17. choose rhel_version || goto rhel_exit
  18. goto ${rhel_version}
  19. :arch_set
  20. iseq ${rhel_arch} x86_64 && set rhel_arch i386 || set rhel_arch x86_64
  21. goto rhel
  22. :url_set
  23. echo Set the HTTP URL of an extracted RHEL ISO without the trailing slash:
  24. echo e.g. http://www.mydomain.com/rhel/7
  25. echo
  26. echo -n URL: ${} && read rhel_base_url
  27. echo
  28. echo netboot.xyz will attempt to load the following files:
  29. echo ${rhel_base_url}/os/${rhel_arch}/images/pxeboot/vmlinuz
  30. echo ${rhel_base_url}/os/${rhel_arch}/images/pxeboot/initrd.img
  31. echo
  32. prompt Press any key to return to RHEL Menu...
  33. goto rhel
  34. :rhel_install
  35. isset ${rhel_base_url} && goto boot || echo URL not set... && goto url_set
  36. :boot
  37. imgfree
  38. kernel ${rhel_base_url}/os/${rhel_arch}/images/pxeboot/vmlinuz repo=${rhel_base_url}/os/${rhel_arch} ${console} ${ipparam} initrd=initrd.img
  39. initrd ${rhel_base_url}/os/${rhel_arch}/images/pxeboot/initrd.img
  40. md5sum vmlinuz initrd.img
  41. boot
  42. :rhel_exit
  43. exit 0