VectorLinux
October 25, 2014, 12:18:51 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 14342 times)
mick12345678
Vectorite
***
Posts: 140


« on: July 11, 2007, 12: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 ?

« Last Edit: July 13, 2007, 02:35:03 am by mick12345678 » Logged
rbistolfi
Packager
Vectorian
****
Posts: 2288


« Reply #1 on: July 11, 2007, 02:05:29 pm »

May be they are not setted as executable for some reason?
Logged

"There is a concept which corrupts and upsets all others. I refer not to Evil, whose limited realm is that of ethics; I refer to the infinite."
Jorge Luis Borges, Avatars of the Tortoise.

--
Jumalauta!!
mick12345678
Vectorite
***
Posts: 140


« Reply #2 on: July 12, 2007, 01: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, 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  Sad
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).
Logged
uelsk8s
Administrator
Vectorian
*****
Posts: 2504



« Reply #3 on: July 12, 2007, 01:53:53 pm »

what version of VL are you using

does the contents of rc.inet1 match what you posted above still?
Logged
mick12345678
Vectorite
***
Posts: 140


« Reply #4 on: July 13, 2007, 02: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 ?
Logged
mick12345678
Vectorite
***
Posts: 140


« Reply #5 on: July 13, 2007, 04:06:04 am »

I'm really floundering about here  Shocked

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"..
Logged
uelsk8s
Administrator
Vectorian
*****
Posts: 2504



« Reply #6 on: July 13, 2007, 04: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
Logged
mick12345678
Vectorite
***
Posts: 140


« Reply #7 on: July 13, 2007, 06:52:09 am »

Thanks for the help so far  Smiley

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, 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  Huh 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.  Smiley
« Last Edit: July 13, 2007, 07:44:30 am by mick12345678 » Logged
mick12345678
Vectorite
***
Posts: 140


« Reply #8 on: July 13, 2007, 11:30:06 am »

weirder and weirder  Huh

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

Reboot, and, once again, no Network  Angry

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.

Logged
mick12345678
Vectorite
***
Posts: 140


« Reply #9 on: July 14, 2007, 09:54:06 am »

progress  Huh
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) 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.


« Last Edit: July 14, 2007, 10:29:28 am by mick12345678 » Logged
rbistolfi
Packager
Vectorian
****
Posts: 2288


« Reply #10 on: July 14, 2007, 01: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?
Logged

"There is a concept which corrupts and upsets all others. I refer not to Evil, whose limited realm is that of ethics; I refer to the infinite."
Jorge Luis Borges, Avatars of the Tortoise.

--
Jumalauta!!
mick12345678
Vectorite
***
Posts: 140


« Reply #11 on: July 14, 2007, 02:56:10 pm »

Thanks for the reply  Smiley

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".. Huh

I need to read up on udev, but I have only ONE ethernet card (& no wireless card installed).
Logged
rbistolfi
Packager
Vectorian
****
Posts: 2288


« Reply #12 on: July 14, 2007, 05:50:10 pm »

Sorry, my bad, the right path is /etc/rc.d/init.d/ifplugd
Logged

"There is a concept which corrupts and upsets all others. I refer not to Evil, whose limited realm is that of ethics; I refer to the infinite."
Jorge Luis Borges, Avatars of the Tortoise.

--
Jumalauta!!
lagagnon
Global Moderator
Vectorian
*****
Posts: 1922



WWW
« Reply #13 on: July 14, 2007, 06:44:30 pm »

but when I issue this command I get "no such file or directory".. Huh
Did you run that command as root? It must be run as root...
Logged

"As people become more intelligent they care less for preachers and more for teachers". Robert G. Ingersoll
mick12345678
Vectorite
***
Posts: 140


« Reply #14 on: July 15, 2007, 11:38:38 am »

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  Angry

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"  Shocked . Sure enough - message log shows it looking for those "interfaces"  Roll Eyes

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).

« Last Edit: July 15, 2007, 01:49:05 pm by mick12345678 » Logged
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!