I'm trying to get the wifi working on my raspberry pi but the devices say 'device not ready' and when the pi boots it says failed to start raise network interfaces. Any help would be appreciated. Thanks.

I try /etc/init.d/networking restart and it says

[....] Restarting networking (via systemctl): networking.serviceJob for networking.service failed because the control process exited with error code.
See "systemctl status networking.service" and "journalctl -xe" for details.

Then when i run systemctl status networking.service it says this

● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2019-01-07 17:48:59 UTC; 1min 4s ago
     Docs: man:interfaces(5)
  Process: 857 ExecStartPre=/bin/sh -c if [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ]; then udevadm settle; fi (code=exited, s
  Process: 861 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
 Main PID: 861 (code=exited, status=1/FAILURE)

qun 07 17:48:59  ifup[861]: /etc/network/if-pre-up.d/wpasupplicant: 2: /etc/wpa_supplicant/functions.sh: Status:: not found
qun 07 17:48:59  ifup[861]: /etc/network/if-pre-up.d/wpasupplicant: 3: /etc/wpa_supplicant/functions.sh: Priority:: not found
qun 07 17:48:59  ifup[861]: /etc/network/if-pre-up.d/wpasupplicant: 4: /etc/wpa_supplicant/functions.sh: Section:: not found
qun 07 17:48:59  ifup[861]: /etc/network/if-pre-up.d/wpasupplicant: 5: /etc/wpa_supplicant/functions.sh: Installed-Size:: not found
qun 07 17:48:59  ifup[861]: /etc/network/if-pre-up.d/wpasupplicant: 7: /etc/wpa_supplicant/functions.sh: Syntax error: newline unexpected
qun 07 17:48:59  ifup[861]: run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 2
qun 07 17:48:59  systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
qun 07 17:48:59  ifup[861]: ifup: pre-up script failed
qun 07 17:48:59  systemd[1]: networking.service: Failed with result 'exit-code'.
qun 07 17:48:59  systemd[1]: Failed to start Raise network interfaces.

The only thing in the /etc/network/interfaces file is auto lo iface lo inet loopback. I had the wifi configured from the widget in the taskbar. It was working fine before, but my raspberry pi shutdown after a power loss during an apt upgrade and now the wifi doesn't work.

  • Have you set the country code? If yes, what does sudo rfkill list all tell us? If not, then you MUST set the country code to get WiFi active. – Dougie Jan 7 at 19:59
  • My country code is set to US & the output of rfkill list all is 0: phy0: Wireless LAN Soft blocked: no Hard blocked: no 1: phy1: Wireless LAN Soft blocked: no Hard blocked: no 2: phy2: Wireless LAN Soft blocked: no Hard blocked: no – user97176 Jan 7 at 20:20
  • So you need to free up those interfaces with sudo rfkill unblock all. Then the GUI widget in the taskbar should be able to configure your SSID/password. Note: it won't work if your access point is using WEP security. – Dougie Jan 7 at 20:55
  • rfkill unblock all didnt do anything unfortunately they still say 'device not ready'. When I did rfkill list all they already said soft blocked: no. – user97176 Jan 7 at 21:03
  • Do you use /etc/network/interfaces to configure wifi? Please address me with @Ingo otherwise I wouldn't see your reply. – Ingo Jan 7 at 21:28

Because you had an interrupted upgrade it may be possible that it has broken your wifi setup. As said in the comments you are able to connect to the internet with an ethernet cable. First you should "finish" the upgrade with:

rpi ~$ sudo apt update
rpi ~$ sudo apt full-upgrade
rpi ~$ sudo systemctl reboot

Raspbian does not use networking with ifupdown by default so it does not make sense to restart its service. The unmodified /etc/network/interfaces looks like this:

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

You should check why you have a modified interfaces file.

Another step could be to check the wifi setup how it is explained at Setting WiFi up via the command line. Don't forget to set the country code.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.