LAN IP reverting after rebooting

Freshly installed 24.10.4. I changed the LAN IP, hostname, time zone, password, and added a wwan. After changing hopped to the new IP and all looks as expected. I installed luci-proto-wireguard and proceeded to add an interface. The WireGuard type interface is not listed. REBOOT. All changes are gone EXCEPT that WireGuard is still installed. I still can’t add a wg interface as it isn’t listed in the Add new interface dialog, but it is listed in Status>WireGuard which only returns “Loading data…”. I wipe the device back to defaults and tried again. Same result.

Why is it reverting to factory settings but keeping WireGuard as an installed module? Where do I begin looking for issues? Config files are clearly back to defaults as if they were overwritten or never saved to the Overlay.

Device Gl.inet B1300
Openwrt 24.10.4
Downloaded and checksum verified from https://firmware-selector.openwrt.org/

The first step I would take is to create a file

for example: "/root/my_test"

echo "This is a test" > /root/my_test; cat /root/my_test

and check if it's still there the next time you make changes so you can see if it was correctly written to "overlay" or not...

Can you show us the output of the following commands:

ubus call system board; mount; df -h

ps: I recommend you create your own custom image with the packages you want installed, then add "luci-proto-wireguard" and "owut"

1 Like

Thanks for the reply @ncompact.

I’ll have to circle back to testing after I’ve got Friday’s install ready to roll.

The last five days I’ve been fighting WireGuard between 23.x and 24.10.3. Nothing seems to work, and I know that can’t be an issue. I finally got a spare router tonight and put 24.10.4 on it. While waiting for a reply to my post, I tried 24.10.3 and it seems to be holding the configuration across reboots. I’m backing up the config will all due paranoia.

Between routers on 24.10.3, I was able to get WireGuard working in minutes. So it looks like I have two issues to revisit once the current install is completed.

It’s not clear from your last message whether you're testing on:

  • the router running 24.10.4 (the one with the problem, GL.iNet B1300),
    or

  • the spare router running 24.10.3 (To diagnose possible hardware damage you need to test on the same router).

1. Check if the overlay is mounted in read-write mode and has free space

mount | grep overlay | grep rw
df -h | grep "/overlay" | awk '{print $5}'

If overlay is not mounted, or mounted read-only, configuration changes will never persist.

2. Check for UBI/UBIFS issues or bad blocks

It’s normal to have a few bad blocks, but if the overlay size is zero or UBI cannot attach, it means the overlay cannot be used.

ubinfo -a
dmesg | grep -i ubi
dmesg | grep -i ubifs
dmesg | grep -i overlay
dmesg | grep -i "read-only"

Look for:

  • “failed to attach”

  • “read-only filesystem”

  • “UBIFS error”

  • overlay mount failures


If you reboot after this point, are the configuration files and passwords saved?

3. Do configuration changes actually persist after a reboot?

awk "/config interface 'lan'/,/^$/" /etc/config/network

you should notice if the ip address of "br-lan" has been changed to the one you chose :grinning_face:

cat /etc/config/system | grep "timezone"

here you should notice if the "timezone" has been set as you chose :grinning_face:

If so, then the writes were made to the "overlay."

4. Confirm overlay writes by comparing ROM and live filesystem

You can check by comparing the files with those saved to the "rom."

cat /rom/etc/shadow | grep "root"
cat /etc/shadow | grep "root"

you should notice a difference on the root user password line :grinning_face:

PS: If you perform a "firstboot & reboot" restore, you will obviously lose everything. This is its function.

1 Like