Can not save changes to OpenWrt configurations

Hi All,
I have been using a latest OpenWRT on my RPi3 for a long time now.
I have been able to change settings from LuCi and set Static Leases without any issues - I have already 5 SL setup.
I wanted to add a new Static Lease - and I am not able to do so.
I press Save and apply and There is no change in my dhcp file at all.
I tried to add the lease BOTH from my main 192.168 interfcae and also from my 10.7 interface and it is shown in the menu BUT after I logout and log back in It is NOT there anymore. :roll_eyes:

When I add the lease I can NOT see anything in my dhcp file - I even tried adding it to the file manually without luck - saying that it is read only.

is there a limit on how many Static Leases I can use?
Am I doing something wrong? I am adding the device from a list and providing it the IP I want it to get - BUT It does not get it at all. Still using the OLD IP it got from the DHCP dynamically and NOT changing to the new IP after I reset the device - IT is an IoT device and I can only reset it as I normally do with my other router that it works there great without issues - But not on my OpenWRT router.

I also tried to click make static and hoping that it will change anything inside the dhcp file but it did not.
is there any reason why i am NOT able to add settings to my files? Why it say Read only System?

I WAS ABLE to save changes in the past but now I am not able to change anything on my files - I have had a similar issue when I did a change to my firewall that it did not save any changes.
Is my OpenWRT router messed up?

Please advise
Thanks

Use ssh to connect to the device.
What is the output of mount; df -h ?

root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                29.3G     34.0M     29.2G   0% /
tmpfs                   459.6M    248.0K    459.4M   0% /tmp
/dev/mmcblk0p1           63.9M     16.9M     47.0M  26% /boot
tmpfs                   512.0K         0    512.0K   0% /dev
root@OpenWrt:~#

Looks like I still have space on the device.
might that be corrupted FS that prevents me from saving?
Thanks

There was also mount command to type.

/dev/root on / type ext4 (rw,noatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mmcblk0p1 on /boot type vfat (rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)

this is mount output.
Thanks

Edit:
The above is result of mount
read only file system root
I was also following a solution that I think is like what I had and I already ran
e2fsck /dev/mmcblk0p2
I saw that there were errors that it had and I think that it fixed them - Kept typing y on every line.
can that assist?

Thanks

I think @trendy wanted you to run the mount and df commands together.

You can give it a try, however the partition needs to be not mounted.
It might as well be faulty SD.

Which firmware are you using, a common issue is an installation of squashfs filesystem without overlay. Anyway,probably the best option for micro SD (where the storage is not a problem) devices like the raspberry is ext4 filesystem which should not give problems while writing.

root@OpenWrt:~# mount; df -h
/dev/root on / type ext4 (rw,noatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mmcblk0p1 on /boot type vfat (rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)
Filesystem                Size      Used Available Use% Mounted on
/dev/root                29.3G     34.0M     29.2G   0% /
tmpfs                   459.6M     76.0K    459.6M   0% /tmp
/dev/mmcblk0p1           63.9M     16.9M     47.0M  26% /boot
tmpfs                   512.0K         0    512.0K   0% /dev

Thanks, I have ran it again.

Now that I have tried it it say that partition is mounted.
But last time it gave me a screen that shows that there are issues and that I could fix them.

Why is that partition mounted?
I am now able to write to the files and it looks that I am able to set the Static Lease as I wanted it to be and also I am able to edit that /etc/config/dhcp file without any issues at all.

I am not sure about the current status.
Is it good that the partition is mounted? I was able to "fix" that issue with command e2fsck /dev/mmcblk0p2 But now I can not do that anymore - does that mean I am good and the partition should be mounted when everything is OK?

Can I umount the partition and run the command? or I need to have it inside a USB reader on a different Linux OS and use the lsblk to find the partition and fix it there? Since it is OpenWRT I am not sure about that and I might break it more.

Please advise
Thanks

A partition must be mounted in order to be able to use it.
But when you check the partition for errors it must not be mounted.
The problem with the root partition is that you cannot umount it when the system is up. You can either schedule it for repair on the next boot, or remove it and plug it on another system which will check it.

1 Like

Thanks, I understand.
Can I do a schedule for scan on next boot with OpenWRT?
Thanks

Yes, just like any linux system.

1 Like