improved the iscsi support for debian
authorPravin Shinde <pravin@black-perl.(none)>
Tue, 11 Aug 2009 02:49:11 +0000 (04:49 +0200)
committerPravin Shinde <pravin@black-perl.(none)>
Tue, 11 Aug 2009 02:49:11 +0000 (04:49 +0200)
D/D/DL/fdisk [new file with mode: 0755]
D/D/DL/generate_initrd.sh
D/D/DL/live

diff --git a/D/D/DL/fdisk b/D/D/DL/fdisk
new file mode 100755 (executable)
index 0000000..19805a2
Binary files /dev/null and b/D/D/DL/fdisk differ
index 4302751..cdbec7f 100755 (executable)
@@ -26,6 +26,7 @@ mkdir mpoint/etc/iscsi
 cp iscsi/iscsid.conf mpoint/etc/iscsi/
 cp iscsi/initiatorname.iscsi mpoint/etc/iscsi/
 cp iscsi/tools/* mpoint/sbin/
+cp fdisk mpoint/sbin/
 
 mkdir mpoint/modules
 cp modules/* mpoint/modules/
index d37ce8b..4e20811 100755 (executable)
@@ -809,17 +809,22 @@ do_iscsimount ()
 #    dmesg > /messages
     sync
        i=0
+#   iscsiadm -m session -P 3 | grep "attached scsi disk"
+#    export iscsidevice="/dev/disk/by-id/scsi-1494554000000000000000000010000000500c9000000d00f"
+    export iscsidevice=/dev/disk/by-label/Debian\\x20lenny\\x2020090614-09\:11 
        while [ "$i" -lt 160 ]
        do
-        ls -l /dev/sda && break
+        ls -l "${iscsidevice}" && break
                i="$(($i + 1))"
         echo "waiting for iscsi disk to appear $i"
                sleep 1
         sync
        done
-
-    mount -t iso9660 /dev/sda "${mountpoint}"
+#   export iscsidevice=`fdisk -l 2> /dev/null | grep "724 MB" | cut -d' ' -f2 | cut -d':' -f1`
+#   mount -t iso9660 "${iscsidevice}" "${mountpoint}"
     rc=${?}
+    sync
+    sleep 2
     rc=0
     return $rc
 }