You are not logged in.

#1 2006-10-27 16:37:00

dhasenan
Member
Registered: 2006-10-11
Posts: 9

Network scripts unreliable at boot

Hello--

The default network script that ships with Arch rarely worked for me, so I replaced it with this:

#!/bin/bash
. /etc/rc.d/functions

if [ "$1" == "start" ]; then
        stat_busy "Starting networking"
        /sbin/ifconfig lo up
        /sbin/ifconfig eth0 up
        /sbin/dhcpcd -N -t 5
        stat_done
else
        stat_busy "Killing networking"
        /sbin/ifconfig eth0 down
        /sbin/ifconfig lo down
        killall dhcpcd
        stat_done
fi

This occasionally works at boot, but rarely; when I log in as root and run it, it works. Any idea why, and what I can do to automate it?

Thanks!


It's my fault.

Offline

#2 2006-10-27 17:56:46

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Network scripts unreliable at boot

What doesn't work about the default network scripts?  You script does exactly the same as the default scripts - if you're experiencing problems, it's most likely something else.

Offline

#3 2006-10-27 18:02:28

dhasenan
Member
Registered: 2006-10-11
Posts: 9

Re: Network scripts unreliable at boot

I don't know whether there is a problem specifically with the default scripts, so I tested with this. Since this script randomly works on occasion, I can assume that there are intermittent errors and I was merely not lucky enough to have a successful run of the default network scripts.


It's my fault.

Offline

#4 2006-10-27 18:06:16

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Network scripts unreliable at boot

Can you post:
a) your rc.conf networking sections
b) the output of lsmod
?

Thanks

Offline

#5 2006-10-27 18:42:53

dhasenan
Member
Registered: 2006-10-11
Posts: 9

Re: Network scripts unreliable at boot

I compiled my own kernel, so lsmod won't help much, I think. (Yes, I have the appropriate driver; otherwise I wouldn't be able to post this.)

Module                  Size  Used by
fglrx                 391916  8
8250_pnp                8640  0
8250                   20868  1 8250_pnp
serial_core            17600  1 8250
nvidia_agp              6300  1
agpgart                25804  2 fglrx,nvidia_agp

And from rc.conf:

lo="lo 127.0.0.1"
broadcast 192.168.0.255"
eth0="dhcp"
INTERFACES=(lo eth0)

When I try the default scripts, of course, I get the exact same symptoms: no networking at boot, but running the script gives correct results.

/var/log/errors.log says that dhcpcd timed out whilst waiting for a valid DHCP server response in either case.


It's my fault.

Offline

#6 2006-10-27 18:48:34

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Network scripts unreliable at boot

dhasenan wrote:

/sbin/dhcpcd -N -t 5

I'm assuming you have this in the /etc/conf.d/dhcpcd_args file as well.  -t 5 seems a bit low to me.  Try setting this higher and see if it works at boot.  I use 30 IIRC.

Offline

#7 2006-10-27 19:00:49

dhasenan
Member
Registered: 2006-10-11
Posts: 9

Re: Network scripts unreliable at boot

That worked. So it takes about thirty seconds if I let it go at boot, but if I log in first, it takes less than a second.

At any rate, the answer is that I'm an idiot, and impatient to boot. Thank you.


It's my fault.

Offline

#8 2006-10-27 20:28:38

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Network scripts unreliable at boot

dhasenan wrote:

That worked. So it takes about thirty seconds if I let it go at boot, but if I log in first, it takes less than a second.

At any rate, the answer is that I'm an idiot, and impatient to boot. Thank you.

Yeah, it's probably that your hardware takes some time to initialize, so the initial DHCP has to hold until it's initialized... just a guess though.

Offline

Board footer

Powered by FluxBB