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
Last revision Both sides next revision
sanboot:ubuntu_iscsi2 [2010/10/13 07:20]
qiet72 /etc/network/interfaces update
sanboot:ubuntu_iscsi2 [2011/01/13 14:36]
cinquero [Random Notes]
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 250: 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 263: 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

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