LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch
User Name
Password
Arch This Forum is for the discussion of Arch Linux.

Notices


Reply
  Search this Thread
Old 01-19-2010, 01:33 PM   #1
cantab
Member
 
Registered: Oct 2009
Location: England
Distribution: Kubuntu, Ubuntu, Debian, Proxmox.
Posts: 553

Rep: Reputation: 115Reputation: 115
Wireless networking: /etc/rc.d/network start fails on first run, works on second


My wireless network is failing to come up at boot, but when I run /etc/rc.d/network restart it comes up fine. As I understand it that's the exact same script run at boot, so it seems a little odd.

The problem arose after I installed a bunch of backlogged updates.

My network uses WEP encryption. (Yes, I know it's insecure, but my Nintendo DS Lite doesn't support WPA, so I have no choice.)

After boot, iwconfig lists that the wireless network is not associated with any access point.

I've tried the 'standard network daemon' setup described here.

During boot, the failure message mentions increasing 'WIRELESS_TIMEOUT'. How is this done?

The relevant part of 'lspci -v' is
Code:
02:09.0 Network controller: RaLink RT2561/RT61 rev B 802.11g
	Subsystem: D-Link System Inc AirPlus G DWL-G510 Wireless Network Adapter (Rev.C)
	Flags: bus master, slow devsel, latency 64, IRQ 17
	Memory at f7ff0000 (32-bit, non-prefetchable) [size=32K]
	Capabilities: <access denied>
	Kernel driver in use: rt61pci
	Kernel modules: rt61pci
'lsmod' gives the following; it seems all the relevant modules have been automatically loaded
Code:
Module                  Size  Used by
ipv6                  237532  24 
nls_cp437               4513  1 
vfat                    8348  1 
fat                    43888  1 vfat
ext3                  113026  0 
jbd                    38906  1 ext3
xfs                   509690  1 
exportfs                3034  1 xfs
ext2                   56463  1 
mbcache                 4278  2 ext3,ext2
tuner                  16644  1 
tea5767                 5425  1 tuner
tda8290                11387  1 tuner
tda18271               31641  2 tuner,tda8290
tda827x                 8478  1 tda8290
tuner_xc2028           18742  1 tuner
xc5000                  9779  1 tuner
tda9887                 8449  1 tuner
tuner_simple           12748  1 tuner
tuner_types             7761  1 tuner_simple
mt20xx                 10834  1 tuner
snd_seq_dummy           1099  0 
tea5761                 3630  1 tuner
snd_seq_oss            25304  0 
snd_seq_midi_event      4452  1 snd_seq_oss
tvaudio                21412  0 
snd_seq                42628  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
tda7432                 3464  0 
msp3400                24676  0 
bttv                  100526  0 
v4l2_common            11120  5 tuner,tvaudio,tda7432,msp3400,bttv
snd_pcm_oss            33693  0 
videodev               31763  6 tuner,tvaudio,tda7432,msp3400,bttv,v4l2_common
v4l1_compat            13478  1 videodev
fan                     2598  0 
snd_mixer_oss          14810  1 snd_pcm_oss
snd_cs46xx             72094  1 
ir_common              22980  1 bttv
i2c_algo_bit            4219  1 bttv
gameport                7130  2 snd_cs46xx
snd_rawmidi            15592  1 snd_cs46xx
battery                 7328  0 
videobuf_dma_sg         8175  1 bttv
snd_bt87x               8084  0 
snd_seq_device          4313  4 snd_seq_dummy,snd_seq_oss,snd_seq,snd_rawmidi
snd_ac97_codec         85937  1 snd_cs46xx
ac97_bus                 750  1 snd_ac97_codec
arc4                    1058  2 
videobuf_core          11789  2 bttv,videobuf_dma_sg
snd_pcm                57479  4 snd_pcm_oss,snd_cs46xx,snd_bt87x,snd_ac97_codec
snd_timer              16117  2 snd_seq,snd_pcm
ppdev                   4882  0 
ac                      2255  0 
btcx_risc               2811  1 bttv
tveeprom               10717  1 bttv
nvidia               8795799  28 
ecb                     1545  2 
snd                    43847  13 snd_seq_oss,snd_seq,snd_pcm_oss,snd_mixer_oss,snd_cs46xx,snd_rawmidi,snd_bt87x,snd_seq_device,snd_ac97_codec,snd_pcm,snd_timer
soundcore               5007  1 snd
snd_page_alloc          5809  3 snd_cs46xx,snd_bt87x,snd_pcm
rt61pci                16828  0 
crc_itu_t               1041  1 rt61pci
iTCO_wdt                6745  0 
3c59x                  28034  0 
rt2x00pci               4341  1 rt61pci
parport_pc             27680  1 
mii                     3218  1 3c59x
iTCO_vendor_support     1453  1 iTCO_wdt
lp                      6616  0 
rt2x00lib              22357  2 rt61pci,rt2x00pci
intel_agp              23157  1 
i2c_i801                7122  0 
usb_storage            33430  1 
parport                26575  3 ppdev,parport_pc,lp
pcspkr                  1347  0 
psmouse                55619  0 
led_class               1933  1 rt2x00lib
thermal                 9326  0 
agpgart                23331  2 nvidia,intel_agp
dcdbas                  4408  0 
button                  3638  0 
i2c_core               15369  21 tuner,tea5767,tda8290,tda18271,tda827x,tuner_xc2028,xc5000,tda9887,tuner_simple,mt20xx,tea5761,tvaudio,tda7432,msp3400,bttv,v4l2_common,videodev,i2c_algo_bit,tveeprom,nvidia,i2c_i801
processor              25790  0 
intel_rng               2037  0 
serio_raw               3620  0 
sg                     21079  0 
evdev                   6970  6 
shpchp                 26592  0 
pci_hotplug            23492  1 shpchp
mac80211              147949  2 rt2x00pci,rt2x00lib
cfg80211              106663  2 rt2x00lib,mac80211
rfkill                 12320  1 cfg80211
eeprom_93cx6             984  1 rt61pci
rtc_cmos                7504  0 
rtc_core               12011  1 rtc_cmos
rtc_lib                 1450  1 rtc_core
jfs                   163812  1 
dm_mod                 54323  3 
sr_mod                 13161  0 
cdrom                  31625  1 sr_mod
sd_mod                 24101  8 
ata_generic             2235  0 
ata_piix               17757  4 
pata_acpi               2264  0 
uhci_hcd               19092  0 
libata                135162  3 ata_generic,ata_piix,pata_acpi
floppy                 47412  0 
aic7xxx               109373  0 
scsi_transport_spi     16354  1 aic7xxx
scsi_mod               78933  7 usb_storage,sg,sr_mod,sd_mod,libata,aic7xxx,scsi_transport_spi
usbcore               118921  3 usb_storage,uhci_hcd
my /etc/rc.conf is
Code:
#
# /etc/rc.conf - Main Configuration for Arch Linux
#

# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="en_GB.utf8"
HARDWARECLOCK="UTC"
USEDIRECTISA="no"
TIMEZONE="Europe/London"
KEYMAP="uk"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=(!usblp)

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="yes"

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="bevelle"

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#   - no hyphens in your interface names - Bash doesn't like it
# 
# DHCP:     Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#

#Static IP example
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
eth0="dhcp"
#wlan0="dhcp"
wlan_wlan0="wlan0 essid O2wirelessFCBEB6 key B5D758BBB7"
wlan0="dhcp"
INTERFACES=(wlan0)

# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
 
# Enable these network profiles at boot-up.  These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up (dialog package required)
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(main)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng network @sshd @openntpd netfs crond alsa hal @mpd fam @cups)
I have tried putting 'rt61pci' in the MODULES array. I have tried 'wlan0="dhcp"' and 'wlan_wlan0="...' both ways around. Neither of these worked.

This problem is leaving me frankly baffled. What's going wrong here?

Last edited by cantab; 01-19-2010 at 07:07 PM. Reason: thread retitled
 
Old 01-19-2010, 01:44 PM   #2
minrich
Member
 
Registered: Aug 2003
Location: Isles of Man & Wight
Distribution: See signature
Posts: 548

Rep: Reputation: 40
Do you have an ifstate file? If so can you check it after booting, and after running /etc/rc.d/network restart, I expect it will show:

lo=lo
wlan0=wlan0

when the wireless is functioning.

Also do you have an /etc/network/interfaces file? If so, can you paste settings therein. It may not exist on Arch, since I don't have a /etc/rc.conf file on my Debian Lenny - the only reason I ask is that I have:

allow-hotplug wlan0
iface wlan0 inet static

in mine.

Hope this helps
 
Old 01-19-2010, 01:58 PM   #3
cantab
Member
 
Registered: Oct 2009
Location: England
Distribution: Kubuntu, Ubuntu, Debian, Proxmox.
Posts: 553

Original Poster
Rep: Reputation: 115Reputation: 115
/etc/network/ifstate and /etc/network/interfaces don't exist on Arch. Configuration is handled in /etc/rc.conf (my setup) or in /etc/conf.d/wireless (which has no uncommented lines on my system), or by various network managers (which are not necessary for a desktop computer)
 
Old 01-19-2010, 02:29 PM   #4
minrich
Member
 
Registered: Aug 2003
Location: Isles of Man & Wight
Distribution: See signature
Posts: 548

Rep: Reputation: 40
Okay, first can you check that udev runs before your boot network(ing) starts since the archwiki says that this (udev) loads the module, rt61pci in your case if I'm not mistaken, that sets up the wlan0 interface.

Second, is there a reason that you have disabled gateway in ROUTES=(!gateway)?

Third, again from archwiki, it appears that /etc/rc.sysinit loads, amoung others, rc.conf, udev and MODULES in rc.conf, according to yours, MODULES=(!usblp), so I assume that rt61pci is loaded by the line MOD_AUTOLOAD="yes" - perhaps your dmesg.log shows the order the various pieces of your networking setup are invoked, but it looks to me that there is something wrong in your order, if, as you state it works fine on an /etc/rc.d/network restart
 
Old 01-19-2010, 03:18 PM   #5
cantab
Member
 
Registered: Oct 2009
Location: England
Distribution: Kubuntu, Ubuntu, Debian, Proxmox.
Posts: 553

Original Poster
Rep: Reputation: 115Reputation: 115
Udev does run before networking in the boot process.

I think gateway being disabled is the default. I'm pretty sure it's not needed since my network uses DHCP - and anyway that IP doesn't correspond to anything (it's not even on the same subnet as my computer and router use).
 
Old 01-19-2010, 03:30 PM   #6
minrich
Member
 
Registered: Aug 2003
Location: Isles of Man & Wight
Distribution: See signature
Posts: 548

Rep: Reputation: 40
Have you tried commenting out the gateway="default gw 192.168.0.1" line, which might cause the wireless_timeout?

I am running out of suggestions, perhaps someone else can help
 
Old 01-19-2010, 06:42 PM   #7
minrich
Member
 
Registered: Aug 2003
Location: Isles of Man & Wight
Distribution: See signature
Posts: 548

Rep: Reputation: 40
I found the following on the archwiki Wireless Setup, which may help:

Quote:
How it works

The Arch kernel is modular, meaning many of the drivers for machine hardware reside on the hard drive and are available as modules. At boot, udev takes an inventory of your hardware. Udev will load appropriate modules (drivers) for your corresponding hardware, and the driver, in turn, will allow creation of a kernel interface.

The interface name for different drivers and chipsets will vary. Some examples are wlan0, eth1, and ath0.

* Note: Udev is not perfect. If the proper module is not loaded by udev on boot, simply modprobe it and add the module name to etc/rc.conf on the MODULES= line.
 
Old 01-19-2010, 06:59 PM   #8
cantab
Member
 
Registered: Oct 2009
Location: England
Distribution: Kubuntu, Ubuntu, Debian, Proxmox.
Posts: 553

Original Poster
Rep: Reputation: 115Reputation: 115
The gateway thing is disabled anyway.

I tried putting "WIRELESS_TIMEOUT=9001" in /etc/conf.d/wireless, and that just made the boot process hang! I had to use systemrescuecd to change it back.

I'm pretty sure the right modules ARE being loaded. In any case, when I put it in explicitly, it didn't fix the problem.

I tried moving network to the end of the list of daemons (despite that putting it after stuff that needs the network). No help.

EDIT:I disable network altogether during the boot process, then ran "/etc/rc.d/network start" manually. The first run failed. The second succeeded.

So it seems the first time it's run, it's sort of part way setting it up, then failing


Thread retitled to reflect the new characterisation.

Last edited by cantab; 01-19-2010 at 07:06 PM.
 
Old 01-19-2010, 07:13 PM   #9
minrich
Member
 
Registered: Aug 2003
Location: Isles of Man & Wight
Distribution: See signature
Posts: 548

Rep: Reputation: 40
Okay it seems that you have encountered a bug as expounded here:

http://bugs.archlinux.org/task/11273

I entered WIRELESS_TIMEOUT into http://www.google.com/linux and got a number of hits, which I suggest you investigate, rather than me trying to find something and then posting here.

Good luck
 
Old 01-19-2010, 07:47 PM   #10
cantab
Member
 
Registered: Oct 2009
Location: England
Distribution: Kubuntu, Ubuntu, Debian, Proxmox.
Posts: 553

Original Poster
Rep: Reputation: 115Reputation: 115
Seems weird that the bug only appeared after updates...maybe because of a change in the wireless driver, since I'm pretty sure the init scripts weren't in the updates.

I've tried the hack solution of commenting out the check that fails in /etc/rc.d/network. Will see if it works next time I reboot.
 
Old 01-19-2010, 11:41 PM   #11
cantab
Member
 
Registered: Oct 2009
Location: England
Distribution: Kubuntu, Ubuntu, Debian, Proxmox.
Posts: 553

Original Poster
Rep: Reputation: 115Reputation: 115
Commenting out the lines in /etc/rc.d/network
Code:
        if [[ "$bssid" = "00:00:00:00:00:00" ]]; then
                printhl "Could not associate $1 - try increasing WIRELESS_TIMEO$
                return 1
        fi
Did not work. It takes longer, but still fails.
 
Old 01-20-2010, 01:54 AM   #12
minrich
Member
 
Registered: Aug 2003
Location: Isles of Man & Wight
Distribution: See signature
Posts: 548

Rep: Reputation: 40
Have you tried setting /etc/rc.conf gateway=(default gw xxx.yyy.zzz.1) to whatever IP address you have assigned to your router access point, you would then have to remove the '!' out of the ROUTES=(!gateway) line.

From your post #11 it appears that your wlan0 interface is not finding the MAC address of your router, if you have an /sbin/iwconfig file, then perhaps you could run a script that reads:

iwconfig wlan0 ap 00:19:7E:52:F9:F2 commit

obviously you will have to change the above MAC address to match that of your router, again if you have /sbin/iwconfig then said router MAC address will show up, once you are connected, if you run:

iwconfig wlan0

Needless to say, since iwconfig is in the 'sys'bin these commands must be executed as root, sudo, whatever.

I couldn't find any reference to a boot.log file on archwiki, if you don't have one, and you can find a way to create one, then we would have a better 'clue' of when and what is happening/hanging with your wireless connection.

Cheers
Rich
 
Old 01-20-2010, 03:06 AM   #13
minrich
Member
 
Registered: Aug 2003
Location: Isles of Man & Wight
Distribution: See signature
Posts: 548

Rep: Reputation: 40
Further to the above you may want to try disabling IPV6, q.v.:

http://wiki.archlinux.org/index.php/...ing_the_Module
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NETWORK transmit errors - assuming offline / NETWORK restart failed, could not find gcan Linux - Networking 3 11-13-2009 07:01 PM
Network interfaces do not bring up on network restart rajat Linux - Networking 1 06-20-2007 04:44 AM
In FC6 network interface doesn't come up if 'service network restart' command is run rajat Linux - Networking 2 05-02-2007 11:53 PM
wireless connection requires network restart bbcar Linux - Wireless Networking 1 11-21-2005 02:02 AM
Network not accessible after boot; OK after network restart chriswei Linux - Networking 5 09-22-2004 10:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch

All times are GMT -5. The time now is 10:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration