"wpa_supplicant failed to start" cant bring up wireless lan

Mason Loring Bliss mason at blisses.org
Mon Jun 19 21:01:48 BST 2023


On Mon, Jun 19, 2023 at 09:24:21PM +0200, Paul Gerdes wrote:

>    After a sucessful boot i am landing in a Terminal TTY and see this
>    Messages:
>    "Configuring network interfaces...wpa_supplicant: /sbin/wpa_supplicant
>    daemon failed to start"

Hi Paul.

First, maybe confirm that the interface shows up - you note it as
wlx0022b05d8515, but it's worth verifying that against the output of "ip a".
There are variations on how it might show up. For instance, on my T420,
running a fresh install of Debian Bookworm with sysvinit, I have this:

---------------------------------------------------------------------------
mason at penguin /home/mason$ grep ifnames /etc/default/grub
GRUB_CMDLINE_LINUX="net.ifnames=0"
---------------------------------------------------------------------------

This makes it so that my wifi interface shows up as wlan0. You want first
and foremost to make sure your /etc/network/interfaces works, and making
sure you've got the right interface name is critical. Next, ensure that
wpasupplicant is installed:

---------------------------------------------------------------------------
mason at penguin /home/mason$ dpkg -l wpasupplicant | grep wpa
ii  wpasupplicant  2:2.10-12    amd64        client support for WPA and
WPA2 (IEEE 802.11i)
---------------------------------------------------------------------------

Finally, make sure your /etc/network/interfaces doesn't have syntax errors.
There are multiple ways to do it. The way I do it is to tell ifupdown (the
packages that uses /etc/network/interfaces) to let wpasupplicant configure
my wifi, and then I just point to that config. I also do a tricky thing
where my laptop will set up ethernet only if ethernet is plugged in,
otherwise wifi only. My interfaces file is as follows:

---------------------------------------------------------------------------
mason at penguin /home/mason$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source /etc/network/interfaces.d/*

auto eth0
iface eth0 inet dhcp
    pre-up /sbin/mii-tool eth0 | /bin/grep -qv "no link"

auto wlan0
iface wlan0 inet dhcp
    pre-up /sbin/mii-tool eth0 | /bin/grep -q "no link"
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf  
---------------------------------------------------------------------------

This means I have to actually define my networks in that wpa_supplicant.conf
file, and that might look like this:

---------------------------------------------------------------------------
mason at penguin /home/mason$ cat /etc/wpa_supplicant/wpa_supplicant.conf 
network={
        ssid="your-network-name-here"
        psk="your-network-password can-also-be-a-hash"
        priority=20
}

network={
        key_mgmt=NONE
}
---------------------------------------------------------------------------

This has been working for me for quite some time now, since at least
Buster. I've also allowed ifupdown to specify networks and passwords, and
that's valid too. If your configuration is error-free, and you don't have
missing firmware your NIC needs before it'll run, there's no reason it
won't work reliably under any init system.

-- 
Mason Loring Bliss    mason at blisses.org
They also surf, who only stand on waves.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://www.chiark.greenend.org.uk/pipermail/debian-init-diversity/attachments/20230619/e4847db1/attachment.sig>


More information about the Debian-init-diversity mailing list