Working With the Boot Scripts to Bring Up Network

Baho Utot baho-utot at columbus.rr.com
Fri Jul 23 17:00:37 PDT 2010


Dan McGhee wrote:
> This is one of those "somewhere between LFS and BLFS" topics, but since 
> I'm using the blfs-bootscripts, I thought I'd post here.
>
> The overall indication is that the bootscripts return FAIL when trying 
> to bring up the network on boot.  And before this I get "SIOCSIFADDR:  
> device does not exist" or something like that.  This error message 
> generates when /etc/sysconfig/network-devices/ifup runs--regardless of 
> when it runs.  This will be obvious in a moment.
>
> I can connect to the internet--there is no other network right now--by, 
> as root,:
> 1.  ip link set wlan0 up [iwconfig won't change attributes unless I do this]
> 2.  iwconfig wlan0 ESSID <name of my router>
> 3.  dhclient
>
> Without any of the leading directories, 'network start' bails, 'ifup 
> wlan0' bails, and, in no case does dhclient get started.  I'm thinking 
> that I'm not passing all the variables to 'ifup' when I try to do it 
> manually by running 'ifup wlan0'  before #3 in the above sequence.  I'm 
> also thinking of adding
>
> "iwconfig wlan0 Essid <name of my router>"
>
> right after ip...........up, in 'ifup.'
>
> This, if it works, will get things running here at home, but I'd like to 
> be able to connect anywhere I go.  I'm reduced to manually changing the 
> ESSID and inputting any passwords that people may have.  Although I 
> can't remember where, I know I've seen in {,B}LFS instructions a way to 
> pull a string out of the output of a command to set a variable or use on 
> a given line.  I'd like to put an instruction like that in somewhere so 
> I can pass the string to iwconfig if my above idea works.
>
> What I think I've seen is some command piped to grep and the output used 
> for the script.  If I run:
>
> iwlist wlan0 scanning
>
> part of it's output is the ESSID of the AP.  So, and this doesn't work 
> because I've tried it,:
>
> iwconfig wlan0 scanning | grep ESSID
>
> The return from that is 'ESSID <name of my router>" and I don't know how 
> to get <name of my router> into a usable form.
>
> I sure would appreciate any comments, evaluations, suggestions or other 
> options.
>
> Thanks,
> Dan
>   
here is something to try ( as root user  ) to bring up the wireless card 
manually

 ifconfig wlan0 up

To see if the card came up, if not you may need firmware for example the 
broadcom series of cards

ifconfig

If all is well then

iwlist wlan0 scan

If that return the essid you good on the first part

For no encryption try
iwconfig wlan0 essid "<name of my router>"

WEP using an hexadecimal key:
iwconfig wlan0 essid "<name of my router>" key 1234567890

using an ascii key:
 iwconfig wlan0 essid "<name of my router>" key s:asciikey


 Finally, provide an IP address to the network interface. Simple 
examples are:

dhcpcd wlan0

or

 ifconfig wlan0 192.168.1.2
 route add default gw 192.168.1.1

Fixup the IP for your network.

Note: If you get an timeout error due to a waiting for carrier problem 
then you might have to
set channel mode to auto for the specific device.
# iwconfig wlan0 channel auto




More information about the blfs-support mailing list