rhel.ipxe 1.3 KB

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