void-mklive icon indicating copy to clipboard operation
void-mklive copied to clipboard

void-installer: DHCP request failed for WPA2-encrypted Wi-Fi network

Open joshuakraemer opened this issue 7 years ago • 21 comments

uname -a: Linux void-live 4.12.13_1 #1 SMP PREEMPT Thu Sep 14 13:15:00 URC 2017 x86_64 GNU/Linux

Affected program: void-installer 0.22 b4804a8

On the latest live image, the void-installer utility fails to connect to my local WPA2-encrypted Wi-Fi network. It works after restarting dhcpcd.

Steps to reproduce this issue

  1. run sudo void-installer
  2. select "Network"
  3. select the Wi-Fi interface (wlp1s0)
  4. enter the details (SSID = ..., encryption = "wpa", Password = ...)
  5. the following error message is shown: "ERROR: DHCP request failed for wlp1s0. Check /dev/tty8 for errors."
  6. check tty8, only message is: "sending commands to master dhcpcd process"
  7. select "Exit"
  8. run sudo sv restart dhcpcd
  9. repeat steps 1–4
  10. the following message is shown: "Network is working properly!"

joshuakraemer avatar Jun 30 '18 12:06 joshuakraemer

Same syntoms. The problem for me is that my wifi password contains spaces and only the first word is read from the text box when generating the wpa_supplicant config.

Pitasi avatar Jan 05 '19 19:01 Pitasi

i have the same problem and the suggested solution does not work after local install however all you have to do is start wpa_supplicant and everything works... can't get it to work during installation however

ghost avatar Apr 04 '20 20:04 ghost

It seems like the installer was never adapted to the dhcpcd wpa_supplicant hook being disabled (https://voidlinux.org/news/2019/01/dhcpcd-7.1.0.html).

I would recommend that:

  • the vmklive dracut file be modified to enable wpa_supplicant when dhcpcd is in use
  • the installer be modified to:
    • configure the network using the general config file (/etc/wpa_supplicant/wpa_supplicant.conf)
    • reload the running wpa_supplicant
    • remove the wpa_supplicant bits from the dhcpcd invocation

CameronNemo avatar Nov 13 '20 03:11 CameronNemo

Still doesn't work on the latest ISO. I have enabled wpa_supplicant service with ln -s /etc/sv/wpa_supplicant /etc/runit/runsvdir/default/ before running void-installer but nothing changed.

pyramidhead52 avatar Mar 10 '21 20:03 pyramidhead52

+1 I also have this issue. It seems nobody cares to fix this.

terremoth avatar Apr 19 '21 18:04 terremoth

my solution : execute

wpa_passphrase <MYSSID> <passphrase> >> /etc/wpa_supplicant/wpa_supplicant-<device_name>.conf

(you can learn your device name by executing ip a) then run

ln -s /etc/sv/wpa_supplicant /var/service/

then start the void installer

usdogu avatar May 01 '21 15:05 usdogu

Bug still exists.

timsofteng avatar Sep 26 '21 09:09 timsofteng

I had to unblock the wifi with rfkill first. After that, everything worked.

rfkill unblock wlan

ndgnuh avatar Sep 27 '21 14:09 ndgnuh

I had to unblock the wifi with rfkill first. After that, everything worked.

rfkill unblock wlan

I had to do that once too... Seems nobody cares about wifi/wireless things on these minimal distros. Also seems they test only internet directly on ethernet cable before launch new distros versions. I am not speaking only about Void here. I had these problems even in distros such as Alpine, Adelie and AntiX.

The truth is: already passed the time to replace wpa_supplicant and NetworkManager sh1ts to newer and less RAM consuming softwares (like nm-applet is a RAM cancer). Very old and bloated softwares, sometimes with unexpected behavior and not easy/fast to configure.

terremoth avatar Sep 27 '21 15:09 terremoth

Same here

nonetrix avatar Oct 17 '21 03:10 nonetrix

Why does this issue still exist?

ghost avatar Oct 24 '21 22:10 ghost

low priority and high effort in duplication and iteration.

Vaelatern avatar Oct 25 '21 03:10 Vaelatern

Why does this issue still exist?

lemme guess... because there still people that have this problem?

terremoth avatar Oct 25 '21 05:10 terremoth

Why does this issue still exist?

lemme guess... because there still people that have this problem?

I meant to ask why hasn't this issue been fixed yet? I mean it's been like 3 years since this issue first appeared.

ghost avatar Oct 25 '21 16:10 ghost

@Shulkk I proposed a fix in #156 but nobody has tested it. Could you build an image using that branch and test it?

CameronNemo avatar Oct 25 '21 21:10 CameronNemo

my solution : execute

wpa_passphrase <MYSSID> <passphrase> >> /etc/wpa_supplicant/wpa_supplicant-<device_name>.conf

(you can learn your device name by executing ip a) then run

ln -s /etc/sv/wpa_supplicant /var/service/

then start the void installer

A few more steps was needed for this to work in my case. My network adapter is called wlp3s0.

ln -s /etc/sv/wpa_supplicant /etc/runit/runsvdir/default

This will start the service. To see any error messages:

wpa_cli -i wlp3s0

If you don't see any errors running this command, your network is probably ok, and you can run the void installer agian.

henrikstroem avatar May 18 '22 20:05 henrikstroem

my solution : execute

wpa_passphrase <MYSSID> <passphrase> >> /etc/wpa_supplicant/wpa_supplicant-<device_name>.conf

(you can learn your device name by executing ip a) then run

ln -s /etc/sv/wpa_supplicant /var/service/

then start the void installer

A few more steps was needed for this to work in my case. My network adapter is called wlp3s0.

ln -s /etc/sv/wpa_supplicant /etc/runit/runsvdir/default

This will start the service. To see any error messages:

wpa_cli -i wlp3s0

If you don't see any errors running this command, your network is probably ok, and you can run the void installer agian.

Whattttttttttt, they haven't resolved this yet? half of 2022?

terremoth avatar May 19 '22 17:05 terremoth

Please someone tag void devs here, this is an easy issue to solve, just adding commands to the installer...

terremoth avatar May 19 '22 17:05 terremoth

PR welcome

Vaelatern avatar May 19 '22 19:05 Vaelatern

@Vaelatern I made a PR and linked it from this ticket. Testers welcome.

CameronNemo avatar May 20 '22 14:05 CameronNemo

This solution did not work for me at the begainning so i did that:

  • ip -c a
  • wpa_supplicant -B -i wlp3s0 -c /etc/wpa_supplicant/wpa_supplicant.conf

    Successfully initialized wpa_supplicant

  • wpa_cli
    • add_network

    0

    • set_network 0 ssid "hidden_ssid"
    • set_network 0 psk "password"
    • set_network 0 scan_ssid 1

      CONNECT TO HIDDEN SSID

    • enable_network 0
    • save_config
    • select_network 0

Then i just realised that issue happened because of "hidden wifi" so this solution works but you have to add scan_ssid=1 inside network block before ln -s /etc/.....

my solution : execute

wpa_passphrase <MYSSID> <passphrase> >> /etc/wpa_supplicant/wpa_supplicant-<device_name>.conf

(you can learn your device name by executing ip a) then run

ln -s /etc/sv/wpa_supplicant /var/service/

then start the void installer

3BD-R avatar Jul 02 '22 14:07 3BD-R

This is how I fixed the problem during my void-musl installation.

Before launching void-installer

rfkill unblock wlan

Next, enable the wpa_supplicant service

ln -s /etc/sv/wpa_supplicant /var/service

Next cd to where the config file for your network is located

cd /etc/wpa_supplicant/

Run an ls to see the names of the config files in this directory The one we are interested in is the one with wlp2s0 in its name

Open it

vi wpa_supplicant-wlp2s0.conf

// in vi Write the following, or edit it if there's some text already

# my home network

network={ ssid="[network-name]" psk="[your-strong-password]" scan_ssid=1 key_mgmt=WPA-PSK }

You can add more than one network to this file. Just add another network block. Exit vi

:wq

Then restart wpa_supplicant

sv restart wpa_supplicant

Wait for a few seconds

ping github to see if you have an internet connection

ping www.github.com

Now you can start the

void-installer

1Kinoti avatar Sep 22 '22 17:09 1Kinoti

Do I need to make a fresh live iso in order to benefit from this fix? This issue is not resolved when using the latest iso from the Void homepage.

skyler544 avatar Oct 09 '22 12:10 skyler544

yes, until the new iso is released

classabbyamp avatar Oct 09 '22 14:10 classabbyamp

Happy to find that this issue has been fixed, nearly a year later :)

ghost avatar Oct 09 '22 20:10 ghost

4 years actually 🙂

paper42 avatar Oct 09 '22 20:10 paper42

I really can't believe there's been 6 years and this problem still persists.

NovaFugaz avatar Feb 10 '24 14:02 NovaFugaz

then make a new issue with more info

classabbyamp avatar Feb 10 '24 14:02 classabbyamp