Re: [SLUG] ifconfig not gettting set

From: Chuck Hast (wchast@gmail.com)
Date: Sun May 08 2005 - 02:40:06 EDT


On 5/7/05, Kwan Lowe <kwan@digitalhermit.com> wrote:
> Chuck Hast wrote:
> > Folks,
> > I have asked about this before, and have poked and poked at it, what is
> > at issue is that the eth0 port is not getting set up, the machine is a toshiba
> > laptop, I think that the eth0 parameters are being sent to it either too soon
> > (it is a pcmcia nic card) or it is getting partially setup but again possibly
> > too soon.
> >
> > My fix has been to log in and root after the machine has finished booting
> > do a ifdown eth0 and then do a ifup eth0.
> >
> > If I just fo a ifup eth0 it tells me that the device is already configured.
> >
> > When I watch the startup screen go by I see it attempt to configure eth0
> > it fails and defers it then it does so again, it detects the card speed (10
> > mb) but does not appear to load in the ip, mask, gw etc.
> >
> > I am trying to figure out where to go in and try make it do that a bit later.
> > I can see possible places in the rc.d files, but even though I poke at the
> > run sequences I still can not get the thing to load in the proper configur-
> > ation beyond the fact that the card is there, but just needs to be pulled
> > down and then up.
> >
>
> You sound like you've hit on the head and it's very likely a timing
> issue. Check your timing belt and spark plug wires to make sure that...
> oh sorry, wrong manual :D
>
> As you've gathered, the /etc/rc.d directory contains the run levels. The
> files in ./rc1.d, ./rc3.d and ./rc5.d usually contain symlinks to
> /etc/rc.d/init.d. The symlinks are in the form S##scriptname for
> startup scripts and K##scriptname for shutdown (kill) scripts. The
> number after the first letter indicate in which order, from 00 to 99,
> the script will execute.
>
> Normally, to change the order of execution you'd just change the number
> to something higher. You can either manually rename the link or, if
> you're using a distribution that supports chkconfig, you can edit the
> script in /etc/rc.d/init.d and modify the chkconfig comments. They're in
> the form (from the chkconfig manpage):
>
> # chkconfig: 2345 20 80
>
> This says that the random script should be started in levels 2, 3, 4,
> and 5, that its start priority should be 20, and that its stop priority
> should be 80.
>
> If you edit the start priority to something higher then turn the service
> on and off it will change the symlink. I.e., once you have changed the
> line to:
>
> # chkconfig: 2345 40 80
>
> Run:
>
> [root@ningauble] chkconfig network off
> [root@ningauble] chkconfig network on
>
> If you do an 'ls' in /etc/rc.d/c3.d/ you should see the symlink has been
> updated.
>
> Another option may be to add another script that does nothing but pause
> for a few seconds in order to give the card time to initialize before
> configuring the network. Or you can just add it to the end of the pcmcia
> startup script...

I am running a variant of Knoppix called Knoppix AFU which is a version
done for Amateur radio.
All of the rcN.d directories are located in /etc/ (0 thru 6) There is also a
rcS.d directory.

I checked each of the directories and there is not a symlink to networking
which is in the etc/init.d directory.

Here is a ls -al of the rc5.d directory
root@fpac-dev:/etc/rc5.d# ls -al
total 12
drwxr-xr-x 2 root root 4096 Nov 10 19:49 .
drwxr-xr-x 150 root root 8192 May 6 16:37 ..
lrwxrwxrwx 1 root root 16 Aug 30 2004 K42ax25 ->
/etc/init.d/ax25
lrwxrwxrwx 1 root root 18 Aug 30 2004 S10sysklogd ->
../init.d/sysklogd
lrwxrwxrwx 1 root root 15 Aug 30 2004 S11klogd ->
../init.d/klogd
lrwxrwxrwx 1 root root 17 Aug 30 2004 S12kerneld ->
../init.d/kerneld
lrwxrwxrwx 1 root root 13 Aug 30 2004 S14ppp -> ../init.d/ppp
lrwxrwxrwx 1 root root 16 Aug 30 2004 S15pcmcia ->
../init.d/pcmcia
lrwxrwxrwx 1 root root 15 Aug 30 2004 S20inetd ->
../init.d/inetd
lrwxrwxrwx 1 root root 17 Aug 30 2004 S20logoutd ->
../init.d/logoutd
lrwxrwxrwx 1 root root 17 Aug 30 2004 S20makedev ->
../init.d/makedev
lrwxrwxrwx 1 root root 13 Aug 30 2004 S20ssh -> ../init.d/ssh
lrwxrwxrwx 1 root root 17 Aug 30 2004 S40hotplug ->
../init.d/hotplug
lrwxrwxrwx 1 root root 16 Aug 30 2004 S80ax25 ->
/etc/init.d/ax25
lrwxrwxrwx 1 root root 13 Aug 30 2004 S89atd -> ../init.d/atd
lrwxrwxrwx 1 root root 14 Aug 30 2004 S89cron ->
../init.d/cron
lrwxrwxrwx 1 root root 19 Aug 30 2004 S99rmnologin
-> ../init.d/rmnologin
root@fpac-dev:/etc/rc5.d#

As you can see it is not in there nor is it in the lower ones, of
course rc6.d is
the shutdown sequence directory...

But it IS in the rcS.d directory, here is a ls-al of that one...
root@fpac-dev:/etc/rcS.d# ls -al
total 16
drwxr-xr-x 2 root root 4096 Aug 30 2004 .
drwxr-xr-x 150 root root 8192 May 6 16:37 ..
-rw-r--r-- 1 root root 701 Sep 1 1997 README
lrwxrwxrwx 1 root root 19 Aug 30 2004 S05keymap.sh
-> ../init.d/keymap.sh
lrwxrwxrwx 1 root root 22 Aug 30 2004
S10checkroot.sh -> ../init.d/checkroot.sh
lrwxrwxrwx 1 root root 16 Aug 30 2004 S15isapnp ->
../init.d/isapnp
lrwxrwxrwx 1 root root 18 Aug 30 2004 S20modutils ->
../init.d/modutils
lrwxrwxrwx 1 root root 20 Aug 30 2004 S30checkfs.sh
-> ../init.d/checkfs.sh
lrwxrwxrwx 1 root root 19 Aug 30 2004 S30procps.sh
-> ../init.d/procps.sh
lrwxrwxrwx 1 root root 19 Aug 30 2004 S30setserial
-> ../init.d/setserial
lrwxrwxrwx 1 root root 19 Aug 30 2004 S35devpts.sh
-> ../init.d/devpts.sh
lrwxrwxrwx 1 root root 21 Aug 30 2004 S35mountall.sh
-> ../init.d/mountall.sh
lrwxrwxrwx 1 root root 19 Aug 30 2004 S39dns-clean
-> ../init.d/dns-clean
lrwxrwxrwx 1 root root 21 Aug 30 2004 S40hostname.sh
-> ../init.d/hostname.sh
lrwxrwxrwx 1 root root 18 Aug 30 2004 S40ifupdown ->
../init.d/ifupdown
lrwxrwxrwx 1 root root 20 Aug 30 2004 S40networking
-> ../init.d/networking
lrwxrwxrwx 1 root root 17 Aug 30 2004 S41portmap ->
../init.d/portmap
lrwxrwxrwx 1 root root 21 Aug 30 2004 S45mountnfs.sh
-> ../init.d/mountnfs.sh
lrwxrwxrwx 1 root root 27 Aug 30 2004
S48console-screen.sh -> ../init.d/console-screen.sh
lrwxrwxrwx 1 root root 20 Aug 30 2004 S50hwclock.sh
-> ../init.d/hwclock.sh
lrwxrwxrwx 1 root root 21 Aug 30 2004 S55bootmisc.sh
-> ../init.d/bootmisc.sh
lrwxrwxrwx 1 root root 17 Aug 30 2004 S55urandom ->
../init.d/urandom
root@fpac-dev:/etc/rcS.d#

The README in this directory says that this rc directory is scanned at
boot time, I
think I see the problem now, network is run from this directory but it
is not run in
any of the rcN.d directories, BUT pcmcia is run from those directories
so this would
indicate to me that network gets run prior to pcmcia so the pcmcia nic
card is not
ready to go yet. So, should I add SXXpcmcia and symlink it to pcmcia
in the init.d
directory or add network in the rcN.d directories?

-- 
Chuck Hast 
To paraphrase my flight instructor;
"the only dumb question is the one you DID NOT ask resulting in my going
out and having to identify your bits and pieces in the midst of torn
and twisted metal."

----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:44:52 EDT