11

I am running Ubuntu Server 12.04. I have a wireless USB card. When I begin the boot process I see:

Waiting for network configuration

It turns out that the network never comes up. But once I get to the command line, if I type: ifup wlan0, then I have network access. My /etc/network/interfaces looks like this:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto wlan0
iface wlan0 inet dhcp
wpa-ssid xxxxxxx
wpa-psk xxxxxxxx

Looking in my network-interface-wlan0.log shows:

Failed to connect to wpa_supplicant - wpa_ctrl_open: Read-only file system
Failed to bring up wlan0.
Failed to connect to wpa_supplicant - wpa_ctrl_open: Read-only file system
ifdown: interface wlan0 not configured

I've looked at other askubuntu.com questions similar to this, but they don't seem to apply.

How can I get my system to network wirelessly at boot?

Additional information:

I did some poking around. Basically once I login I need to do a:

ifdown wlan0

because I think that ip thinks that is is up, but in /var/run/network the only thing that is 'up' is ifup.lo. Then I do a

'ifup -a'

and then everything works.

5 Answers 5

12

Failed to connect to wpa_supplicant - wpa_ctrl_open: Read-only file system

According to your log you 'll need to use wpa_supplicant.

So add something similar to this:

auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant.conf

Contents of /etc/wpa_supplicant.conf :

network={
        ssid="ADD-YOUR-SSID-HERE"
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP TKIP
        group=CCMP TKIP
        psk="ADD-YOUR-WPA-PASSWORD-HERE"
}
1
  • What do we add it to? May 21, 2020 at 17:38
1

You can add ifup wlan0 to your /etc/rc.local file. Add the command ifup wlan0 before the exit 0. Also add the command ifdown wlan0 before the ifup wlan0 like so:

...
ifdown wlan0
ifup wlan0

exit 0

For some reason when Ubuntu starts, it thinks that wlan0 is up. So you have to shut it down and have it back up again.

2
  • This didn't work. I don't think this is happening because ifup isn't be called. I think there's something else wonky going on with the networking system. May 30, 2012 at 5:52
  • Hi, ifup wlan0 should be above the 'exit 0' line. Thanks @Piyush Kumar for mentioning May 30, 2012 at 6:57
1

Connecting to WPA-PSK and WPA2-PSK (Aka "WPA Personal" and "WPA2 Personal" respectively)

  • Run:

    $ wpa_passphrase myssid my_very_secret_passphrase
    

Copy the value of "psk=" from the output above.

  • Open /etc/network/interfaces in a text editor :

    $ sudo sensible-editor /etc/network/interfaces
    
  • Define appropriate stanzas for your wireless interface, along with the SSID and PSK HASH. For example :

    auto wlan0
    face wlan0 inet dhcp
       wpa-ssid <myssid>
       wpa-psk <ccb290fd4fe6b22935cbae3144..>
    
  • Finally run:

    $ sudo ifup wlan0
    

Note: Some answers seems to suggest configuring a separate wpa_supplicant.conf. But it is only required for WPA-EAP, EAP-TLS networks.

How can I get my system to network wirelessly at boot?

The auto stanza does bring up the interface at system startup.

0

I also encounter such a problem.

I noticed that someone said, delete the text about primary network interface, with first 2 lines remaining.

It works, but no network is connected.

Then I write the text of primary network interface back into the interfaces file and reboot.

It's surprising to find not only no hints "waiting for network configuration" occur, but I could connect to the internet.

I don't know whether it is useful for any others.

0

The reason for this is that the filesystem is read-only at boot. At this point only static settings work because udev raises network hotplug signal before the filesystem is ready.

The solution is to change the /etc/init/network-interface.conf file in this line:

"ifup --allow auto ..." to
"ifup --allow=hotplug ...".

You will have to mark you hotplug PCMCI and USB network adapters as "hotplug" in /etc/network/interfaces for them to continue to work, and you should plug them in after boot, not before.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .