iPXE-iSCSI.txt 723 B

12345678910111213141516171819202122232425262728
  1. #!ipxe
  2. ################################
  3. set iscsi_target_name target-01
  4. set iscsi_target_host 192.168.233.233
  5. ################################
  6. :label_start
  7. echo Script Started (${iscsi_target_name})
  8. :label_iscsi
  9. echo Setting up iSCSI iqn with mac...
  10. set initiator-iqn iqn.2010-04.org.ipxe:${mac:hexhyp}
  11. echo Connect to iSCSI target and booting...
  12. sanboot iscsi:${iscsi_target_host}::::iqn.1991-05.com.talaloni:${iscsi_target_name} || goto label_iscsi_fail
  13. ################################
  14. goto label_eof
  15. ################################
  16. :label_iscsi_fail
  17. prompt --key r iSCSI boot fail, press 'R' to retry iSCSI again && goto label_iscsi ||
  18. ###############################
  19. :label_eof
  20. ###############################