# [solved]can't locate /var/run/wpa_supplicant ???

## skorefish

Hi, 

in my wpa_supplicant.conf file there is a line ctrl_interface=/var/run/wpa_supplicant

When i go to the directory I can't find wpa_supplicant file. What can i do?Last edited by skorefish on Wed Jul 22, 2015 8:21 pm; edited 1 time in total

----------

## DONAHUE

are you running systemd or openrc or something else to init your system?

are you attempting gentoo netscripts, dhcpcd, wicd, networkmanager, or something else for network management?

----------

## skorefish

Donahue,

i think openRC, I just did emerge wpa_supplicant

I kind of follow the gentoo handbook.

I 've used the command dhcpcd,yes. I 've used the rc-update command for my eth0 (this one works) but wlan0 doesn't work

oh i work command line

I installed portage stage3, i managed (with some help) to install the ethernet, and now i'm trying to install wlan0. (it's very hard)Last edited by skorefish on Tue Jul 21, 2015 6:11 pm; edited 1 time in total

----------

## DONAHUE

/var/run/wpa_supplicant will not exist until wpa_supplicant is started. wpa_supplicant is ordinarily started as a secondary process by gentoo netscripts, dhcpcd, wicd, networkmanager, or something else. some of these will not create /var/run/wpa_supplicant

run 

```
ifconfig -a
```

 what interface names are shown?

----------

## skorefish

here it is : https://bpaste.net/show/ae2236dbbf14

----------

## DONAHUE

If wireless is working for you but you can't find /var/run/wpa_supplicant don't worry about it. Enjoy your wireless.

If no wireless:

```
emerge netifrc

rc-update show | wgetpaste -t
```

post url, look for net.lo, net.wlan0, net.eth0 in the default run level

----------

## skorefish

https://bpaste.net/show/b8b994596240

            net.eth0 |      default                 

            net.wlan0 | boot default                 

             netmount |      default  

can't find net.loLast edited by skorefish on Tue Jul 21, 2015 6:54 pm; edited 1 time in total

----------

## DONAHUE

```
rc-update del net.wlan0 boot 

rc-update add net.lo boot

```

do you wish to use dhcp (recommended for mobile) or fixed IP

resulting rc-update show should be:  

net.eth0 default 

net.lo boot  

net.wlan0 default

----------

## skorefish

fixed ip

oops i forgot the netifrc

----------

## skorefish

ok netifrc ok. net.lo added to boot

but not ok yet

----------

## DONAHUE

Recommend 

```
nano /etc/conf.d/net
```

 and edit {replace my 192.168.1.x with your IP's} to

 *Quote:*   

> dns_servers="192.168.1.1 8.8.8.8"
> 
> modules_wlan0="wpa_supplicant"
> 
> wpa_supplicant_wlan0="-Dnl80211"
> ...

  the lines  *Quote:*   

> wpa_supplicant_wlan0="-Dnl80211"
> 
> #wpa_supplicant_wlan0="-Dwext"

  reflect that nl80211 driver works for me so is not commented, wext driver also works for me but is commented as I prefer nl80211, the commented lines with dhcp are occasionally swapped in for testing

----------

## DONAHUE

then 

```
/etc/init.d/net.wlan0 restart
```

----------

## skorefish

is rebooting also good ?

I always have to reboot to go to the  forum

I tried lyx but i'm not used to it yet

btw eth0 works wlan0 doesn't but it must be possible cause it works with systemrescueCD. but with systemrescue the nic's have other names

----------

## DONAHUE

```
iwlist wlan0 scan 
```

 brb dog must walk

----------

## skorefish

https://bpaste.net/show/06afdbfc21b1

I truncated it to see only my router

----------

## DONAHUE

as your wpa_supplicant.conf substituting for yourkey 

 *Quote:*   

> ctrl_interface=/var/run/wpa_supplicant
> 
> ctrl_interface_group=0
> 
> update_config=1
> ...

  then 

```
/etc/init.d/net.eth0 stop

/etc/init.d/net.wlan0 restart
```

 if fails 

```
/etc/init.d/net.eth0 restart

dmesg | wgetpaste -t
```

 post url

----------

## skorefish

so i paste that in my /etc/wpa_supplicant.conf

----------

## DONAHUE

and then change yourkey to the passphrase for your router

another way is use wps if both nic and router have buttons

----------

## skorefish

no buttons on the router

fail : https://bpaste.net/show/7f10ae58444f

----------

## DONAHUE

 *Quote:*   

> ctrl_interface=/var/run/wpa_supplicant 
> 
> ctrl_interface_group=0 
> 
> update_config=1 
> ...

  AAArgh I left off the closing }

However there is a more severe problem in dmesg: *Quote:*   

>  systemd-udevd[307]: inotify_init failed: Function not implemented
> 
> systemd-udevd[307]: error initializing inotify

  No inotify means no running udev means no xserver means no GUI ....

----------

## DONAHUE

see my Posted: Fri Jul 17, 2015 12:17 pm at

https://forums.gentoo.org/viewtopic-t-1021872-start-25.html

check through and edit menuconfig and mount boot partition (if exists),recompile, reinstall kernel

headed for dinner back in hour or two

----------

## skorefish

Enjoy your dinner, (bon apetit) I 'm off to bed.. thx and greatings from belgium (europe)

I 'll recompile tomorrow.   :Smile: 

----------

## skorefish

the new machine status : https://bpaste.net/show/4653e1a445d5

----------

## DONAHUE

The good news is that udev is alive.

may be as simple as stopping enp3s0 before trying to start wlp2s0

in /etc/conf.d/net uncomment the wext line, comment out the nl80211 line and restart the interface, still failing, comment out iwconfig_wlp2s0_mode="Managed" nd restart the interface

your thought about "yourkey" versus just yourkey is a good one, I've seen that problem

----------

## skorefish

It doesn't work but i have some more info here (i tried a -v as i have seen with other commands)

https://bpaste.net/show/f1bc38c58107

```
start-stop-daemon: fopen `/var/run/wpa_supplicant-wlp2s0.pid': No such file
```

What can i do more ?

----------

## skorefish

hi DONAHUE,

it works!!!! thx for the great tips. I had to install PACKET in the kernel!!

----------

## DONAHUE

Well done. Great find. I've not seen a missing CONFIG_PACKET=y before. Would never have looked for it.   *Quote:*   

> <*> Packet socket

  is part of the default configuration so should have been present when the kernel first emerged.

----------

