Browse Source

commit: add example iPXE iSCSI script

HOME 4 years ago
parent
commit
d32ac22d55
1 changed files with 28 additions and 0 deletions
  1. 28 0
      HttpServer/Example/iPXE-iSCSI.txt

+ 28 - 0
HttpServer/Example/iPXE-iSCSI.txt

@@ -0,0 +1,28 @@
+#!ipxe
+
+################################
+set iscsi_target_name target-01
+set iscsi_target_host 192.168.233.233
+################################
+
+:label_start
+
+echo Script Started (${iscsi_target_name})
+
+:label_iscsi
+echo Setting up iSCSI iqn with mac...
+set initiator-iqn iqn.2010-04.org.ipxe:${mac:hexhyp}
+echo Connect to iSCSI target and booting...
+sanboot iscsi:${iscsi_target_host}::::iqn.1991-05.com.talaloni:${iscsi_target_name} || goto label_iscsi_fail
+
+################################
+goto label_eof
+################################
+
+:label_iscsi_fail
+
+prompt --key r iSCSI boot fail, press 'R' to retry iSCSI again && goto label_iscsi ||
+
+###############################
+:label_eof
+###############################