# [solved myself] wlan0 won't start, SIOCSIFFLAGS &iwl4965 fw

## Dr Croubie

ok, so i boot the minimal install CD, and from there do exactly this:

ifconfig wlan0 up

iwconfig wlan0 essid mynet

ifconfig wlan0 192.168.1.34/24

route add default gw 192.168.1.1

vim /etc/resolv.conf

nameserver 192.168.1.1

links forums.gentoo.org

and i'm here.

boot from the hard disc using grub, type in:

ifconfig wlan0 up

SIOCSIFFLAGS: no such file or directory.

any suggestions as to what i'm doing wrong? (iirc it also works fine if i boot from livecd, chroot, then ifconfig etc, i'll reboot and try that just to prove it then come back)Last edited by Dr Croubie on Fri May 01, 2009 9:37 am; edited 2 times in total

----------

## xtz

Check what module your wifi card uses (lsmod) when in the LiveCD environment, then check if you can use it when you boot from your HDD (modprobe). If you cannot - go to your kernel sources and compile it (either as a module or staticallly in the kernel), then reboot.

----------

## Dr Croubie

yeah, i was going to write that stuff down for you too, so here goes:

(on live cd, unchrooted, if that makes a difference)

lspci | grep -i wireless

04:00.0 Network Controller: Intel Corp PRO/Wireless 4965 AG or AGN Network Connection (rev 61)

(ps, i really wish middle-mouse-button pasting worked into links)

lsmod | grep 4965

iwl4965        115944 0

mac80211       128396 1 iwl4965

firmware_class  19200 3 iwl4965,etc

grep IWL .config

CONFIG_IWLWIFI=y

CONFIG_IWLCORE=y

#CONFIG_IWLWIFI_LEDS is not set

#IWLWIFI_RFKILL etc

#IWLWIFI_DEBUG

IWL_AGN=y

#IWL_AGN_SPECTRUM_MEASUREMENT

#IWL_LEDS

IWL_4965=y

#IWL_5000

#IWL_3945

also, i've emerged wireless-tools, wpa-supplicant, and i didn't set anything to autostart with rc-update because i'll be on the road a lot and don't want to have net unless i manually say so.

(although, when i booted from hdd eth0 and dhcpcd decide to start themselves on boot anyway, and overwrite my resolv.conf, it complained about nothing in conf.d/net so started dhcpcd)

----------

## Dr Croubie

ok, i'm coming to the conclusion the this is _not_ a kernel/modules problem. i just tried running a genkernel for shits&giggles. first time it didn't work (no such device) because genkernel didn't compile an iwl4965 module, so i ran

genkernel all --menuconfig

to include the iwl4965 module and changed nothing else. still getting the same error as for my custom kernel:

ifconfig wlan0 up 

SIOCSIFFLAGS: no such file or directory. 

the other thing i'm concerned about (and may very well be related) is that i removed net.eth0 from etc/runlevels/default, the only thing left is "local", and

ls etc/runlevels/boot only has "bootmisc, checkfs, checkroot, clock, consolefont, hostname, keymaps, localmount, modules, net.lo, rmnologin, urandom".

however, on boot i still get:

* Device initiated services: net.eth0 udev-postmount

etc

* Starting lo

 bringing up lo

 etc

* Starting eth0

*  Configuration not set for eth0 - assuming DHCP

*   No DHCP client installed

(i did emerge --unmerge dhcpcd for the time being because i was sick of it writing over my /etc/resolv.conf when i did a hdd boot)

...

and i just deleted the symlink /etc/init.d/net.eth0 -> net.lo

which got rid of the Dev init: net.eth0 and the Starting eth0, but i'm afraid that now i won't have any hardwired eth0 connection at all (not that i need it now, but will eventually)

----------

## xtz

Did u compiled the new kernel and (rebooted into it, if u had statically compiled the driver) loaded the module after it?

----------

## Dr Croubie

yep, even with the genkernel, with everything compiled as modules, and loaded, i still get the:

>ifconfig wlan0 up

SIOCSIFFLAGS: No such file or directory

error.

and:

>lsmod | grep -i iwl

iwlagn 57348 0

iwlcore 62848 1 iwlagn

rfkill 9936 2 iwcore

led_class 5892 1 iwlcore

mac80211 101904 2 iwlagn,iwlcore

cfg80211 26784 3 iwlagn,iwlcore,mac80211

firmware_class 8720 3 iwlagn,qla2xxx,pcmcia

so everything's loaded fine.

again, imho this isn't a kernel issue, the problem is with the SIOCSIFFLAGS error. firstly, how can i tell _what_ exactly directory or file it's looking for that it can't find? ifconfig doesn't seem to have a --verbose switch on it...

----------

## Dr Croubie

ok, so i've solved this after much probing around.

set udev.conf to full debugging to try find out where this SIOCSIFFLAGS jobby was coming from, and in conjunction with http://www.linuxquestions.org/questions/linux-wireless-networking-41/siocsifflags-no-such-file-or-directory-184147/ i decided that it was missing firmware. indeed ls /lib/firmware was consipcuously absent of any iwl* kind of files.

so a giant 'find / *iwl*' actually found something in the portage directory, iwl4965-ucode or something.

emerged it (chrooted from livecd where the network works), rebooted, and voilá, it works.

so is this just a gentoo thing, removing firmware compilation from the kernel for those paranoid people who don't like binary blobs?

----------

