MrEngman
Posts: 3578
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

wpa_supplicant.conf not being moved from /boot

Tue Jun 07, 2016 11:53 pm

The latest update to Raspbian blog here says if file wpa_supplicant.conf is written to the /boot directory when the Pi is booted it will be moved to /etc/wpa_supplicant/wpa_supplicant.conf to configure the wifi.

Just tried it out at least half a dozen times and it has not worked at all.

I am trying with the lastest raspbian jessie lite 2016-05-27-raspbian-jessie-lite with a Pi 3 B. I have re-formatted and re-written the SD card each time and although the Pi 3 has booted every time and I have been able to access it using SSH via ethernet the file wpa_supplicant.conf is not being copied to directory /etc/wpa_supplicant so the wifi is not being configure.

If I copy wpa_supplicant.conf manually from dir /boot to dir /etc/wpa_supplicant and reboot the wifi comes up OK.

So for whatever reason wpa_supplicant.conf is not being automatically moved.

Any idea why it's not working?



MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4731
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: wpa_supplicant.conf not being moved from /boot

Wed Jun 08, 2016 1:03 am

What does 'apt-cache policy raspberrypi-net-mods' say?

echomancer
Posts: 13
Joined: Fri Feb 27, 2015 4:29 am

Re: wpa_supplicant.conf not being moved from /boot

Wed Jun 08, 2016 1:50 am

I am having the same problem. I executed the requested command and I get the following:

raspberrypi-net-mods:
Installed: (none)
Candidate: 1.2.2
Version table:
1.2.2 0
500 http://archive.raspberrypi.org/debian/ jessie/main armhf Packages

ETA - I'm running Jessie Lite, maybe that's the problem?
Last edited by echomancer on Wed Jun 08, 2016 1:51 am, edited 1 time in total.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4731
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: wpa_supplicant.conf not being moved from /boot

Wed Jun 08, 2016 1:51 am

It needs to be installed.

echomancer
Posts: 13
Joined: Fri Feb 27, 2015 4:29 am

Re: wpa_supplicant.conf not being moved from /boot

Wed Jun 08, 2016 1:54 am

ShiftPlusOne wrote:It needs to be installed.
This package does not come installed on Lite I presume?

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4731
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: wpa_supplicant.conf not being moved from /boot

Wed Jun 08, 2016 1:55 am

No, but it probably should. Off the top of my head, I don't know why it has a dependency on raspberrypi-ui-mods. Will get it sorted with the next release.

echomancer
Posts: 13
Joined: Fri Feb 27, 2015 4:29 am

Re: wpa_supplicant.conf not being moved from /boot

Wed Jun 08, 2016 2:14 am

Thanks for that. I intentionally run my Pis headless, so installing UI anything is bloat :D

Also, this was disappointing to find out, as I have to continue connecting my Pis to monitors/keyboards to get their initial setup complete :(

MrEngman
Posts: 3578
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: wpa_supplicant.conf not being moved from /boot

Wed Jun 08, 2016 2:51 am

Seems like @echomancer has answered the question about 'apt-cache policy raspberrypi-net-mods'

Looks like apt-get install raspberrypi-net-mods requires 353 files installing including the X GUI and consuming an additional 378MB of the SD card.

Tried 2016-05-27-raspbian-jessie and it worked with no issues, except I'm not interested in raspbian with the X GUI and it seems that wpa_supplicant is moved by the file /etc/network/if-pre-up.d/01-wpa-config-copy as part of ifupdown and it doesn't exist in Jessie lite.

Why this should need the GUI and so much else installing seems just a little crazy. I think it would be really useful to get this working with Jessie lite, especially for the Pi Zero.

Really interested to see what you can do, and if you want someone to check it out let me know.



MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

MrEngman
Posts: 3578
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: wpa_supplicant.conf not being moved from /boot

Wed Jun 08, 2016 3:05 am

echomancer wrote:Thanks for that. I intentionally run my Pis headless, so installing UI anything is bloat :D

Also, this was disappointing to find out, as I have to continue connecting my Pis to monitors/keyboards to get their initial setup complete :(
Don't know if you might find this useful but I currently set up my wifi when generating a new SD card by using a USB SD card reader connected to another Pi, mounting the new SD card on that Pi, and then copying the wpa_supplicant.conf from that Pi to the new SD card and if required editing it as necessary. All done headless via SSH so saves having to bother with an additional keyboard and display.



MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

User avatar
Cancelor
Posts: 743
Joined: Wed Aug 28, 2013 4:09 pm
Location: UK

Re: wpa_supplicant.conf not being moved from /boot

Wed Jun 08, 2016 6:23 am

echomancer wrote:Thanks for that. I intentionally run my Pis headless, so installing UI anything is bloat :D

Also, this was disappointing to find out, as I have to continue connecting my Pis to monitors/keyboards to get their initial setup complete :(
Yup as MrEngman says, there is a way round that. If you have a Linux PC or a.n.other RPi then mount the SD card after burning and edit wpa_supplicant.conf before moving it to the RPi. On my PC I use

Code: Select all

sudo nano /media/antec/eda95d8a-9cdd-4224-96d0-890b4791600c/etc/wpa_supplicant/wpa_supplicant.conf

Code: Select all

$ df -h
will show you your version of /media/antec/eda95d8a-9cdd-4224-96d0-890b4791600c
:geek:
Can't find the thread you want? Try googling : YourSearchHere site:raspberrypi.org

MrEngman
Posts: 3578
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: wpa_supplicant.conf not being moved from /boot

Thu Oct 13, 2016 1:22 pm

ShiftPlusOne wrote:No, but it probably should. Off the top of my head, I don't know why it has a dependency on raspberrypi-ui-mods. Will get it sorted with the next release.
Just tried with the latest version of Jessie lite, 2016-09-23-raspbian-jessie-lite, and the problem still exists.

It would be really useful to get this working, especially if using a Pi Zero, as the only way to fix it at the moment is to then edit the SD card on another Linux system, a Pi or PC running Linux, to add wpa_supplicant.conf to get the wifi configured.



MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4731
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: wpa_supplicant.conf not being moved from /boot

Thu Oct 13, 2016 1:36 pm

MrEngman wrote:
ShiftPlusOne wrote:No, but it probably should. Off the top of my head, I don't know why it has a dependency on raspberrypi-ui-mods. Will get it sorted with the next release.
Just tried with the latest version of Jessie lite, 2016-09-23-raspbian-jessie-lite, and the problem still exists.

It would be really useful to get this working, especially if using a Pi Zero, as the only way to fix it at the moment is to then edit the SD card on another Linux system, a Pi or PC running Linux, to add wpa_supplicant.conf to get the wifi configured.



MrEngman
Let me actually add this to the todo list so it doesn't get forgotten. Thanks.

MrEngman
Posts: 3578
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: wpa_supplicant.conf not being moved from /boot

Thu Oct 13, 2016 1:39 pm

ShiftPlusOne wrote:
MrEngman wrote:
ShiftPlusOne wrote:No, but it probably should. Off the top of my head, I don't know why it has a dependency on raspberrypi-ui-mods. Will get it sorted with the next release.
Just tried with the latest version of Jessie lite, 2016-09-23-raspbian-jessie-lite, and the problem still exists.

It would be really useful to get this working, especially if using a Pi Zero, as the only way to fix it at the moment is to then edit the SD card on another Linux system, a Pi or PC running Linux, to add wpa_supplicant.conf to get the wifi configured.



MrEngman
Let me actually add this to the todo list so it doesn't get forgotten. Thanks.
Now that sounds like a good idea, Thanks :lol: :lol:



MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

User avatar
HawaiianPi
Posts: 1393
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: wpa_supplicant.conf not being moved from /boot

Thu Oct 13, 2016 7:58 pm

MrEngman wrote:Just tried with the latest version of Jessie lite, 2016-09-23-raspbian-jessie-lite, and the problem still exists.

It would be really useful to get this working, especially if using a Pi Zero, as the only way to fix it at the moment is to then edit the SD card on another Linux system, a Pi or PC running Linux, to add wpa_supplicant.conf to get the wifi configured.

MrEngman
Same here. Really disappointed that this has still not been fixed. :(

Is there any reason to even have a new "Lite" image, as opposed to just using the old image with a dist-upgrade?
My password is the last 8 digits of Pi.

MrEngman
Posts: 3578
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: wpa_supplicant.conf not being moved from /boot

Fri Oct 14, 2016 11:33 am

HawaiianPi wrote:
MrEngman wrote:Just tried with the latest version of Jessie lite, 2016-09-23-raspbian-jessie-lite, and the problem still exists.

It would be really useful to get this working, especially if using a Pi Zero, as the only way to fix it at the moment is to then edit the SD card on another Linux system, a Pi or PC running Linux, to add wpa_supplicant.conf to get the wifi configured.

MrEngman
Same here. Really disappointed that this has still not been fixed. :(

Is there any reason to even have a new "Lite" image, as opposed to just using the old image with a dist-upgrade?
The Lite image does not include the X GUI and when installed on an SD card uses about 3GB less capacity than the full image. I don't use the GUI so the Lite image is ideal as it saves a lot of memory space that I can use for other things. I expect there are many others who use it for the same reason.



MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

User avatar
HawaiianPi
Posts: 1393
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: wpa_supplicant.conf not being moved from /boot

Fri Oct 14, 2016 8:57 pm

MrEngman wrote:The Lite image does not include the X GUI and when installed on an SD card uses about 3GB less capacity than the full image. I don't use the GUI so the Lite image is ideal as it saves a lot of memory space that I can use for other things. I expect there are many others who use it for the same reason.

MrEngman
I understand that. Just wondering why they needed a new September-2016 Lite image, since the main bug in Lite was not fixed.

Sorry, I'm just a bit bent that they didn't fix the problem. I suspect many, if not most using Lite are running headless, and the /boot/wpa_supplicant.conf feature is most useful on headless systems (after all, GUI users have a GUI for wireless connections).
My password is the last 8 digits of Pi.

sco3tt
Posts: 1
Joined: Sat Jan 21, 2017 11:46 pm

Re: wpa_supplicant.conf not being moved from /boot

Sat Jan 21, 2017 11:55 pm

In case anyone else stumbles into this thread like I did and wonders if this feature is working yet with Jessie Lite, I just tried it with the 2017-01-11 release and it succeeded (it may work with earlier releases too but I haven't tested it).

However, remember that SSH is disabled by default as of November 2016 (https://www.raspberrypi.org/documentati ... ccess/ssh/) but you can enable it by creating an empty file named "ssh" (with no extension) in the boot partition.

zaadstra
Posts: 4
Joined: Wed Feb 04, 2015 10:30 pm

Re: wpa_supplicant.conf not being moved from /boot

Thu Aug 17, 2017 8:11 pm

Just tested the Lite version of Raspbian Jessie v4.9 2017-07-05 and shiny new Raspbian Stretch 4.9 2017-08-16.

Both are NOT working....... Bummer.

tjohnson
Posts: 26
Joined: Sat Jun 11, 2016 7:39 pm

Re: wpa_supplicant.conf not being moved from /boot

Wed Aug 30, 2017 12:31 pm

I can confirm that this is not working with the 2017-08-16 version of Raspbian Stretch Lite. Fortunately I have Ubuntu on a USB flash drive and Debian in VirtualBox, so I should be able to use one of them to edit the file manually.

IMO there's no reason why this feature should be limited to the full version of Raspbian, since I think it's more useful for the lite version which is often run headless.

DirkS
Posts: 7706
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: wpa_supplicant.conf not being moved from /boot

Wed Aug 30, 2017 5:17 pm

tjohnson wrote:
Wed Aug 30, 2017 12:31 pm
I can confirm that this is not working with the 2017-08-16 version of Raspbian Stretch Lite. Fortunately I have Ubuntu on a USB flash drive and Debian in VirtualBox, so I should be able to use one of them to edit the file manually.
It may not be working on *your* system for some unknown reason, but it certainly worked without any problems on mine.
So there's either a very mysterious intermittent problem or you made a mistake...

User avatar
HawaiianPi
Posts: 1393
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: wpa_supplicant.conf not being moved from /boot

Wed Aug 30, 2017 7:10 pm

zaadstra wrote:
Thu Aug 17, 2017 8:11 pm
Just tested the Lite version of Raspbian Jessie v4.9 2017-07-05 and shiny new Raspbian Stretch 4.9 2017-08-16.

Both are NOT working....... Bummer.
It absolutely works with 2017-07-05 Jessie-Lite! I have done it many times on different Raspberry Pi models we have. You did something wrong. See below for Stretch-Lite...

tjohnson wrote:
Wed Aug 30, 2017 12:31 pm
I can confirm that this is not working with the 2017-08-16 version of Raspbian Stretch Lite. Fortunately I have Ubuntu on a USB flash drive and Debian in VirtualBox, so I should be able to use one of them to edit the file manually.

IMO there's no reason why this feature should be limited to the full version of Raspbian, since I think it's more useful for the lite version which is often run headless.
It also works on 2017-08-16 Raspbian Stretch Lite, HOWEVER, it requires a complete wpa_supplicant.conf file. The minimal version that worked on previous versions no longer works with Stretch.

For Jessie-Lite all you needed in wpa_supplicant.conf was:

Code: Select all

network={
	ssid="your-network-service-set-identifier"
	psk="your-network-WPA/WPA2-security-passphrase"
}
For the new Raspbian Stretch you need the complete version:

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US

network={
	ssid="your-network-service-set-identifier"
	psk="your-network-WPA/WPA2-security-passphrase"
	key_mgmt=WPA-PSK
}
EDIT:
I suppose for the sake of accuracy I should say, I tested it with the minimal version of wpa_supplicant.conf and it did not work, then I tested it with the full version and it did. Some information that Stretch needs is missing from the minimal version. Note that in both cases the file was moved to the appropriate folder, but the minimal version just didn't work.
Last edited by HawaiianPi on Thu Aug 31, 2017 8:39 pm, edited 1 time in total.
My password is the last 8 digits of Pi.

Machack63
Posts: 3
Joined: Thu Aug 31, 2017 9:07 am

Re: wpa_supplicant.conf not being moved from /boot

Thu Aug 31, 2017 9:35 am

I can confirm that with stretch lite not even editing wpa_supplicant.conf does work - following this instructions:
https://www.raspberrypi.org/documentati ... ess-cli.md
so moving may not be the problem.
could not get stretch lite to work with wlan - costed me 2 hours and switched back to jessie
worked like a charm with the latest jessie...

User avatar
KLL
Posts: 1122
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: wpa_supplicant.conf not being moved from /boot

Thu Aug 31, 2017 12:03 pm

Machack63 wrote:
Thu Aug 31, 2017 9:35 am
with stretch lite
editing wpa_supplicant.conf does not work
so moving may not be the problem
it is not very clear what you did and what your problem is
( but i not ask you for details, instead just tell you what i just did to check)
-a- unzip/copy noobs lite v2.4 to clean SD
-b- copy file ssh
-c- copy file wpa_supplicant.conf
-d- powerup RPI3 with this SD, ( and HDMI to TV / radio combo keyboard mouse )
++ noobs show the install list, so that wpa_supplicant.conf file works for NOOBS
++ install RASPBIAN LITE ( STRETCH) [OK]
+ + + and that is online too by WIFI and remote SSH work also.

to find / edit that file now:
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Code: Select all

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
	ssid="my-wlan"
	psk="my-password"
	key_mgmt=WPA-PSK
} 
 
for NOOBS the files are still on the first partition!
Last edited by KLL on Thu Aug 31, 2017 1:44 pm, edited 4 times in total.

Machack63
Posts: 3
Joined: Thu Aug 31, 2017 9:07 am

Re: wpa_supplicant.conf not being moved from /boot

Thu Aug 31, 2017 12:27 pm

This is what i did:
- Raspberry Zero W
- Downloaded latest Stretch Lite to Zip - on a SD Card with Etcher
- Booted with Screen and Usb Keyboard
- Edited /etc/wpa_supplicant/wpa_supplicant.conf, adding network={ ....}
- Issued sudo wpa_cli reconfigure
- error: Failed to connect to non-global ctrl_ifname: (nil) error: No such file or directory

see: viewtopic.php?t=39690

Did the same with Jessie Lite and it worked without problems...

User avatar
KLL
Posts: 1122
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: wpa_supplicant.conf not being moved from /boot

Thu Aug 31, 2017 1:03 pm

-a- pls. show the wpa_supplicant.conf file what does not work for STRETCH
-b- if you burn raspbian lite stretch
why not copy that ( a good) wpa_supplicant.conf file to the SD ( while still on PC ) ( to the so called /boot/ dir )

2017-08-16-raspbian-stretch-lite.zip --> etcher to USB stick ( 8min )
take out /in
copy ssh and wpa_supplicant.conf file also to usb stick
take usb stick to RPI3
boot in RPI3
ONLINE
( the files are MOVED, not in /boot/ anymore )


also:
if i edit the file
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
and delete the first 3 lines ( so i only have the network={} ) and reboot
NOT ONLINE
( must do the file thing from PC again )


sorry i have no RPI0W to test.

Return to “Troubleshooting”

Who is online

Users browsing this forum: dazz100 and 54 guests