Hey all.. is it possible to reset the software to factory? I would like to remove all my apps and files related to those apps.
Currently when I reset the router I still have the same file structure with all my custom files still there.
Hey all.. is it possible to reset the software to factory? I would like to remove all my apps and files related to those apps.
Currently when I reset the router I still have the same file structure with all my custom files still there.
This shouldn't be the case unless you modified the sysupgrade.conf
(not even sure if this would cause it ...)
Try to login via SSH and run firstboot -y && reboot
This should reset the device.
root@GL-MT3000:~# firstboot -y && reboot
/dev/ubi0_2 is mounted as /overlay, only erasing files
Just does the same thing - resets the UI but my files are still present instead of gone.
And this is what my sysupgrade.conf looks like:
## This file should contains your platform's proprietary files
## and directories that need to be preserved during OpenWRT sysupgrade.
# /etc/example.conf
/etc/wireless/
Is your device exfat/ext4?
The issue is that is that you use /overlay, you have to take this litterly.
So if you first upgraded without usb, and later upgraded with the mounted usb on /overlay then you have still transient packages running, first it loads the old chain of packages and then the overlayed other chain of packages with including the overlaying configs.
With every update you should consider wiping the usb too and then unmount it.
On my mochabin i have had a similar situation like this, my only solution is to dismount the ssd partition mount to /overlay then format it, clean upgrade and then make the most basic configuration with the least packages.
Then let the overlay take care, and use that for installing packages on my ssd, if i then upgrade it won't hurt super much the old chain doesn't exist with its configuration, you likely have such conflict going on.
I have always wondered if mounting to /overlay is the correct way since it can easily software brick a device if you are not aware it tries to run from two chains i was able to due the serial connection on it, it showed typical kernel mismatches as result due this issue... but i thought this type of behaviour was only in ext4 but i can be mistaken, it's a very weird system the overlay thing in Linux
Maybe it is smarter to have it as a normal mount not to /overlay and then only use a symlink to the mount for your use.
Thanks for taking the time to write that.
Would you happen to be able to do a step-by-step on how to go about doing all of that?
Unfortunately i don't know a proper way but what i do on my mochabin is:
For first time:
I have a ssd called /dev/sda and i used fdisk to make partitions, in this case i choosed to make one partition of 1gb, and the rest of it 3gb to be part of my lancache as a second partition.
Basicly i use the 1gb partition for the overlay, but before i use it i start with a fresh firmware, i want to setup the basic network interfaces like lan, wifi.
But i don't want to do anything else, this means installing protocols, kmods, no extra packages.
Then i use block mount to create the fstab and make the partition mount as /overlay
For updating:
when i want to update firmware i create a backup first via luci, i can use lucis backup and open it with 7zip and basicly cherry pick configs from /etc/config
over winscp.
Now when i prepare it, its important you must unmount partition 1 and reboot and the overlay is back on default state you can see it on the space inside opkg manager in luci it will look exactly how it was setup as the first use scenario without the expanded space, from there i upgrade (yes in this state you can keep settings, but not with the other partition around).
When the upgrade is done, i format the partition 1 with mkfs.ext4 (you might need a different ending than ext4 you need the type your disk is set to), and then remount it again with block-mount as /overlay in fstab.
Yes... Its very cumbersome how it works, but that makes it avoid having the dependencies start conflicting with each other.
Now maybe you don't need it this difficult can you tell me what kind of things you want to store on the usb?
If that is for adguard or something you can just use a normal mount like how gl-inet has it intended and then on the CLI you can move that folder to your mount and where the folder was you create a symbolic link (symlink) through the ln
command.
Still im still looking to a more non cumbersome solution for /overlay
maybe it should be /overlayfs
or /tmp
i never understood why in a upgrade process the overlay doesn't get reset on the package chain with the correct packages on a second disk, but these will not go well if they become remnants, this is also with configurations the same that is why you want the backup before deleting the partition
Simply said i use the first use more like a fail safe mode to rollback to for each upgrade it works but far from perfect
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.