VectorLinux
October 25, 2014, 05:44:06 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: 1 2 3 [4]
  Print  
Author Topic: ethernet boot problem  (Read 14348 times)
scrambled_egg
Member
*
Posts: 10


« Reply #45 on: May 09, 2008, 03:27:16 am »

Hi Martin109,

It's me again..  re. the ps commands: yes you are right with your revised syntax, I was a little bit tired at that time.  Sorry for the inconvenience.

As for the network problem, well I'm pretty stumped as well.  Maybe you can record the output of "ifconfig" before and after you manually start the network.  From this you will know what good and bad outputs look like. Combine this with the BOOT_SCRIPTS_LOG approach in /etc/rc.d/functions-network especially on line 47 i.e. ifconfig $DEVICE >> $BOOT_SCRIPTS_LOG.  If this indicates that eth0 is being started but your manual invocation of ifconfig after boot up says otherwise then something in between is stopping it.

I see back up in the original part of this thread it was suggested to put the line "/etc/rc.d/rc.inet1 start" at the end of  /etc/rc.d/rc.local and it apparently worked.  This isn't a true fix but if it works then at least it's progress.

I hope we can make some progress on this as it seems like a very fundamental problem.

Kind Regards
Logged

VL5.9-STD-GOLD: PIII 1.050GHz 384MB-RAM: 80GB,40GB,6GB HDD
Martin109
Vectorite
***
Posts: 290


« Reply #46 on: May 09, 2008, 01:36:58 pm »

I see back up in the original part of this thread it was suggested to put the line "/etc/rc.d/rc.inet1 start" at the end of  /etc/rc.d/rc.local and it apparently worked.  This isn't a true fix but if it works then at least it's progress.

I had actually already done this, and it occurs to me that this may be the reason why there are several instances of /etc/rc.d/rc.inet1 being called with numerous parameters.

I have been attempting to follow your other suggestions.  Having studied a bit of C programming years ago, some of the stuff in the script files seems familiar, but I'm still unsure whether I've placed things at the right points in the files, so I've decided to quote all the relevant details here, even though it makes for a very long post:

First, the result of ifconfig before manually starting the internet:

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


And the output of ifconfig after manually starting the internet:

eth0      Link encap:Ethernet  HWaddr 00:60:08:DE:AC:B5 
          inet addr:192.168.0.3  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9 errors:0 dropped:0 overruns:0 carrier:1
          collisions:0 txqueuelen:1000
          RX bytes:1180 (1.1 KiB)  TX bytes:4780 (4.6 KiB)
          Interrupt:5 Base address:0x300

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:14 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:700 (700.0 b)  TX bytes:700 (700.0 b)


Next, I modified /etc/rc.d/functions-network thus:

Code:
#!/bin/sh
# This is a standard inet initialisation
# it supposed to to be sourced by inet0 .. inet9 script
# and also inetboot
#
# GNU GPL  (c) Eko M. Budi, 2004
#          (c) Vector Linux, 2004
#
BOOT_SCRIPTS_LOG=/var/log/boot_scripts.log
echo "functions-network: begin" >> $BOOT_SCRIPTS_LOG
echo "functions-network: called with parameter" $@ >> $BOOT_SCRIPTS_LOG
###########################################################
## The sourcer must set these settings
#DEVICE=eth0
#DHCP="no"
#IPADDR="192.168.1.1"
#NETMASK="255.255.255.0"
#GATEWAY="192.168.1.254"
#PROBE="no"

###########################################################
## The script

PATH="/sbin:/usr/sbin:/bin:/usr/bin"

start()
{
if [ "$DHCP" = "yes" ]; then
   ## DYNAMIC IP
   echo "Starting network ${DEVICE} using a DHCP server..."
   ## increase DELAY if using wireless
   if [ -x /etc/rc.d/rc.wireless ]; then
      DELAY=20
   else
      DELAY=10
   fi
   ## use HOSTNAME if available
   NETNAME=`cat /etc/HOSTNAME 2>/dev/null`
   if [ "$NETNAME" ]; then
     dhcpcd -t $DELAY -h ${NETNAME} -d $DEVICE
   else
     dhcpcd -t $DELAY -d $DEVICE
   fi
   if [ $? != 0 ]; then
      echo "FAILED"
      return 1
   fi
   # show the status
   ifconfig $DEVICE >> $BOOT_SCRIPTS_LOG
   return $?
else
   ## STATIC
   # Test IPADDR, if invalid, skip
   IPMASK=`ipmask $NETMASK $IPADDR`
   if [ ! $? = 0 ]; then
     echo "Invalid IP/NETMASK = $IPADDR/$NETMASK"
     return 1
   fi     
   BROADCAST=`echo $IPMASK | cut -d " " -f 1`
   NETWORK=`echo $IPMASK | cut -d " " -f 2`
 
   # Going up ..
   echo "Starting network ${DEVICE} as ${IPADDR}/${NETMASK}..."
   ifconfig ${DEVICE} ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
   if [ $? != 0 ]; then
      return 1
   fi
   
   # if PROBE is defined, try the gateway 3 times
   if [ "$GATEWAY" ]; then
     if [ "$PROBE" = "yes" ]; then
        echo "Probing the gateway $GATEWAY "
        for ii in 1 2 3; do
          sleep 1
          ping -c 1 -w $ii $GATEWAY > /dev/null
      if [ $? = 0 ]; then
            break;
          fi
          if [ $ii = 3 ]; then
            echo " FAILED !!!"
    echo Canceling network $DEVICE ...
    ifconfig $DEVICE down
    return 1
  fi
        done
     fi

     # set the default gateway if it is not defined yet
     route | grep -e "^default" &> /dev/null
     if [ $? != 0 ]; then
       echo "Setting up gateway $GATEWAY ..."
       route add default gw ${GATEWAY} netmask 0.0.0.0 $DEVICE
     fi
  fi
  return 0
fi

}
echo "functions-network: end" >> $BOOT_SCRIPTS_LOG
stop() {
   # stop the default gateway if it is ours
   current_gw=`route -n | grep -e "^0.0.0.0" | cut -f 2 -d ' '`
   if [ "$current_gw" = "$GATEWAY" ]; then
      echo "Deleting gateway $GATEWAY..."
      route del default
   fi
   # stop the interface
   echo "Stopping network $DEVICE ..."
   if [ "$DHCP" = "yes" ]; then
     dhcpcd -k $DEVICE
   else
     ifconfig $DEVICE down
   fi
}

status() {
   ifconfig $DEVICE >> $BOOT_SCRIPTS_LOG
}

case $1 in
start)
   start
   ;;
stop)
   stop
   ;;
restart)
   $0 stop
   sleep 1
   $0 start
   ;;
reload)
   ;;
status)
   status
   ;;
*)
   echo "Usage: $0 {start|stop|restart|reload|status}"
esac

Finally, the contents of /var/log/boot_scripts.log, after the above modifications, and retaining the previous modifications to /etc/rc.d/rc.inet1:

functions-network: begin
functions-network: called with parameter
functions-network: end
functions-network: begin
functions-network: called with parameter
functions-network: end
functions-network: begin
functions-network: called with parameter
functions-network: end
functions-network: begin
functions-network: called with parameter
functions-network: end
rc.inet1: begin
rc.inet1: called with parameter stop
functions-network: begin
functions-network: called with parameter stop
functions-network: end
rc.inet1: end
rc.inet1: begin
rc.inet1: called with parameter start
functions-network: begin
functions-network: called with parameter start
functions-network: end
eth0      Link encap:Ethernet  HWaddr 00:60:08:DE:AC:B5 
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:1180 (1.1 KiB)
          Interrupt:3 Base address:0x300

rc.inet1: end
rc.inet1: begin
rc.inet1: called with parameter start
functions-network: begin
functions-network: called with parameter start
functions-network: end
eth0      Link encap:Ethernet  HWaddr 00:60:08:DE:AC:B5 
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:2360 (2.3 KiB)
          Interrupt:3 Base address:0x300

rc.inet1: end


So I think we can now see more of the 'anatomy' of the system failing to start inet1.

Your thoughts would be most welcome.
Logged

Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard
Martin109
Vectorite
***
Posts: 290


« Reply #47 on: May 09, 2008, 11:14:30 pm »

Another thought occurs to me; could it be that my system is proving resistant to suggested fixes to this problem, whereas other users seem to have solved it, because the ethernet link is not direct into the laptop via a standard socket, but via a 3M PCMIA card and adapter?  (This is a card with a very slim socket connection, into which is plugged a short cable and unit, into which in turn the ethernet cable is plugged; there is also a socket on the adapter that looks like a TV aerial socket).

Could power to the adapter be being switched off, rather than the ethernet link itself?
Logged

Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard
scrambled_egg
Member
*
Posts: 10


« Reply #48 on: May 10, 2008, 01:04:58 am »

I don't know about any potential problem with the PCMCIA network card.  I'm still looking from the perspective of why the network starts from the command line but not from the script.  Looking at your results, the output of ifconfig when run from within /etc/rc.d/functions-network is definitely different to that run at the command line.  I have modified my functions-network script as follows:

Code:
#!/bin/sh
# This is a standard inet initialisation
# it supposed to to be sourced by inet0 .. inet9 script
# and also inetboot
#
# GNU GPL  (c) Eko M. Budi, 2004
#          (c) Vector Linux, 2004
#

###########################################################
## The sourcer must set these settings
#DEVICE=eth0
#DHCP="no"
#IPADDR="192.168.1.1"
#NETMASK="255.255.255.0"
#GATEWAY="192.168.1.254"
#PROBE="no"

###########################################################
## The script

PATH="/sbin:/usr/sbin:/bin:/usr/bin"

BOOT_SCRIPTS_LOG=/var/log/boot_scripts.log
echo "functions-network: begin" >> $BOOT_SCRIPTS_LOG
echo "functions-network: called with parameter" $@ >> $BOOT_SCRIPTS_LOG

start()
{
if [ "$DHCP" = "yes" ]; then
   ## DYNAMIC IP
   echo "functions-network: Starting network ${DEVICE} using a DHCP server..." >> $BOOT_SCRIPTS_LOG
   echo "Starting network ${DEVICE} using a DHCP server..."
   ## increase DELAY if using wireless
   if [ -x /etc/rc.d/rc.wireless ]; then
      DELAY=20
   else
      DELAY=10
   fi
   ## use HOSTNAME if available
   NETNAME=`cat /etc/HOSTNAME 2>/dev/null`
   if [ "$NETNAME" ]; then
     echo "functions-network: dhcpcd -t $DELAY -h ${NETNAME} -d $DEVICE" >> $BOOT_SCRIPTS_LOG
     dhcpcd -t $DELAY -h ${NETNAME} -d $DEVICE
   else
     echo "functions-network: dhcpcd -t $DELAY -d $DEVICE" >> $BOOT_SCRIPTS_LOG
     dhcpcd -t $DELAY -d $DEVICE
   fi
   if [ $? != 0 ]; then
      echo "functions-network: dhcpcd FAILED" >> $BOOT_SCRIPTS_LOG
      echo "FAILED"
      return 1
   fi
   # show the status
   ifconfig $DEVICE >> $BOOT_SCRIPTS_LOG
   return $?
else
   ## STATIC
   # Test IPADDR, if invalid, skip
   IPMASK=`ipmask $NETMASK $IPADDR`
   if [ ! $? = 0 ]; then
     echo "Invalid IP/NETMASK = $IPADDR/$NETMASK"
     return 1
   fi     
   BROADCAST=`echo $IPMASK | cut -d " " -f 1`
   NETWORK=`echo $IPMASK | cut -d " " -f 2`
 
   # Going up ..
   echo "Starting network ${DEVICE} as ${IPADDR}/${NETMASK}..."
   ifconfig ${DEVICE} ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
   if [ $? != 0 ]; then
      return 1
   fi
   
   # if PROBE is defined, try the gateway 3 times
   if [ "$GATEWAY" ]; then
     if [ "$PROBE" = "yes" ]; then
        echo "Probing the gateway $GATEWAY "
        for ii in 1 2 3; do
          sleep 1
          ping -c 1 -w $ii $GATEWAY > /dev/null
      if [ $? = 0 ]; then
            break;
          fi
          if [ $ii = 3 ]; then
            echo " FAILED !!!"
    echo Canceling network $DEVICE ...
    ifconfig $DEVICE down
    return 1
  fi
        done
     fi

     # set the default gateway if it is not defined yet
     route | grep -e "^default" &> /dev/null
     if [ $? != 0 ]; then
       echo "Setting up gateway $GATEWAY ..."
       route add default gw ${GATEWAY} netmask 0.0.0.0 $DEVICE
     fi
  fi
  return 0
fi

}

stop() {
   # stop the default gateway if it is ours
   current_gw=`route -n | grep -e "^0.0.0.0" | cut -f 2 -d ' '`
   if [ "$current_gw" = "$GATEWAY" ]; then
      echo "Deleting gateway $GATEWAY..."
      route del default
   fi
   # stop the interface
   echo "Stopping network $DEVICE ..."
   if [ "$DHCP" = "yes" ]; then
     dhcpcd -k $DEVICE
   else
     ifconfig $DEVICE down
   fi
}

status() {
   ifconfig $DEVICE
}

case $1 in
start)
   start
   ;;
stop)
   stop
   ;;
restart)
   $0 stop
   sleep 1
   $0 start
   ;;
reload)
   ;;
status)
   status
   ;;
*)
   echo "Usage: $0 {start|stop|restart|reload|status}"
esac

echo "functions-network: end" >> $BOOT_SCRIPTS_LOG


The output of /var/log/boot_scripts.log:

Code:
rc.M: begin
rc.inet1: begin
rc.inet1: called with parameter start
functions-network: begin
functions-network: called with parameter start
functions-network: Starting network eth0 using a DHCP server...
functions-network: dhcpcd -t 10 -h cwl.littlefield.net -d eth0
eth0      Link encap:Ethernet  HWaddr 00:06:29:75:78:4D 
          inet addr:192.168.1.104  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:684 (684.0 b)  TX bytes:1240 (1.2 KiB)
          Interrupt:11

functions-network: end
rc.inet1: end
rc.M: end
rc.vlinit: begin
rc.vlinit: Going to runlevel 4
rc.vlinit: Starting services of runlevel 4
rc.vlinit: Starting ifplugd ...
rc.vlinit: Starting inetd ...
rc.vlinit: Starting ntpd ...
rc.vlinit: Starting firewall ...
rc.vlinit: end
rc.local: begin
rc.local: start ntp client
rc.local: setting numlock on in consoles
rc.local: end
rc.X: begin
rc.X: Tell the viewers what's going to happen...
rc.X: Anti quick spawning
rc.X: launch a login manager
rc.X: KDE Display Manager


The part of most interest is the parameters in the call to dhcpcd and the resultant output of ifconfig.
Logged

VL5.9-STD-GOLD: PIII 1.050GHz 384MB-RAM: 80GB,40GB,6GB HDD
Martin109
Vectorite
***
Posts: 290


« Reply #49 on: May 11, 2008, 02:55:49 pm »

Thanks, Scrambled Egg!

I have modified my functions-network file to mirror yours:

Code:
#!/bin/sh
# This is a standard inet initialisation
# it supposed to to be sourced by inet0 .. inet9 script
# and also inetboot
#
# GNU GPL  (c) Eko M. Budi, 2004
#          (c) Vector Linux, 2004
#

###########################################################
## The sourcer must set these settings
#DEVICE=eth0
#DHCP="no"
#IPADDR="192.168.1.1"
#NETMASK="255.255.255.0"
#GATEWAY="192.168.1.254"
#PROBE="no"

###########################################################
## The script

PATH="/sbin:/usr/sbin:/bin:/usr/bin"

BOOT_SCRIPTS_LOG=/var/log/boot_scripts.log
echo "functions-network: begin" >> $BOOT_SCRIPTS_LOG
echo "functions-network: called with parameter" $@ >> $BOOT_SCRIPTS_LOG

start()
{
if [ "$DHCP" = "yes" ]; then
   ## DYNAMIC IP
   echo "functions-network: Starting network ${DEVICE} using a DHCP server..." >> $BOOT_SCRIPTS_LOG
   echo "Starting network ${DEVICE} using a DHCP server..."
   ## increase DELAY if using wireless
   if [ -x /etc/rc.d/rc.wireless ]; then
      DELAY=20
   else
      DELAY=10
   fi
   ## use HOSTNAME if available
   NETNAME=`cat /etc/HOSTNAME 2>/dev/null`
   if [ "$NETNAME" ]; then
     echo "functions-network: dhcpcd -t $DELAY -h ${NETNAME} -d $DEVICE" >> $BOOT_SCRIPTS_LOG
     dhcpcd -t $DELAY -h ${NETNAME} -d $DEVICE
   else
     echo "functions-network: dhcpcd -t $DELAY -d $DEVICE">> $BOOT_SCRIPTS_LOG
     dhcpcd -t $DELAY -d $DEVICE
   fi
   if [ $? != 0 ]; then
      echo "functions-network: dhcpcd FAILED" >> $BOOT_SCRIPTS_LOG
      echo "FAILED"
      return 1
   fi
   # show the status
   ifconfig $DEVICE >> $BOOT_SCRIPTS_LOG
   return $?
else
   ## STATIC
   # Test IPADDR, if invalid, skip
   IPMASK=`ipmask $NETMASK $IPADDR`
   if [ ! $? = 0 ]; then
     echo "Invalid IP/NETMASK = $IPADDR/$NETMASK"
     return 1
   fi     
   BROADCAST=`echo $IPMASK | cut -d " " -f 1`
   NETWORK=`echo $IPMASK | cut -d " " -f 2`
 
   # Going up ..
   echo "Starting network ${DEVICE} as ${IPADDR}/${NETMASK}..."
   ifconfig ${DEVICE} ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
   if [ $? != 0 ]; then
      return 1
   fi
   
   # if PROBE is defined, try the gateway 3 times
   if [ "$GATEWAY" ]; then
     if [ "$PROBE" = "yes" ]; then
        echo "Probing the gateway $GATEWAY "
        for ii in 1 2 3; do
          sleep 1
          ping -c 1 -w $ii $GATEWAY > /dev/null
      if [ $? = 0 ]; then
            break;
          fi
          if [ $ii = 3 ]; then
            echo " FAILED !!!"
    echo Canceling network $DEVICE ...
    ifconfig $DEVICE down
    return 1
  fi
        done
     fi

     # set the default gateway if it is not defined yet
     route | grep -e "^default" &> /dev/null
     if [ $? != 0 ]; then
       echo "Setting up gateway $GATEWAY ..."
       route add default gw ${GATEWAY} netmask 0.0.0.0 $DEVICE
     fi
  fi
  return 0
fi

}

stop() {
   # stop the default gateway if it is ours
   current_gw=`route -n | grep -e "^0.0.0.0" | cut -f 2 -d ' '`
   if [ "$current_gw" = "$GATEWAY" ]; then
      echo "Deleting gateway $GATEWAY..."
      route del default
   fi
   # stop the interface
   echo "Stopping network $DEVICE ..."
   if [ "$DHCP" = "yes" ]; then
     dhcpcd -k $DEVICE
   else
     ifconfig $DEVICE down
   fi
}

status() {
   ifconfig $DEVICE
}

case $1 in
start)
   start
   ;;
stop)
   stop
   ;;
restart)
   $0 stop
   sleep 1
   $0 start
   ;;
reload)
   ;;
status)
   status
   ;;
*)
   echo "Usage: $0 {start|stop|restart|reload|status}"
esac

echo "functions-network: end" >> $BOOT_SCRIPTS_LOG

I deleted my old boot-scripts.log file, to start with a clean slate, and rebooted the system.

The system is behaving in the same way, in that it is failing to start inet1.

The output of boot_scripts.log is show below:

Code:
rc.inet1: begin
rc.inet1: called with parameter stop
functions-network: begin
functions-network: called with parameter stop
functions-network: end
rc.inet1: end
rc.inet1: begin
rc.inet1: called with parameter stop
functions-network: begin
functions-network: called with parameter stop
functions-network: end
rc.inet1: end
rc.inet1: begin
rc.inet1: called with parameter start
functions-network: begin
functions-network: called with parameter start
functions-network: Starting network eth0 using a DHCP server...
functions-network: dhcpcd -t 10 -h vector.linux.net -d eth0
eth0      Link encap:Ethernet  HWaddr 00:60:08:DE:AC:B5 
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:1180 (1.1 KiB)
          Interrupt:5 Base address:0x300

functions-network: end
rc.inet1: end
rc.inet1: begin
rc.inet1: called with parameter start
functions-network: begin
functions-network: called with parameter start
functions-network: Starting network eth0 using a DHCP server...
functions-network: dhcpcd -t 10 -h vector.linux.net -d eth0
eth0      Link encap:Ethernet  HWaddr 00:60:08:DE:AC:B5 
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:2360 (2.3 KiB)
          Interrupt:5 Base address:0x300

functions-network: end
rc.inet1: end
rc.inet1: begin
rc.inet1: called with parameter start
functions-network: begin
functions-network: called with parameter start
functions-network: Starting network eth0 using a DHCP server...
functions-network: dhcpcd -t 10 -h vector.linux.net -d eth0
eth0      Link encap:Ethernet  HWaddr 00:60:08:DE:AC:B5 
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:1
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:3540 (3.4 KiB)
          Interrupt:5 Base address:0x300

functions-network: end
rc.inet1: end
rc.inet1: begin
rc.inet1: called with parameter start
functions-network: begin
functions-network: called with parameter start
functions-network: Starting network eth0 using a DHCP server...
functions-network: dhcpcd -t 10 -h vector.linux.net -d eth0
eth0      Link encap:Ethernet  HWaddr 00:60:08:DE:AC:B5 
          inet addr:192.168.0.3  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9 errors:0 dropped:0 overruns:0 carrier:1
          collisions:0 txqueuelen:1000
          RX bytes:1180 (1.1 KiB)  TX bytes:4780 (4.6 KiB)
          Interrupt:5 Base address:0x300

functions-network: end
rc.inet1: end

It appears that it's being called 5 times without success.  Then the final call is successful, but obviously gets killed somewhere else.

My /var/log/boot_scripts.log file does not echo the activity of my rc.M script.  Perhaps you'd let me know how you modified yours.
Logged

Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard
Martin109
Vectorite
***
Posts: 290


« Reply #50 on: May 17, 2008, 07:24:40 am »

I have done a bit more work; I have given rc.M the boot_scripts.log treatment.  Below is the file boot_scripts.log after booting the system.  It's puzzling that there seems to be a reference to rc.M ending, but not beginning, in the first section of boot_scripts.log.

I think I'm right in saying that rc.inet1 is calling functions-network with parameter start, but this attempt to start inet1 is unsuccessful, as inet1 is not ready to be started.

Code:
rc.inet1: begin
rc.inet1: called with parameter stop
functions-network: begin
functions-network: called with parameter stop
functions-network: end
rc.inet1: end
rc.M: end
rc.M: begin
rc.inet1: begin
rc.inet1: called with parameter start
functions-network: begin
functions-network: called with parameter start
functions-network: Starting network eth0 using a DHCP server...
functions-network: dhcpcd -t 10 -h vector.linux.net -d eth0
eth0      Link encap:Ethernet  HWaddr 00:60:08:DE:AC:B5 
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:1180 (1.1 KiB)
          Interrupt:3 Base address:0x300

functions-network: end
rc.inet1: end
rc.M: network section called with parameter 1
rc.M: end
rc.inet1: begin
rc.inet1: called with parameter start
functions-network: begin
functions-network: called with parameter start
functions-network: Starting network eth0 using a DHCP server...
functions-network: dhcpcd -t 10 -h vector.linux.net -d eth0
eth0      Link encap:Ethernet  HWaddr 00:60:08:DE:AC:B5 
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:2360 (2.3 KiB)
          Interrupt:3 Base address:0x300

functions-network: end
rc.inet1: end

Has anyone got any more ideas? Undecided
Logged

Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard
scrambled_egg
Member
*
Posts: 10


« Reply #51 on: May 17, 2008, 11:22:06 pm »

Here's some more places to look for some clues to what's going on:

In /var/log/boot.log:

Initializing network
Setting up localhost ...[  OK  ]
Setting up basic network ...[  OK  ]
Setting up route ...[  OK  ]
Setting up firewall ...[  OK  ]

In /var/log/messages towards the end of the file (most recent entries) look for:

May 18 08:15:07 cwl kernel: eth0: OEM i82557/i82558 10/100 Ethernet, 00:06:29:75:78:4D, IRQ 11.
May 18 08:15:07 cwl kernel:   Receiver lock-up bug exists -- enabling work-around.
May 18 08:15:07 cwl kernel:   Board assembly 000001-000, Physical connectors present: RJ45
May 18 08:15:07 cwl kernel:   Primary interface chip i82555 PHY #1.
May 18 08:15:07 cwl kernel:   General self-test: passed.
May 18 08:15:07 cwl kernel:   Serial sub-system self-test: passed.
May 18 08:15:07 cwl kernel:   Internal registers self-test: passed.
May 18 08:15:07 cwl kernel:   ROM checksum self-test: passed (0x24c9f043).
May 18 08:15:07 cwl kernel:   Receiver lock-up workaround activated

Also  in  /var/log/messages:

May 18 17:07:55 cwl ifplugd(eth0)[8883]: ifplugd 0.28 initializing.
May 18 17:07:55 cwl ifplugd(eth0)[8883]: Using interface eth0/00:06:29:75:78:4D with driver <eepro100> (version: eepro100.c:v1.09j-t 9/29/99 Don)
May 18 17:07:55 cwl ifplugd(eth0)[8883]: Using detection mode: SIOCETHTOOL
May 18 17:07:55 cwl ifplugd(eth0)[8883]: Initialization complete, link beat detected.
May 18 17:07:55 cwl ifplugd(eth0)[8883]: Executing '/etc/ifplugd/ifplugd.action eth0 up'.
May 18 17:07:55 cwl ifplugd.action: ifplugd.action says: checking out rc.inet1 ...
May 18 17:07:55 cwl ifplugd.action: ifplugd.action says: rc.inet1 is executable ...
May 18 17:07:55 cwl ifplugd.action: ifplugd.action says: Mr. grep found eth0 in rc.inet1, bringing it up ...
May 18 17:07:55 cwl ifplugd(eth0)[8883]: Program executed successfully.

Have a look in /var/log/syslog  for any output from dhcpcd.  According to the man page the -d option enables logging in syslog and this option is part of the script.  My syslog doesn't show anything from dhcpcd but maybe that's because everything seems to be working.

For your information this is my modified /etc/rc.d/rc.M

Code:
#!/bin/sh
# rc.M
# This file is executed by init(8) when the system is being initialized
# for one of the "multi user" run levels (i.e. levels 2 through 5).
#
# Origin: this script is a mix of rc.S, rc.M and rc.inet2 from Slackware 10.0
#
# GNU GPL (c) Eko M. Budi, 2004
#         (c) Vector Linux, 2004, Uel Archuletta(bootsplash-text)-2006
#

BOOT_SCRIPTS_LOG=/var/log/boot_scripts.log

echo "rc.M: begin" >> $BOOT_SCRIPTS_LOG

# load functions
. /etc/rc.d/functions-display

PATH="/bin:/sbin:/usr/bin:/usr/sbin:$PATH"


# Tell the viewers what's going to happen.
/etc/rc.d/rc.text 12 'Going multiuser...'
echocl "rc.M ==> Going multiuser..." yellow

## Turn ON system logger first
if [ -x /etc/rc.d/rc.syslog ]; then
 /etc/rc.d/rc.text 13 'Starting system logger'
  echonl "Starting system logger ..."
  /etc/rc.d/rc.syslog start > /dev/null 2>&1
  evaluate_retvall
fi

## Hardware initialisation
echocl "Initializing hardware" cyan
for RC in modules pnp serial parallel alsa cdrom samba dbus policykit hal; do
   if [ -x /etc/rc.d/rc.$RC ]; then
      /etc/rc.d/rc.text 14 "Setting up $RC..."
      echonl "Setting up $RC ..."
      /etc/rc.d/rc.$RC start > /dev/null 2>&1
      evaluate_retvall
   fi
done

for RC in apm; do
   if [ -x /etc/rc.d/rc.$RC ]; then
      /etc/rc.d/rc.text 15 "Setting up $RC ..."
      echonl "Setting up $RC ..."
      /etc/rc.d/rc.$RC start > /dev/null 2>&1
      evaluate_retvall
   fi
done

## Setup basic networking
## Note for slackers: this replaces rc.inet1
## On Vector rc.inet? = individual network device
/etc/rc.d/rc.text 16 ' Initializing Network'
echocl "Initializing network" cyan

## Start Paranoid firewall
if [ -x /etc/rc.d/rc.paranoid ]; then
  /etc/rc.d/rc.text 16 'Closing up the holes ...'
  echonl "Closing up the holes ..."
  /etc/rc.d/rc.paranoid start > /dev/null 2>&1
  evaluate_retvall
fi

## Set hostname & name server

if grep -qe " *(hostname|dns)=" /proc/cmdline; then
  if [ -x /etc/rc.d/rc.boot-name ]; then
    /etc/rc.d/rc.text 17 'Setting name from boot parameters ...'
    echonl "Setting name from boot parameters ..."
    /etc/rc.d/rc.boot-name start > /dev/null 2>&1
    evaluate_retvall
  fi
fi

## Local host is always ON for multiuser mode
## So I hardcoded it here
 /etc/rc.d/rc.text 17 'Setting up localhost ...'
echonl "Setting up localhost ..."
ifconfig lo 127.0.0.1 netmask 255.0.0.0 && \
  route add -net 127.0.0.0 netmask 255.0.0.0 lo > /dev/null 2>&1
evaluate_retvall

## set other networks
## Start network using boot parameter or the default inet script
## Boot parameter is useful for UML, e.g. you may boot linux with
## linux inet1=eth0,dhcp
## linux inet1=eth0,{IP},{NETMASK},{GATEWAY}
for i in 0 1 2 3 4; do
 if [ -x /etc/rc.d/rc.inet$i ]; then
   /etc/rc.d/rc.text 17 'Setting up basic network ...'
   echonl "Setting up basic network ..."
   /etc/rc.d/rc.inet$i start
   evaluate_retvall
 fi
 if [ -x /etc/rc.d/rc.eth$i ]; then
   /etc/rc.d/rc.text 17 "Starting eth$i"
   echonl "Setting up basic network ..."
   /etc/rc.d/rc.eth$i start
   evaluate_retvall
 fi
done

## routing, gateway and firewall
## rc.route = custom routing
## rc.firewall = custom firewall
## ip_forward = enable forwarding, if not in the firewall
for RC in route firewall; do
   if [ -x /etc/rc.d/rc.$RC ]; then
      /etc/rc.d/rc.text 18 "Setting up $RC ..."
      echonl "Setting up $RC ..."
      /etc/rc.d/rc.$RC start > /dev/null 2>&1
      evaluate_retvall
   fi
done

## at this point, we are ready to talk to The World...
## Here comes the Network file system
## Note for slackers: this is taken from rc.inet2

NFSTAB=`grep -E "^[^#].*[[:space:]].*[[:space:]](nfs|smbfs|ncpfs)[[:space:]]" /etc/fstab`
if [ "$NFSTAB" ]; then
  echocl "Mounting network file system ..." cyan
  if echo $NFSTAB | grep -qw nfs; then
    # Start the RPC portmapper if we find NFS volumes defined in /etc/fstab.
    if ! /usr/sbin/rpcinfo -p 1> /dev/null 2> /dev/null ; then
      if [ -x /sbin/rpc.portmap ]; then
        /etc/rc.d/rc.text 19 'Starting RPC portmapper ...'
        echonl "Starting RPC portmapper ..."
        /sbin/rpc.portmap > /dev/null 2&>1
evaluate_retvall
      fi
    fi
    /etc/rc.d/rc.text 19 'Mounting remote (NFS) file systems...'
    echonl "Mounting remote (NFS) file systems ..."
    /sbin/mount -a -t nfs  > /dev/null 2&>1
    evaluate_retvall
  fi

  if echo $NFSTAB | grep -qE "[[:space:]](smbfs|ncpfs)[[:space:]]"; then
    /etc/rc.d/rc.text 19 'Mounting remote (SMB/NCP) file systems'
    echonl "Mounting remote (SMB/NCP) file systems ..."
    /sbin/mount -a -t smbfs,ncpfs > /dev/null 2&>1
    evaluate_retvall
  fi

  ## If the new mounted FS is /tmp or /var, reset the file system again
  mount | while read LINE; do
     fsystem=`echo $LINE | cut -f5 -d ' '`
     case $fsystem in nfs|smbfs|ncpfs)
       mpoint=`echo $LINE | cut -f3 -d ' '`
       case $mpoint in
         /tmp|/tmp/*)
    rm -f /tmp/.X*lock /tmp/core /tmp/menu* /tmp/reply* /tmp/vasm.log
    [ -r /tmp/hunt -o -r /tmp/hunt.stats ] && rm -f /tmp/hunt*
    mkdir -p /tmp/.ICE-unix /tmp/.X11-unix
    chmod 1777 /tmp /tmp/.ICE-unix /tmp/.X11-unix
    ;;
/var|/var/*)
    rm -f /var/run/utmp /var/run/*pid /var/run/lpd* /var/run/ppp* /var/run/usb/* \
    /var/lock/* /var/lock/usb/* /var/spool/uucp/LCK..*
    touch /var/run/utmp
    chown root.utmp /var/run/utmp
    chmod 664 /var/run/utmp
    /etc/rc.d/rc.syslog restart
    ;;
/usr|/usr/*|/opt|/opt/*)
    ## Updating libraries
    ldconfig
           ;;
       esac
     esac
  done
fi

# Set console and X fonts
# setfont &> /dev/null
if [ -x /usr/X11R6/bin/fc-cache ]; then
    /etc/rc.d/rc.text 19 'Caching fonts ...'
    echonl "Caching fonts ..."
    /usr/X11R6/bin/fc-cache &> /dev/null
    evaluate_retvall
fi

#load vcpufreq if it is set in its config
/sbin/vcpufreq-load

#mount all filesystems in fstab
mount -a 2>/dev/null

###uncomment next 3 lines for nice console background
#for i in 1 2 3 4 5 6 ; do
# splash -s -u $i /etc/bootsplash/themes/current/config/verbose-`fbresolution 2>/dev/null`.cfg 2>/dev/null
#done

/etc/rc.d/rc.text 19 'Starting the System'

echo "rc.M: end" >> $BOOT_SCRIPTS_LOG


This is a  learning process for me too.  I'm a relative newbie as well and researching and experimenting as I go.
Logged

VL5.9-STD-GOLD: PIII 1.050GHz 384MB-RAM: 80GB,40GB,6GB HDD
Martin109
Vectorite
***
Posts: 290


« Reply #52 on: May 18, 2008, 10:10:35 am »

Thanks for sticking with this, scrambled_egg!

I've looked in /var/log/boot.log and found:

Initializing network
Setting up localhost ...[  OK  ]
Setting up basic network ...[  OK  ]
Setting up route ...[  OK  ]
Setting up firewall ...[  OK  ]


Looking in /var/log/messages brings up the following:

May 18 17:14:16 vector kernel: eth0: 3Com 3c589, io 0x300, irq 5, hw_addr 00:60:08:DE:AC:B5
May 18 17:14:16 vector kernel:   8K FIFO split 5:3 Rx:Tx, auto xcvr
May 18 17:14:16 vector kernel: es1968: clocking to 48000
May 18 17:14:19 vector kernel: powernow: This module only works with AMD K7 CPUs
May 18 17:14:19 vector kernel: parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE]
May 18 17:14:19 vector kernel: parport0: irq 7 detected
May 18 17:14:20 vector kernel: parport0: Printer, EPSON Stylus Photo 890
May 18 17:14:20 vector kernel: lp0: using parport0 (polling).
May 18 17:14:20 vector kernel: lp0: console ready
May 18 17:14:25 vector kernel: eth0: flipped to 10base2
May 18 17:14:36 vector vcpufreq-load: vcpufreq-load disabled in config...
May 18 17:14:42 vector /usr/sbin/gpm[3445]: *** info [startup.c(95)]:
May 18 17:14:42 vector /usr/sbin/gpm[3445]: Started gpm successfully. Entered daemon mode.
May 18 17:14:44 vector kernel: eth0: flipped to 10base2
May 18 17:17:37 vector sudo:   martin : TTY=unknown ; PWD=/home/martin ; USER=root ; COMMAND=/usr/libexec/xfsm-shutdown-helper
May 18 17:17:53 vector ifplugd(eth0)[3610]: ifplugd 0.28 initializing.
May 18 17:17:53 vector ifplugd(eth0)[3610]: Using interface eth0/00:60:08:DE:AC:B5 with driver <3c589_cs> (version: 1.162-ac)
May 18 17:17:53 vector ifplugd(eth0)[3610]: Using detection mode: IFF_RUNNING
May 18 17:17:53 vector ifplugd(eth0)[3610]: Initialization complete, link beat detected.
May 18 17:17:53 vector ifplugd(eth0)[3610]: Executing '/etc/ifplugd/ifplugd.action eth0 up'.
May 18 17:17:53 vector ifplugd.action: ifplugd.action says: checking out rc.inet1 ...
May 18 17:17:53 vector ifplugd.action: ifplugd.action says: rc.inet1 is executable ...
May 18 17:17:53 vector ifplugd.action: ifplugd.action says: Mr. grep found eth0 in rc.inet1, bringing it up ...
May 18 17:17:55 vector kernel: eth0: flipped to 10base2
May 18 17:18:03 vector ifplugd(eth0)[3610]: Program executed successfully.
May 18 17:18:05 vector kernel: eth0: flipped to 10base2
May 18 17:18:47 vector kernel: eth0: coax cable problem
May 18 17:19:04 vector kernel: eth0: flipped to 10baseT
May 18 17:19:18 vector kernel: eth0: flipped to 10baseT
May 18 17:34:16 vector -- MARK --

And looking in /var/log/syslog, dhcpcd is referenced.  I think the references to 'ifplugd' (both above and below) are because that's the first part of how I get the inet connection to work; I come out of xfce, change to su, and type ifplugd.  I've learned that eventually the light on my 3Com adapter comes on (it may take a while) and I believe this is 'link beat detection'(?).  Once the light comes on, I type '/etc/rc.d/rc.inet1 start', and I can talk to the world.

May 18 17:14:33 vector dhcpcd[2516]: timed out waiting for a valid DHCP server response
May 18 17:14:33 vector kernel: ip_tables: (C) 2000-2006 Netfilter Core Team
May 18 17:14:34 vector kernel: ip_conntrack version 2.4 (1535 buckets, 12280 max) - 224 bytes per conntrack
May 18 17:14:52 vector dhcpcd[3458]: timed out waiting for a valid DHCP server response
May 18 17:17:53 vector ifplugd(eth0)[3610]: client: Starting network eth0 using a DHCP server...
May 18 17:18:03 vector dhcpcd[3619]: timed out waiting for a valid DHCP server response
May 18 17:18:03 vector ifplugd(eth0)[3610]: client: dhcpcd: MAC address = 00:60:08:de:ac:b5


My modification of rc.M is very similar to yours, except that I added the line:
Code:
echo "rc.M: network section called with parameter $i" >> $BOOT_SCRIPTS_LOG
at line 95 to see what that section was doing.

I'm finding it very difficult to establish what parts of the various reports (boot.log, messages, syslog) are resulting from which actions on my part, and which scripts.  It strikes me as a very ad hoc system, that's obviously been added to over a period of time, and is therefore difficult to analyse or debug.  Perhaps my level of understanding of it is so low because I'm just beginning to learn.

Was your system working fine from the outset, or did you also have to experiment to get it to work properly?
Logged

Compaq Armada E500, i686 Pentium III, 512Mb RAM, 3.2 Gb HDD, running Vector Linux 5.9 Standard

Fujitsu Lifebook, i686 Pentium M, 1.7 GHz, 1028Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard

Compaq Evo, i686 Pentium M, 1.4 GHz, 512Mb RAM, 40 Gb HDD, running Vector Linux 6.0 Standard
Pages: 1 2 3 [4]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!