/etc/network/interfaces Gets corrupted?

When I configure my network connection it works fine once or twice but then it get corrupted/ overwritten and displays something that looks like a log file (see the bottom lines)

Need some help, Thanks!

Correct file entries :

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
auto wlan0
#iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

#iface default inet dhcp

iface wlan0 inet static
address 192.168.1.123
netmask 255.255.255.0
gateway 192.168.1.12
wpa-ssid network
wpa-psk password123

The overwritten interface file looks like this:

2 14:11:51 raspberrypi kernel: [ 0.562997] CacheFiles: Loaded
Mar 12 14:11:51 raspberrypi kernel: [ 0.576541] NET: Registered protocol family 2
Mar 12 14:11:51 raspberrypi kernel: [ 0.578123] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
Mar 12 14:11:51 raspberrypi kernel: [ 0.

One of the most common reasons behind file corruptions is a dying sd card. Do you have another one to try? Cards like Sandisk Ultra are preferred.

Yes I have another SD card, and I have tried with that too, it also gets corrupted.

This looks like some file system corruption to me. The other stuff are kernel logs which normally get written to /var/log/kern.log.
When you tried that did you set it up from scratch or did you copy your old SD card to the new one?

Yes I set it up from scratch every time after file corruption. I unzip the emlid-raspberrypi1-raspbian-rt-2015feb file and load it on to the SD card using apple pi baker. Then I reconfigure the internet connection. It works until reboot and then the file gets corrupted once again.

1 Like