Router reset itself after reboot. Help!

No issues whatsoever for months until I replaced by USB drive mount on /mnt/sda1 then rebooted. Now the router is saying I have no password set for root via SSH and LUCI is the wrong theme and all the settings are gone. Can anyone explain what happened? When I try to restore from a backup it says the backup is good, but after reboot nothing has changed.

R7800 HNYMAN latest
OpenWrt 22.03-SNAPSHOT, r19540-945b13e369

Were you using extroot on your USB drive?

I can't remember to be honest. I don't think I would have since I had plenty of space free. I was mainly using USB to save data for collectd, nlbwmon, adguardhome. I didn't make any changes to the USB. I did put the USB back in and reset the router, but the issue persists.

Sounds to me like you were using extroot. This means that your configuration was on your USB drive, so you need to make sure it is still setup to be used in fstab. (and this assumes you didn't change anything else).

See the section for the overaly configuration in on this page

Thanks for the info. I didn't change anything. Just removed the UBS and put in a new one, then had the issue, so I put the old one back in and rebooted, but it isn't finding anything. Wouldn't uploading a recent backup fix these issues?

Output of 'block info'

/dev/ubiblock0_0: UUID="30e84eca-82d66c60-95198837-ffebced3" VERSION="4.0" MOUNT="/rom" TYPE="squashfs"
/dev/ubi0_1: UUID="3045b7c9-5ee1-43e6-b7b1-1212b47bd435" VERSION="w5r0" MOUNT="/overlay" TYPE="ubifs"
/dev/sda1: UUID="1440-AC07" LABEL="OPENWRT" VERSION="FAT32" MOUNT="/mnt/sda1" TYPE="vfat"

Here's the output of 'df -Th'. I need to reconnect extroot to the USB again?


/dev/root            squashfs        8.5M      8.5M         0 100% /rom
tmpfs                tmpfs         231.5M      1.5M    230.0M   1% /tmp
/dev/ubi0_1          ubifs          73.9M     73.9M         0 100% /overlay
tmpfs                tmpfs         231.5M    148.0K    231.4M   0% /tmp/root
overlayfs:/tmp/root  overlay       231.5M    148.0K    231.4M   0% /
tmpfs                tmpfs         512.0K         0    512.0K   0% /dev
/dev/sda1            vfat            1.9G    129.7M      1.7G   7% /mnt/sda1

Based that, you have actually filled the normal ubi0_1 overlay 100% (73.9 M) so that there is not free working space, which prevents mounting it as read-write. So, at the boot the router has temporarily mounted the ramdisk tmpfs as the current overlay
overlayfs:/tmp/root instead of having overlayfs:/overlay.

The overlay system requires at least 4 or 5 erase blocks as working space.

There is possibly a warning about that in the bootlog. grep logread output with "overlay"...

The normal df output should look like:

root@router1:~# df -Th
Filesystem           Type            Size      Used Available Use% Mounted on
/dev/root            squashfs        8.8M      8.8M         0 100% /rom
tmpfs                tmpfs         231.5M      3.2M    228.4M   1% /tmp
/dev/ubi0_1          ubifs          73.9M      2.2M     67.9M   3% /overlay
overlayfs:/overlay   overlay        73.9M      2.2M     67.9M   3% /
tmpfs                tmpfs         512.0K         0    512.0K   0% /dev
Mon Jul 11 10:47:18 2022 user.err kernel: [   21.451952] mount_root: mount failed: No space left on device, options lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work
Mon Jul 11 10:47:18 2022 user.err kernel: [   21.452103] mount_root: switching to ubifs failed - fallback to ramoverlay

Thanks! This appears to be the case. I guess I need to clear it somehow and point it back to the USB. Any help would be appreciated. The USB drive has not changed at all, and is re-inserted into the router. I'm running your 23.02 build on my R7800.

I do not think that it has anything to do with the USB drive.

You will likely need to go into /overlay/upper and see what fills it up, and remove something. At least 1 MB free. And then reboot, so that the overlay can be mounted normally.

Thanks. There's a folder '/overlay/upper/mnt/sda1' that has all of the data that was on my USB drive. Seems like none of this should be here. Not sure how it got there. Do you know if this is the issue or if it's safe to wipe out this data?

Likely it is. Likely it is.

But I would remove the USB driver first, and just recover the router itself, so that you can see that everything works, before you again mount external extra storage.

If the external data drive does not mount, the system will start writing data to the mount point directly and overfill the internal flash.

The block_mount system is based on the UUID of the filesystem, which is supposed to be unique when a new drive is formatted. You need to do a block detect then change the configured uuid to the new one.

To prevent this, have everything on the external drive in subdirectories such as /mnt/sda1/logs. Then if the drive does not mount, the configured logs directory will not exist, which prevents the logging programs from writing anything.

Ok. I am back up and running, but the folder '/overlay/upper/mnt/sda1' is still filling with some data from what should be on the USB drive. It's also writing to USB, but I don't think I've got it setup correctly as an overlay drive. It's just FAT32. I'll open a new thread to explore this issue.

Executing mount with no parameters will show which drives are mounted where.

The drive should be formatted with f2fs or ext4 to use as a data drive. Those filesystems have Linux features of case sensitive file names, and proper file ownership and permission tracking.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.