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: 8342
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA

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 RPi OS Bullseye 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: 42142
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

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.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

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

Return to “Beginners”