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:04]
qiet72 Update signature date
sanboot:ubuntu_iscsi2 [2011/01/13 14:36]
cinquero [Random Notes]
Line 61: Line 61:
 copy_exec /​sbin/​iscsistart /sbin copy_exec /​sbin/​iscsistart /sbin
  
-# Disable stuff than can affect the network interface +# Disable stuff that can affect the network interface 
-chmod -x /​usr/​lib/​pm-utils/​power.d/​disable_wol ​           # affects usb network adapters +if [ -x /​usr/​lib/​pm-utils/​power.d/​disable_wol ]; then 
-chmod -x /​sbin/​iscsid ​                                    ​# iscsid will interfere by re-discovering+   chmod -x /​usr/​lib/​pm-utils/​power.d/​disable_wol ​        ​# affects usb network adapters 
 +fi 
 +if [ -x /​sbin/​iscsid ]; then 
 +   chmod -x /​sbin/​iscsid ​                                 # iscsid will interfere by re-discovering 
 +fi
 if [ -e /​lib/​udev/​rules.d/​75-persistent-net-generator.rules ]; then if [ -e /​lib/​udev/​rules.d/​75-persistent-net-generator.rules ]; then
    rm /​etc/​udev/​rules.d/​70-persistent-net.rules ​          # prevent renaming of the network interfaces    rm /​etc/​udev/​rules.d/​70-persistent-net.rules ​          # prevent renaming of the network interfaces
Line 70: 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 115: 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 159: 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 244: 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 257: 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

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)