Reset to factory defaults (x86 PC)

i am running Openwrt in a x86 PC and i would like to ask how can i reset to factory defaults through the command line, without re-installing, please?
I have lost connectivity due to wrong config, but i got access to it by the console.

With an x86 PC it might be more difficult than usually, as to my knowledge the x86 based firmwares deviate from the normal OpenWrt practice of having a read-only firmware and a read-write overlay with settings, sas they have just a normalwritable fiesystem. So I am not sure if there is a way of resetting it without reinstalling...

OK. then i am stuck with re-installation only, in case i've lost access due to wrong configuration

but if you have still console access . i.e. you can still login to shell, you can overwrite whatever part you misconfigured, can't you?

There are ext4 based images and 'normal' squashfs based ones for x86/ x86_64, the later can be resetted as normal, the former can't.

1 Like

i am not really confided to make changes in the network through CLI. That's why i am asking how to reset to factory defaults.

you have not shared your current wrong /etc/config/network yet but if you want something very simple just to have access you need the very basics from your existing network file:

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr ''
        option netmask ''

config globals 'globals'
        option ula_prefix 'xxxx'    # <-  you'll see your ula prefix
        option packet_steering '1'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0' # <- depending on your hardware layout you may want to add additional interfaces via extra 'list ports 'ethX' lines

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '' # <- this is the factory default, obviously you can change
        option netmask ''

remove all other lines then enter in cli: service network restart

1 Like

You might still run "df -h" on console and see if you have overlay there or not.

If you have, you might be able to reset to defaults as slh said above
("firstboot" would be the command)