0

I am trying to perform a headless setup of a raspberry pi zero W, which involves creating some new files in the boot partition of the SD card before putting it into the pi (wpa_supplicant.conf and ssh). I flashed the card, added the files, and verified that they were saved by ejecting the card then putting it back into my pc to check. However, when I insert the card into the raspberry pi and power it up, it does not connect to Wifi, and when I shut it down and put the card back into my computer, I find that the files that I added are gone.

I followed the same steps as multiple guides on the Internet and none of them seemed to mention how to get around this problem. I am using the latest version of Raspbian stretch lite, a Unirex MicroSDHC 8GB Class 10 card, and a Raspberry Pi zero W. I have tried multiple sd cards, pis and host PCs, but i have not been able to try any different models of anything yet.

Does anybody know what could be the cause of this?

CC518
  • 1
  • Welcome to Raspberry Pi SE. Be sure to take the tour at https://raspberrypi.stackexchange.com/Tour May I suggest that we need a little more help in trying to give a good answer here. "multiple guides" are mentioned but without knowing how to find them to check your work it is difficult. – SDsolar Apr 19 '18 at 01:28
  • Have set the country code in wpa_supplicant.conf? Without it wifi will not start. – Ingo Apr 19 '18 at 07:11

2 Answers2

1

This is by design.

The files are copied to the default locations on boot, then deleted.

If they don't work there is something else wrong.

See How to set up networking/WiFi

Milliways
  • 59,890
  • 31
  • 101
  • 209
0

Milliways is correct. The changes made in the boot folder files gets copied to the correct locations. I found it easiest to just edit the wpa_suplicant.conf file directly in the etc/wpa_suplicant directory to get it to connect to WiFi.

aerotec88
  • 1
  • 1
  • 2