VectorLinux

The nuts and bolts => Networking & Security => Topic started by: mick12345678 on July 11, 2007, 01:40:50 pm

Title: ethernet boot problem
Post by: mick12345678 on July 11, 2007, 01:40:50 pm
To get my ethernet card working, I have to manually force an ip address using VASM (static or dhcp - both seem to work). When I reboot, however, all that is lost and I have to start all over again.

I found an old post that seemed to say the answer was to edit rc.inet1, so I did :

Quote
root:# cat rc.inet1

#!/bin/sh
# This file is supposed to be created by vnetadd
# and modified by vnetset.
# You can modify it by hand, but be careful ;-)
#
# GNU GPL  (c) Eko M. Budi, 2004
#          (c) Vector Linux, 2004
#

###########################################################
## The settings
DEVICE='eth0'
DHCP='no'
IPADDR='192.168.1.77'
NETMASK='255.255.255.0'
GATEWAY='192.168.1.254'
PROBE='no'

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

## You may make customized script here
## If not, source the standard network
. /etc/rc.d/functions-network "$@"

However, this file seems to be ignored on bootup (ifconfig showed no ip address allocated), so, once again, I had to resort to VASM.

The I found that VASM gives you the option to create "inet" files which will automatically execute on startup. So I created one of those with all the desired attributes and rebooted - same result !

What am I doing wrong ?

Title: Re: ethernet boot prolem
Post by: rbistolfi on July 11, 2007, 03:05:29 pm
May be they are not setted as executable for some reason?
Title: Re: ethernet boot prolem
Post by: mick12345678 on July 12, 2007, 02:48:19 pm
Thanks for the suggestion. I tried chmodding the one inet file that didnt have executable all the way through but this made no difference.
Then I found this http://www.slackware.com/config/network.php (http://www.slackware.com/config/network.php), and so I ran netconfig. All seemed to go well, but after reboot still no joy.
Worse - now my manual fix no longer works so I have no Internet access from the VL PC at all  :(
Anyone got any ideas ?
In /etc/rc.d I now have rc.inet1.conf, rc.inet1 and rc.inet2 (the last 2 have identical contents).
Title: Re: ethernet boot prolem
Post by: uelsk8s on July 12, 2007, 02:53:53 pm
what version of VL are you using

does the contents of rc.inet1 match what you posted above still?
Title: Re: ethernet boot prolem
Post by: mick12345678 on July 13, 2007, 03:34:45 am
I am running VL 5.8 Standard.

Heres my ifconfig output

Quote

eth0      Link encap:Ethernet  HWaddr 00:01:40:00:01:00
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:77 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5249 (5.1 KiB)  TX bytes:0 (0.0 b)
          Interrupt:11 Base address:0xc800

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)

heres what I have in the way of "inets"

Quote
linux://etc/rc.d
root:# ls -lat rc.inet*
-rw-r--r-- 1 root root 3544 2007-07-12 22:40 rc.inet1.conf
-rwxr-xr-x 1 root root  474 2007-07-12 22:37 rc.inet1*
-rw-rw-rw- 1 root root  474 2007-07-12 22:27 rc.inet2

Heres my rc.inet1.conf :

Quote
root:# cat rc.inet1.conf
! comments removed
# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""

# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""

# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""

# Config information for eth3:
IPADDR[3]=""
NETMASK[3]=""
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""

# Default gateway IP address:
GATEWAY=""

# Change this to "yes" for debugging output to stdout.  Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="yes"
!comments removed

and heres the other two (they're identical)
Quote
root:# cat rc.inet1
#!comments removed
## The settings
DEVICE=eth0
DHCP=yes
IPADDR=
NETMASK=
GATEWAY=
PROBE=no

## The script
## source the standard functions
. /etc/rc.d/functions-network "$@"

root:# cat rc.inet2
#!comments removed
## The settings
DEVICE=eth0
DHCP=yes
IPADDR=
NETMASK=
GATEWAY=
PROBE=no

## The script
## source the standard functions
. /etc/rc.d/functions-network "$@"

I only have one ethernet card installed, so am I right that the system will call it eth0 and try to use etho by default ?
Title: Re: ethernet boot problem
Post by: mick12345678 on July 13, 2007, 05:06:04 am
I'm really floundering about here  :o

Did an AUTOSETUP from text mode and discovered that INETD hadn't been running, so I included that this time. Upon reboot, however, things look worse : ifconfig now only shows the loopback interface !
Tried VASM again, but no result.

Tried "ifconfig eth0 <addr> netmask <mask>" and that worked - i.e. etho now shows up if I do "ifconfig".

The inet1 file now looks weird - it has the loopback address inserted for etho. So I manually edit that so that inet1 looks right & reboot. Now go into VASM and get it to "start" inet1. This gives me a VASM error
"starting inet1 failed"..
Title: Re: ethernet boot problem
Post by: uelsk8s on July 13, 2007, 05:58:46 am
do you have the ifplugd service starting at boot?
you can safely remove rc.inet2
try running "/etc/rc.d/rc.inet1 start" from the CL and see what you get
Title: Re: ethernet boot problem
Post by: mick12345678 on July 13, 2007, 07:52:09 am
Thanks for the help so far  :)

Quote
do you have the ifplugd service starting at boot?
"ps -A" doesn't show it, so looks like "no". Should I ? How do I enable it ?

Quote
you can safely remove rc.inet2
done.

Quote
try running "/etc/rc.d/rc.inet1 start" from the CL and see what you get
I got
"Starting network eth0 using a DHCP server...
FAILED"

By the way, should I be able to see "dhcpd" in the task list ? (its not there).

Just found this http://knowledge76.com/index.php/Wired_Ethernet_Troubleshooting (http://knowledge76.com/index.php/Wired_Ethernet_Troubleshooting), so I tried
"mii-tool eth0", which gives me "eth0: 10Mbit, half duplex, no link" (which doesnt mean the cable isn't plugged in - I pulled it out and then got a different message).
"lspci | grep Eth" gives me "ethernet controller: MYSON technology Surecom EP-320X-S...."
and
"lsmod | grep mii" gives "mii       5376   1 fealnx".

A weird thing : I looked in my router arp cache, and it has 2 (old) entries for the Linux PC with different MAC addresses  ??? Ifconfig says my mac addr is "00 01 40 00 00 00" and this is one of the arp entries, but the other is "00 01 50 00 00 00".

Just tried "dhcpcd -d eth0" and that worked. Can ping router (which now sees the ...40... mac address).
Thats a bit of progress anyway.  :)
Title: Re: ethernet boot problem
Post by: mick12345678 on July 13, 2007, 12:30:06 pm
weirder and weirder  ???

I used VASM to change the Hostname, then retried running "/etc/rc.d/rc.inet1 start" from the CL, and this time it worked  :-\

Reboot, and, once again, no Network  >:(

So now the problem is back to where it was at the start : I can start the eth0 manually, but it won't start automatically.

Title: Re: ethernet boot problem
Post by: mick12345678 on July 14, 2007, 10:54:06 am
progress  ???
I found in /var/log/messages a message from ifplugd saying "link beat not detected". I think that explains why ifplugd is not running (it has terminated) and why it hasn't started the interface.

Since I know the card works, looks like the answer (see http://www.debianhelp.co.uk/manpages/ifplugdmanpage.txt (http://www.debianhelp.co.uk/manpages/ifplugdmanpage.txt)) may be to use the "-F" flag on invoking ifplugd (to tell it to ignore the condition).

But where do I add this ? I looked in /etc/ifplugd and found a file called "ifplugd.conf.bak" but no "ifplugd.conf". So I created one by copying the bak file and renaming it, and then I edited it to include the "-F" argument. Upon reboot, however, no change : still the same  "link beat not detected" message but no change in interface status.

When I do "cat /var/log/messages | grep etho" I see that today ifplugd thinks my mac address is 00:01:00:00:01:00 whereas yesterday it thought it was 00:01:40:00:00:00 ! This is probably a red-herring though, as (irrespective of which mac address is being assumed) I can still start the interface successfully manually.


Title: Re: ethernet boot problem
Post by: rbistolfi on July 14, 2007, 02:02:36 pm
I think you can use the -s flag to see the output of ifplugd instead of the syslog. Should be an arguments section in ifplugd.conf, something like

Quote
ARGS="-fwI -u0 -d10 -s"

If you issue /etc/rc.d/ifplugd start on the console you should be able to see the error message.
If your mac adress is changing, you could check the udev rules for the interface. Do you have more than one nic card?
Title: Re: ethernet boot problem
Post by: mick12345678 on July 14, 2007, 03:56:10 pm
Thanks for the reply  :)

Quote
If you issue /etc/rc.d/ifplugd start on the console you should be able to see the error message.

but when I issue this command I get "no such file or directory".. ???

I need to read up on udev, but I have only ONE ethernet card (& no wireless card installed).
Title: Re: ethernet boot problem
Post by: rbistolfi on July 14, 2007, 06:50:10 pm
Sorry, my bad, the right path is /etc/rc.d/init.d/ifplugd
Title: Re: ethernet boot problem
Post by: lagagnon on July 14, 2007, 07:44:30 pm
but when I issue this command I get "no such file or directory".. ???
Did you run that command as root? It must be run as root...
Title: Re: ethernet boot problem
Post by: mick12345678 on July 15, 2007, 12:38:38 pm
Quote
Did you run that command as root? It must be run as root...
yes, thanks, I was root.

Quote
the right path is /etc/rc.d/init.d/ifplugd
thanks. I edited "my" ifplugd.conf file to include "-F -s" , then I killed the existing ifplugd (weird - how come it was running when it wasn't last time I looked ?) and then I ran "/etc/rc.d/init.d/ifplugd start".
All I got was "Starting Network Interface Plugging Daemon : eth0". When I then did "tail /var/log/messages" I saw the usual "link beat not detected".

Looks to me like ifplugd is *not* reading my ifplugd.conf file  >:(

I ought to be able to invoke the -F -s flags on the CL hadn't I ? I tried "/etc/rc.d/init.d/ifplugd start -F -s" and it came back with "Starting Network Interface Plugging Daemon : -F -s "...looks like it thinks the interface is called "-F -s"  :o . Sure enough - message log shows it looking for those "interfaces"  ::)

Then I reboot, after which I see that ifplugd *is* running (so it didnt shut itself down, good). Looking in /var/log/messages, there is *nothing* from ifplugd...so maybe it did read my conf file this time..but , in that case, how come eth0 still has no IP address ?

I just tried disabling ifplugd as a boot option, hoping that the default behaviour would then be to auto-enable eth0 - but this just results in eth0 disappearing entirely from the "ifconfig" output (although I can still get eth0 working just by running "/etc/rc.d/rc.inet1 start" from the CL).

Title: Re: ethernet boot problem
Post by: mick12345678 on July 16, 2007, 03:34:36 pm
Just found this http://archives.mandrivalinux.com/cooker/2004-04/msg01515.php (http://archives.mandrivalinux.com/cooker/2004-04/msg01515.php).
So now all I need to know is in which config file do  I need to add the line "MII_NOT_SUPPORTED "=yes".
I just reenabled ifplugd, edited rc.inet1.conf to include the above, and ....it didnt work  >:(

Anyone know the correct file (the Mandrake one doesnt exist on VL5.8) ?
Title: Re: ethernet boot problem
Post by: rbistolfi on July 16, 2007, 04:27:17 pm
rc.inet1.conf should be the equivalent of that file.
Title: Re: ethernet boot problem
Post by: mick12345678 on July 17, 2007, 12:34:02 pm
I have proven that ifplugd *is* reading my conf file, as, when I remove the "-s" option, I get messages in the log file once again.

I have tried putting the MII_NOT_SUPPORTED parameter in both rc.inet1.conf and in rc.inet1 but I don't think its being read, since, whether I have this parameter set to "yes" or "no", I get exactly the same result in the log :

Quote
Jul 17 20:27:34 test ifplugd(eth0)[2654]: ifplugd 0.28 initializing.
Jul 17 20:27:34 test ifplugd(eth0)[2654]: Using interface eth0/00:01:00:00:01:00 with driver <fealnx> (version: 2.51)
Jul 17 20:27:34 test ifplugd(eth0)[2654]: Using detection mode: SIOCETHTOOL
Jul 17 20:27:34 test ifplugd(eth0)[2654]: Initialization complete, link beat not detected.
Title: Re: ethernet boot problem
Post by: uelsk8s on July 17, 2007, 12:44:37 pm
can you try opening a terminal  su ing to root and typing
"/etc/rc.d/rc.inet1 start"
and then
"ifconfig"

and post the results back here
Title: Re: ethernet boot problem
Post by: mick12345678 on July 17, 2007, 02:42:05 pm
gladly  :)

Quote
root:# /etc/rc.d/rc.inet1 start
Starting network eth0 using a DHCP server...
dhcpcd: MAC address = 00:01:00:00:01:00
dhcpcd: your IP address = 192.168.1.74
eth0      Link encap:Ethernet  HWaddr 00:01:00:00:01:00
          inet addr:192.168.1.74  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:113 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:7349 (7.1 KiB)  TX bytes:1240 (1.2 KiB)
          Interrupt:11 Base address:0xc800

root:# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:01:00:00:01:00
          inet addr:192.168.1.74  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:118 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:7649 (7.4 KiB)  TX bytes:1240 (1.2 KiB)
          Interrupt:11 Base address:0xc800

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)

to clarify (even I'm getting confused by now  ;) ), everything works ok when I manually start the card (as above). The problem is that I can't get ifplugd to start it for me  :(
Title: Re: ethernet boot problem
Post by: uelsk8s on July 17, 2007, 02:47:42 pm
mick12345678,

After typing "/etc/rc.d/rc.inet1 start"
It looks like you have internet, do you?
If so just add "/etc/rc.d/rc.inet1 start" to the end of the /etc/rc.d/rc.local file and disable the ifplugd service and you should be good to go.
for some reason it looks like ifplugd is getting a "link beat not detected" even though its working and at that point it is probably shutting down eth0

HTH,
Uelsk8s
Title: Re: ethernet boot problem
Post by: mick12345678 on July 17, 2007, 03:34:33 pm
Thanks - that works fine and saves me the bother of typing in the cmd after every bootup :)

I would still like to get to the bottom of this, but maybe I should leave it at this point.
(I do have a floppy that came with the ethernet card and it includes a Linux driver - which has to be compiled. But that would probably just open up another can of worms  ::) ).

Title: Re: ethernet boot problem
Post by: rbistolfi on July 17, 2007, 04:34:00 pm
I would like to know the problem with ifplugd too!  :) You could try ifplugstatus with the network working.
Title: Re: ethernet boot problem
Post by: ekp on July 18, 2007, 05:37:18 am
I have problems booting ethernet as well.  I used to have a problem with the device changing names.  Solved with "how to" the "udev way".  Now I have a problem with saving boot options on reboot ie" starting eht0 with dhcp.  I have to reconfigure device every time to boot with dhcp.
Title: Re: ethernet boot problem
Post by: Joe1962 on July 18, 2007, 08:25:09 am
Hmm... I've no idea how to help with this. I have never had a problem with ifplugd on either ethernet or wifi interfaces, in the quite a few laptops and desktops I've installed 5.8 on... :-\
Title: Re: ethernet boot problem
Post by: uelsk8s on July 18, 2007, 12:37:52 pm
the problem is not with ifplugd. the problem is with the way this driver works with this card, It does not detect the linkbeat properly without the "MII_NOT_SUPPORTED "=yes" added when it starts.
If ifplugd does not detect a network cable plugged in it doesnt start the network.
Title: Re: ethernet boot problem
Post by: rbistolfi on July 18, 2007, 12:44:19 pm
the problem is not with ifplugd. the problem is with the way this driver works with this card, It does not detect the linkbeat properly without the "MII_NOT_SUPPORTED "=yes" added when it starts.
If ifplugd does not detect a network cable plugged in it doesnt start the network.


Exactly, the ifplugstratus command will tell you if ifplugd can detect your network. Other way to diagnose this, is running ifplugd with your network up, if it cant detect the linkbeat, will stop your network.
Title: Re: ethernet boot problem
Post by: scrambled_egg on April 20, 2008, 05:14:38 am
I had the same problem of not being able to start the network at boot up and having to use VASM to get it started.  After much research and experimentation I also reached the stage of successfully starting the network by manually running "/etc/rc.d/rc.inet1 start".  This implied that there was nothing wrong with the rc.inet1 script but rather it wasn't being called.  What I eventually found was that in my /etc/rc.d/rc.M file a large chunk of code which starts the network was commented out!  I don't know how or why this was so, but when I uncommented it the network started on the next reboot.  This makes sense as inspection of the code shows that /etc/rc.d/rc.inet is called for each network interface.  Hope this helps.
Title: Re: ethernet boot problem
Post by: Martin109 on April 26, 2008, 03:11:57 pm
I've found this very useful as a newbie (Vectorbie!), though  I haven't quite got it to work yet.  It does seem to hinge on the contents of rc.M, but I've noticed another problem I don't understand.  Is it OK to revive this thread... or should I start another one in Vectorbie Questions?

Someone will let me know!

When booting VL with my 3Com net adaptor plugged in, I notice that the green light comes on at the same point in the boot sequence each time, namely when the hardware is being initialised.  However, it goes off again later - I think when batch files (or their equivalent under Linux (scripts?)) are being processed.

Because it's gone off, I can't initialise the internet, manually or otherwise, until it comes on again, which it does, mysteriously, some time later, not in response to anything I seem to have done.  Then at last I can input (as root)  '/etc/rc.d/rc.inet1 start' or run VASM to get the internet connection running.

What are the commands which are running to turn the adapter on, then off?  How can I automate the first while preventing the second, as well as automating the internet connection?
Title: Re: ethernet boot problem
Post by: rbistolfi on April 26, 2008, 08:55:47 pm
Maybe ifplugd is putting your network down because it can't detect the link. I would try disabling ifplugd, you can do it from VasmCC, Services, Services, Run Level of your choice (I would turn it off on all of them) and uncheck ifplugd.
Let us know how it goes.
Title: Re: ethernet boot problem
Post by: Martin109 on April 27, 2008, 04:13:55 am
Thanks, but could you specify more precisely the steps I need to follow to disable ifplugd?  You have to remember you're dealing with a Vectorbie here!
Title: Re: ethernet boot problem
Post by: bigpaws on April 27, 2008, 07:46:51 am
The directions from the previous response were about as clear
as they can be.

There is an icon on your desktop named VasmCC, use that, and
follow the directions.

Bigpaws
Title: Re: ethernet boot problem
Post by: Martin109 on April 27, 2008, 09:40:40 am
Maybe ifplugd is putting your network down because it can't detect the link. I would try disabling ifplugd, you can do it from VasmCC, Services, Services, Run Level of your choice (I would turn it off on all of them) and uncheck ifplugd.
Let us know how it goes.

I can't find anything relating to VasmCC, just vasm, which doesn't have anything like Services, Services, Run Level, just PASSWD, XWMSET, SKEL, SUPER, EXIT
Title: Re: ethernet boot problem
Post by: Martin109 on April 27, 2008, 09:42:59 am
If I type vasmcc as root on the command line, it states: bash: vasmcc: command not found
Title: Re: ethernet boot problem
Post by: rbistolfi on April 27, 2008, 10:46:05 am
Sorry Martin109, I read wrong your VectorLinux version, vasmCC was relased for 5.9
Run vasm, super, service, srvset, and disable ifplugd un-checking it on the desired runlevel. Your default runlevel is 4, but I like to set same services for all runlevels if possible.
Title: Re: ethernet boot problem
Post by: Martin109 on April 27, 2008, 01:40:43 pm
Thanks rbistolfi.

This is all very curious.

Having followed your advice and run vasm and disabled ifplugd at all levels, I have run the boot sequence several times and observed the screen messages together with the little green light on my 3Com adapter, which tells me when it's active.

The adapter comes on at the same time as the following appears on the screen:

Entering runlevel 2
rc.M - Going multiuser

Now I had already acted on this post upthread, and amended my rc.M file

I had the same problem of not being able to start the network at boot up and having to use VASM to get it started.  After much research and experimentation I also reached the stage of successfully starting the network by manually running "/etc/rc.d/rc.inet1 start".  This implied that there was nothing wrong with the rc.inet1 script but rather it wasn't being called.  What I eventually found was that in my /etc/rc.d/rc.M file a large chunk of code which starts the network was commented out!  I don't know how or why this was so, but when I uncommented it the network started on the next reboot.  This makes sense as inspection of the code shows that /etc/rc.d/rc.inet is called for each network interface.  Hope this helps.

A short while later in the boot sequence the 3Com's light goes out again, around the time the following is being echoed to the screen:

Initialising network

That's puzzling to me, that the adapter seems to be disabled when the system is supposed to be initialising the network.

So I arrive at the command prompt and log in.  I wondered for a while whether the adapter would just then come on by itself, as I have always seemed eventually to find it on.  Is it coming on spontaneously, or in response to something I do? :-\

I have tried various things after each boot sequence.  I thought I had found it when I tried logging on as root with 'su root' and typing 'ifplugd'.  The adapter's light flashed with a beep from the system each time and it then came on constantly, and I was able to execute the '/etc/rc.d/rc.inet1 start' command!    Ahh! I thought... I've found what I have to do... but no, the next time I tried booting and doing the same thing, nothing happened!  The next time I booted, logged on as usual, and then typed 'startx' to start the windows manager, and the adapter came on then!

So, in summary, I can see from the echo to screen from rc.M that the command '/etc/rc.d/rc.inet1 start' is being executed by the script, but it's not getting inet1 up, as the adapter isn't on.  It's not clear why this is occasionally coming on when it does, and not coming on when it doesn't!

Curiouser & curiouser...!
Title: Re: ethernet boot problem
Post by: scrambled_egg on April 29, 2008, 03:35:45 am
Hi Martin109,

Just to double check that the /etc/rc.d/rc.inet1 script is being called you might like to amend it as follows:

#!/bin/sh
# This file is supposed to be created by vnetadd
# and modified by vnetset.
# You can modify it by hand, but be careful ;-)
#
# GNU GPL  (c) Eko M. Budi, 2004
#          (c) Vector Linux, 2004
#
BOOT_SCRIPTS_LOG=/var/log/boot_scripts.log
echo "rc.inet1: begin" >> $BOOT_SCRIPTS_LOG
echo "rc.inet1: called with parameter" $@ >> $BOOT_SCRIPTS_LOG
###########################################################
## The settings
DEVICE=eth0
DHCP=yes
IPADDR=127.0.0.1
NETMASK=255.255.255.0
GATEWAY=
PROBE=no

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

## You may make customized script here
## If not, source the standard network
. /etc/rc.d/functions-network "$@"

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


The change is everything to do with BOOT_SCRIPTS_LOG.  If you reboot and then inspect /var/log/boot_scripts.log you'll see whether or not rc.inet1 is being called as well as the parameter i.e. start/stop.  As I mentioned in my earlier post, I did a fair bit of research and experimentation on this topic.  I used this log file method with other "boot time" scripts and found very it enlightening as to what is actually happening.  For the record my network connection continues to start automatically at every boot.

Kind Regards.
Title: Re: ethernet boot problem
Post by: Martin109 on April 29, 2008, 06:23:41 am
Many thanks for this - looks very useful indeed.

I'm away from my Linux machine at the moment, but should have time to explore this at the weekend.  I'll post again when I've done that.

Thanks again.
Title: Re: ethernet boot problem
Post by: Martin109 on May 02, 2008, 01:34:52 pm
Hi Martin109,

Just to double check that the /etc/rc.d/rc.inet1 script is being called you might like to amend it as follows:

#!/bin/sh
# This file is supposed to be created by vnetadd
# and modified by vnetset.
# You can modify it by hand, but be careful ;-)
#
# GNU GPL  (c) Eko M. Budi, 2004
#          (c) Vector Linux, 2004
#
BOOT_SCRIPTS_LOG=/var/log/boot_scripts.log
echo "rc.inet1: begin" >> $BOOT_SCRIPTS_LOG
echo "rc.inet1: called with parameter" $@ >> $BOOT_SCRIPTS_LOG
###########################################################
## The settings
DEVICE=eth0
DHCP=yes
IPADDR=127.0.0.1
NETMASK=255.255.255.0
GATEWAY=
PROBE=no

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

## You may make customized script here
## If not, source the standard network
. /etc/rc.d/functions-network "$@"

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


The change is everything to do with BOOT_SCRIPTS_LOG.  If you reboot and then inspect /var/log/boot_scripts.log you'll see whether or not rc.inet1 is being called as well as the parameter i.e. start/stop.  As I mentioned in my earlier post, I did a fair bit of research and experimentation on this topic.  I used this log file method with other "boot time" scripts and found very it enlightening as to what is actually happening.  For the record my network connection continues to start automatically at every boot.

Kind Regards.

Right... I've modified my /etc/rc.d/rc.inet1 file as detailed above, and the output recorded in /var/log/boot_scripts.log is as follows:

rc.inet1: begin
rc.inet1: called with parameter stop
rc.inet1: end
rc.inet1: begin
rc.inet1: called with parameter start
rc.inet1: end
rc.inet1: begin
rc.inet1: called with parameter start
rc.inet1: end
rc.inet1: begin
rc.inet1: called with parameter start
rc.inet1: end

I don't know why it's being called four times; I also don't know why it's first called with 'stop' then three times with 'start' but still leaves inet1 down.  Any ideas? :-\



Title: Re: ethernet boot problem
Post by: scrambled_egg on May 03, 2008, 11:11:55 pm
I don't really know what's going on with all those multiple starts.  I'll have to do some more research... One possibility off the top of my head is that several services of different run levels are each trying to start the network.  If you run VASM as Super/Service/Initset and select VLINT this should eliminate services being stopped and started unnecessarily.  Another thing, run "ps xl | grep dhcpcd" to see if dhcpcd is running.

That's all I have right now but I'll dig a bit deeper and try to come up with something more.
Title: Re: ethernet boot problem
Post by: uelsk8s on May 03, 2008, 11:38:15 pm
try adding "ifconfig eth0 up" to your /etc/rc.d/rc.inet1 script
Code: [Select]
#!/bin/sh
# This file is supposed to be created by vnetadd
# and modified by vnetset.
# You can modify it by hand, but be careful ;-)
#
# GNU GPL  (c) Eko M. Budi, 2004
#          (c) Vector Linux, 2004
#
BOOT_SCRIPTS_LOG=/var/log/boot_scripts.log
echo "rc.inet1: begin" >> $BOOT_SCRIPTS_LOG
echo "rc.inet1: called with parameter" $@ >> $BOOT_SCRIPTS_LOG
###########################################################
## The settings
DEVICE=eth0
DHCP=yes
IPADDR=127.0.0.1
NETMASK=255.255.255.0
GATEWAY=
PROBE=no
/sbin/ifconfig eth0 up
###########################################################
## The script

## You may make customized script here
## If not, source the standard network
. /etc/rc.d/functions-network "$@"

echo "rc.inet1: end" >> $BOOT_SCRIPTS_LOG
Title: Re: ethernet boot problem
Post by: Martin109 on May 04, 2008, 03:54:32 am
Many thanks for the help so far.

I can't find any consistency to this!

1.  Use of 'ifconfig eth0 up'

First, I deleted /var/log/boot_scripts.log, to make sure I was starting from scratch.  Then I booted and checked the file; the parameters were

stop
stop
start
start

So, I deleted /var/log/boot_scripts.log again, and added '/sbin/ifconfig eth0 up' to /etc/rc.d/rc.inet1, as suggested. 
I deleted /var/log/boot_scripts.log again, booted, and checked the file.  The parameters this time were:

stop
start
start

So, to double-check, I commented out '/sbin/ifconfig eth0 up' in /etc/rc.d/rc.inet1 by adding '##' at the beginning of the line. 
I deleted /var/log/boot_scripts.log again, booted, and checked the file.  The parameters this time were:

stop
start
start


2. Use of ps xl | grep dhcpcd

Output of this was:

0  1828  3473  3413  15  0 1880  604  pipe_w S+    grep: dhcpcd

When running it again after another boot, some figures reduced by 4:

0  1828  3468  3409  15  0 1876  600  pipe_w S+    grep: dhcpcd


3.  I ran VASM and entered Super/Service/Initset, then selected VLINIT, as suggested.  This doesn't appear to have made any difference, apart from some echoed messages on screen during boot describing switches of runlevel, from 6 to 2, and restating of runlevel2.

Another check of /var/log/boot_scripts.log revealed 4 instances again!

stop
stop
start
start

Another use of ps xl | grep dhcpcd produced:

0  1828  3488  3429  15  0 1880  604  pipe_w S+    grep: dhcpcd

I'm afraid I'm as flummoxed as ever!  At least I can get inet1 up and running eventually.  It feels rather like waving a magic wand:

Boot
Logon (not as root!)
Startx
Wait a bit (don't know why, more of an incantation!)
Quit xfce
Switch to root
Type  'ifplugd'  (most of the time, this gets the adapter going, light comes on)
Type '/etc/rc.d/rc.inet1 start' (connected!)
Come out of root
startx
Start using internet

I'd like some logic!

Very many thanks for help and thoughts provided so far.  Hopefully, this is useful to others.


 
Title: Re: ethernet boot problem
Post by: scrambled_egg on May 04, 2008, 05:02:58 am
Hi Martin109,

From your last post it seems as if dhcpcd is not running.  What your listing showed was just the grep process that gave the output.  There should be a separate process for dhcpcd.  Your output should look something like this:

1     0  2641     1  15   0   1584   352 -      Ss   ?          0:36 dhcpcd -t 10 -h cwl.littlefield.net -d eth0
0     0 18605  6362  18   0   1952   620 pipe_w S+   pts/0      0:00 grep dhcpcd

The first line is the one we're after.  The command "ps ax" will list all the running processes.  Grep just prints the one's that meet the search term "dhcpcd".  Try running this after the network is up and running to see if there's any difference.  I'll try to follow up one this tomorrow, but for now it's bedtime!

Kind Regards
Title: Re: ethernet boot problem
Post by: Martin109 on May 04, 2008, 05:19:15 am
Hi Martin109,

From your last post it seems as if dhcpcd is not running.  What your listing showed was just the grep process that gave the output.  There should be a separate process for dhcpcd.  Your output should look something like this:

1     0  2641     1  15   0   1584   352 -      Ss   ?          0:36 dhcpcd -t 10 -h cwl.littlefield.net -d eth0
0     0 18605  6362  18   0   1952   620 pipe_w S+   pts/0      0:00 grep dhcpcd

The first line is the one we're after.  The command "ps ax" will list all the running processes.  Grep just prints the one's that meet the search term "dhcpcd".  Try running this after the network is up and running to see if there's any difference.  I'll try to follow up one this tomorrow, but for now it's bedtime!

Kind Regards


Many thanks, scrambled_egg.

Yes, I can also report that when logging off, the screen echoes something like 'Stopping network' and also
**** dhcpcd: not running

I see you're down under.  I'm in the UK.  Have a good night's sleep! ;)
Title: Re: ethernet boot problem
Post by: Martin109 on May 04, 2008, 07:10:37 am
While the Australians were sleeping, I was working!

Another thing, run "ps xl | grep dhcpcd" to see if dhcpcd is running.

The command "ps ax" will list all the running processes.

In my previous post, I reported the result of the first command, and there's no output relating to 'dhcpcd'.

Running the second produced a screen of text, including a line about dhcpcd.

Combining the two, I typed 'ps ax | grep dhcpcd' and got the output:

 3523 ?        Ss     0:00 dhcpcd -t 10 -h vector.linux.net -d eth0
 3674 tty1     S+     0:00 grep dhcpcd

Not sure what the difference is between 'ps xl' and 'ps ax', but the second seems to be producing the output you were after, indicating that dhcpcd IS running.
Title: Re: ethernet boot problem
Post by: scrambled_egg on May 09, 2008, 04: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
Title: Re: ethernet boot problem
Post by: Martin109 on May 09, 2008, 02: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: [Select]
#!/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.
Title: Re: ethernet boot problem
Post by: Martin109 on May 10, 2008, 12:14:30 am
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?
Title: Re: ethernet boot problem
Post by: scrambled_egg on May 10, 2008, 02: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: [Select]
#!/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: [Select]
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.
Title: Re: ethernet boot problem
Post by: Martin109 on May 11, 2008, 03:55:49 pm
Thanks, Scrambled Egg!

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

Code: [Select]
#!/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: [Select]
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.
Title: Re: ethernet boot problem
Post by: Martin109 on May 17, 2008, 08: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: [Select]
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? :-\
Title: Re: ethernet boot problem
Post by: scrambled_egg on May 18, 2008, 12:22:06 am
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: [Select]
#!/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.
Title: Re: ethernet boot problem
Post by: Martin109 on May 18, 2008, 11: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: [Select]
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?