Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
sanboot:ubuntu_iscsi2 [2010/10/13 07:12]
qiet72
sanboot:ubuntu_iscsi2 [2011/01/19 04:26] (current)
tripg
Line 74: Line 74:
  
 # pcmcia/​cardbus networking # pcmcia/​cardbus networking
 +copy_exec /​lib/​udev/​pcmcia-socket-startup
 +copy_exec /​lib/​udev/​pcmcia-check-broken-cis
 +copy_exec /​lib/​udev/​rules.d/​85-pcmcia.rules
 +copy_exec /​etc/​pcmcia/​config.opts
 copy_modules_dir kernel/​drivers/​pcmcia copy_modules_dir kernel/​drivers/​pcmcia
 copy_modules_dir kernel/​drivers/​net/​pcmcia copy_modules_dir kernel/​drivers/​net/​pcmcia
-for x in pcmcia_core ​pcmcia_rsrc ​yenta_socket pcmcia; do+for x in pcmcia_core yenta_socket pcmcia; do
    ​force_load ${x}    ​force_load ${x}
 done done
Line 119: Line 123:
    # Check if an iscsi environment exists and start up the networking environment    # Check if an iscsi environment exists and start up the networking environment
    if [ -e /​sys/​firmware/​ibft/​target0/​target-name -o -n "​${iscsi_ip}"​ ]; then    if [ -e /​sys/​firmware/​ibft/​target0/​target-name -o -n "​${iscsi_ip}"​ ]; then
-      ​udevadm settle --timeout=30               # wait for netcard +      ​x=5 
-      ​sleep 5                                   wait some more +      # Wait up to x seconds for a network interface to pop up 
-      ​udevadm settle --timeout=30 ​              # wait for netcard +      ​echo -n "​Searching ​for network cards..."​ 
-                                                # Bringing the link up can be pain ​Some ​network cards take a long time. +      until ifconfig -a|grep -q Ethernet; do 
-      echo "​Searching for an ip address ​on all network interfaces..."​ +         sleep 1 
-      for netdev in `ifconfig -a|grep Ethernet|cut -d' ' -f1`; do +         echo -n . 
-       CNT=5                                 Try so many times before giving up +         ​x=$(($x - 1)) 
-         until ifconfig ${netdev}|grep ​-q "inet addr"; do +         if [ $x = 0 ]; then 
-            #ip link set ${netdev} mtu 2500     ​# Optional: increase mtu for performance +            echo "​No ​network cards detected!"​ 
-            ip link set ${netdev} up            # try to bring up the interface +            exit 0 
-            ipconfig -t 2 -c dhcp -d ${netdev} ​ # Get an IP +         fi 
-            CNT=$((${CNT} - 1)) +      done # end of until 
-            if [ ${CNT} = 0 ]; then break; fi +      echo "​Searching for an dhcp server ​on all network interfaces..."​ 
-            echo "Tries left for interface ${netdev}: ${CNT}"​ +      ​CNT=5 
-         done # end of until +      until ifconfig ${netdev}|grep -q "inet addr"; do 
-         if ifconfig -a|grep -q "inet addr"; then break; fi  # If we have got an address, stop searching. +         for netdev in `ifconfig -a|grep Ethernet|cut -d' ' -f1`; do # Do a round-robin search for dhcp servers 
-      done # end of net device probing +            #ip link set ${netdev} mtu 2500                          # Optional: increase mtu for performance 
-      if ! ifconfig -a|grep -q "inet addr"; then break; fi  # If we cannot get an ip, give up.+            ip link set ${netdev} up                                 ​# try to bring up the interface 
 +            ipconfig -t 2 -c dhcp -d ${netdev} ​                      ​# Get an IP 
 +            ​if ifconfig -a|grep -q "inet addr"; then break 2; fi     # If we have got an address, stop searching. 
 +         done # end of netdev probing 
 +         CNT=$((${CNT} - 1)) 
 +         ​if [ ${CNT} = 0 ]; then 
 +            ​echo "No dhcp servers found!"​ 
 +            exit 0 
 +         fi 
 +         echo "Tries left: ${CNT}"​ 
 +      done # end of until
       if [ -e /​sys/​firmware/​ibft/​target0/​target-name ]; then       if [ -e /​sys/​firmware/​ibft/​target0/​target-name ]; then
          #​iscsistart -b  # This should get the ibft parameters but it does not yet.          #​iscsistart -b  # This should get the ibft parameters but it does not yet.
Line 163: Line 177:
  
 # The primary network interface # The primary network interface
-auto eth0+#auto eth0
 iface eth0 inet manual iface eth0 inet manual
 +iface eth1 inet manual
 +iface eth2 inet manual
 </​code>​ </​code>​
  
Line 248: Line 264:
       iscsi_pw= ​  The password to login to the target server       iscsi_pw= ​  The password to login to the target server
 </​code>​ </​code>​
 +    * pcmcia support is now complete. ​ All linux supported pcmcia and cardbus network cards should work
     * You cannot create sparse images if you copy to a windows or samba network share, use nfs/ssh/nc (netcat) instead. ​ Here is an example with nc (netcat):     * You cannot create sparse images if you copy to a windows or samba network share, use nfs/ssh/nc (netcat) instead. ​ Here is an example with nc (netcat):
  
Line 261: Line 278:
  
  
- --- //Quinn Plattel 2010/10/13//+ --- //Quinn Plattel 2010/10/14// 
 + 
 +    * This method disables iscsid. I have detected (probably the same) problem with it under Maverick (2.6.35 kernel), but not under Lucid (2.6.32 kernel). iscsid fails to reestablish the iscsi session and fails with response status code 0201. The problem is: I need iscsid to attach more iscsi shares... any idea how to solve that issue? 
 + 
 + --- cinquero 
 + 
 +--- //Trip-G 2011/​1/​19//​ 
 +    * Quinn -  Simply add another iscsistart to the file /​etc/​initramfs-tools/​scripts/​local-top/​iscsi 
 +    * if your second target is on the same server all you need is the iqn 
 +    * like this: 
 +<​code>​ 
 + 
 +MYEXTRANAME="​iqn.numbers.com.whatever:​name:​something.videostorage.mac"​ 
 +        iscsistart \ 
 +        -i `cat /​sys/​firmware/​ibft/​initiator/​initiator-name` \ 
 +        -t ${MYEXTRANAME} \ 
 +        -a `cat /​sys/​firmware/​ibft/​target0/​ip-addr` \ 
 +        -g 1 
 +</​code>​ 
 +   
 +if you have relevant username password stuff you can add that too.  I added this after if [ -e /​sys/​firmware/​ibft/​target0/​target-name ]; then 
 + and before "​else"​ but you should be able to tag it on the end if you want. 
 + 
 +--- Trip-G

Navigation

* [[:start|Home]] * [[:about|About our Project]] * [[:download|Download]] * [[:screenshots|Screenshots]] * Documentation * [[:howtos|HowTo Guides]] * [[:appnotes|Application Notes]] * [[:faq:|FAQs]] * [[:doc|General Doc]] * [[:talks|Videos, Talks, and Papers]] * [[:hardwareissues|Hardware Issues]] * [[:mailinglists|Mailing lists]] * [[http://support.etherboot.org/|Bugtracker]] * [[:contributing|Contributing]] * [[:editing_permission|Wiki Edit Permission]] * [[:wiki:syntax|Wiki Syntax]] * [[:contact|Contact]] * [[:relatedlinks|Related Links]] * [[:commerciallinks|Commercial Links]] * [[:acknowledgements|Acknowledgements]] * [[:logos|Logo Art]]

QR Code
QR Code sanboot:ubuntu_iscsi2 (generated for current page)