Network File Is Deleted On Startup

I am trying to set up a Pi4/64 to use WIFI on first startup, so I followed these instructions. Specifically the " Setting Up Wi-Fi for Home Assistant" part of the instructions.
So I then put the memory card into the Pi and boot it up. Everything seems to work then I try to connect to HA.
I can not connect to it when it starts. Then I remove the card and look at the memory card to find the “CONFIG” folder missing. Like someone has deleted it at startup.
Anyone know why this is?
Here is what is on the card after a fresh imaging with the latest file from HA
Capture
There is a config file there already. Could that have something to do with it?
How do I fix this?
Is there a better way to set up a headless install of a Pi with HA to use WIFI?
Thanks for the help.

1 Like

I suggest following the official instructions here: https://www.home-assistant.io/hassio/installation/

1 Like

Hi Gordon. Thanks for the reply.
I was following those instructions until it started in with virtual machines which I am not using. so I skipped down and followed #3-2
" 3. Optional - set up the Wi-Fi or a static IP address. There are two possible places for that:

  • on a blank USB stick with a FAT32 partition having partition label CONFIG , while in its root directory, create the network/my-network file, or
  • on the Home Assistant SD card’s first, bootable partition (labeled hassos-boot , might not be auto mounted in Linux) create the CONFIG/network/my-network file.For the content of this file, follow the Home Assistant Operating System howto."

Which is what I was doing. Can anyone elaborate as to why this file is being deleted.
Also how to do this correctly so it works.
Thank you.

Did you manage to solve this issue ? I also experience what you’re experiencing - CONFIG folder been deleted after plug in to RPI

I am also running into this issue.

One thing i tried, but didn’t work, was the docs say to make sure you use Linux style LF instead of windows CRLF. I used VS Code, changed the CRLF to LF on the lower right hand corner and saved. That didn’t help as after reimaging my SD card, and adding the file, it’s still not getting onto the network. I’m ordering a MicroHDMI cable to connect it to a monitor and see what’s going on.

I have the same problem

Any body solved this as it is happening to me, cant run HA as my network details disappear

Hi all! I know this is a bit old, but it might be useful for someone else who will find this post via Google. I had the same ‘problem’. The CONFIG/network/my-network file was deleted after attempting to boot. I think this is not a real problem. The file is not simply deleted, but it is moved to the HassOS overlay partition, in ‘etc/NetworkManager/system-connections’, where I think it should be.
I hope someone will find this useful.

P.S. My connection problem had nothing to do with this file being moved (as it should be). My problem was that I was trying to connect to a 5Gz network. After switching to a 2.4 Gz, everything worked as expected.

Hi all! Have the same problem. I have added I2C cinfig directories and files as described via PC and copy to SD or SSD. Weather I boot on SD or SSD my I2C configuration dir “CONFIG” and it’s subfolders and files are deleted at first boot. Any solution on this issue??