rpage6943
Posts: 3
Joined: Sat Sep 05, 2015 3:24 pm

wpa_supplicant.conf issue

Thu Mar 07, 2019 4:37 am

I'm using a Raspberry Pi 2B running raspbian.

I recently changed the SSID on my router and I can no longer find the pi as expected..

I edited the etc/wpa_supplicant/wpa_supplicant.conf file with the new SSID.
If I run wpa_cli reconfigure after the edit, I can use the WiFi as before, everything works fine.

When I cycle power or reboot, I find that the original wpa_supplicant.conf file is back.

It seems an old copy of the file replaces the one I edited, it has the same modify date each time.

I searched for a copy of the wpa_supplicant.conf file on the Pi somewhere but I can't fine one. I also checked for a file with the same modify date as the old wpa_supplicant.conf file and didn't fine one.
I then placed (an edited) wpa_supplicant.conf file in /boot and that didn't help either, in fact, that file seems to go away after a re-boot.

I am woefully ignorant about the finer points of both Linux and the Pi so I am stuck at this point. Does anyone have a suggestion for this problem?

Thanks,

Ralph

klricks
Posts: 6609
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: wpa_supplicant.conf issue

Thu Mar 07, 2019 5:16 am

Your SD card may have gone into read only mode. If so the SD card will need to be replaced.
Do a simple test by creating a file or edit an existing file and see if the file survives reboot.

It is normal for the wpa_supplicant to be automatically deleted (moved) from the root folder of the SD card on reboot..... so that does not help you.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

rpage6943
Posts: 3
Joined: Sat Sep 05, 2015 3:24 pm

Re: wpa_supplicant.conf issue

Thu Mar 07, 2019 6:10 am

Thanks for the help. i believe you are correct.

I created a new file via nano and ran my wine fridge software that generates a text file with temp and humidity data. Both files appeared normal until I cycled power. After reboot, the nano file was gone and the new data file from the wine fridge software reverted back to the old version from 2018. Those files must be buffered up somewhere during operation I guess, and are lost when power is removed.

Any idea what causes this kind of problem with SD card?

Thanks again,

Ralph

User avatar
DougieLawson
Posts: 36327
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: wpa_supplicant.conf issue

Thu Mar 07, 2019 6:37 am

It's a feature of flash memory. When the card is end-of-life the controller makes it read-only. The idea is so you don't lose photos.

There's no way back. The only resolution costs £5 (or more) depending what new SDCard you choose as a replacement.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

rpage6943
Posts: 3
Joined: Sat Sep 05, 2015 3:24 pm

Re: wpa_supplicant.conf issue

Thu Mar 07, 2019 4:14 pm

Thanks for the information, add flash to the list of things I'm woefully ignorant of then, I see.
Guess it's time to clone my old SD card and visit Amazon.

-Ralph

Helen9
Posts: 1
Joined: Thu Mar 07, 2019 11:46 am

Re: wpa_supplicant.conf issue

Fri Mar 08, 2019 7:41 am

The removal of the ssh and wpa_supplicant.conf files on boot is normal. Once the RPi boots, everything should be persistent and the network and ssh available ttrockstars on subsequent boots. If you want to keep copies "just in case", you can create a .zip archive of those files in /boot and it will not be removed.

Return to “Beginners”