1
0

rhel.ipxe.j2 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 os_arch ${arch}
  7. iseq ${os_arch} x86_64 && set os_arch x86_64 ||
  8. iseq ${os_arch} arm64 && set os_arch aarch64 ||
  9. goto ${menu} ||
  10. :rhel
  11. set os Red Hat Enterprise Linux - ${os_arch}
  12. clear rhel_version
  13. menu ${os}
  14. item --gap Installers
  15. item rhel_install ${space} ${os} Graphical Install
  16. item rhel_install_text ${space} ${os} Text Install
  17. item --gap Options:
  18. item url_set ${space} Base URL [ ${rhel_base_url} ]
  19. choose rhel_version || goto rhel_exit
  20. goto ${rhel_version}
  21. :url_set
  22. echo Set the HTTP URL of an extracted RHEL ISO without the trailing slash:
  23. echo e.g. http://www.mydomain.com/rhel/7
  24. echo
  25. echo -n URL: ${} && read rhel_base_url
  26. echo
  27. echo netboot.xyz will attempt to load the following files:
  28. echo ${rhel_base_url}/os/${os_arch}/images/pxeboot/vmlinuz
  29. echo ${rhel_base_url}/os/${os_arch}/images/pxeboot/initrd.img
  30. echo
  31. prompt Press any key to return to RHEL Menu...
  32. goto rhel
  33. :rhel_install_text
  34. set params inst.text
  35. goto rhel_install
  36. :rhel_install
  37. isset ${rhel_base_url} && goto boot || echo URL not set... && goto url_set
  38. goto boot
  39. :boot
  40. imgfree
  41. kernel ${rhel_base_url}/os/${os_arch}/images/pxeboot/vmlinuz inst.repo=${rhel_base_url}/os/${os_arch} ${ipparam} ${params} {{ kernel_params }}
  42. initrd ${rhel_base_url}/os/${os_arch}/images/pxeboot/initrd.img
  43. md5sum vmlinuz initrd.img
  44. boot
  45. goto rhel
  46. :rhel_exit
  47. exit 0