OpenWrt Forum Archive

Topic: Resetting openwrt to defaults

The content of this topic has been archived on 1 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

i think i messed up my openwrt. OPKG´s behaviour is very strange, some packages can not be installed on my usb stick anymore... (Ok maybe because i installed and removed about 20 times?! wink)
So how can i reset openwrt to be like a "fresh" flash? Can i reflash the prebuild backfire build i used to install openwrt?

Thx!

mtd -r erase rootfs_data

ok this will erase my root fs and all packages? deinstalled packages that where preinstalled with the image i used to flash openwrt will be reinstalled?

Exactly.

But i have to do this in failsafe mode?

No

jow wrote:

mtd -r erase rootfs_data

Jow, I am just curious. Wouldn't the above will reboot the system after the erasure is done? If so, how can the system boot back for one to flash a new firmware without a serial-console cable?

# mtd -r erase rootfs_data
Could not open mtd device: rootfs_data
Could not open mtd device: rootfs_data

Or should it be 'mtd -r erase rootfs'?

mazilo: it will just reboot with defaults
zoo: then you installed a jffs2 image most likely, that one does not support resetting. Your only choice is to reflash or fix the settings manually.

But I have executed

mtd -r erase rootfs

on jffs2 image, because

mtd -r erase rootfs_data

not working on jffs2 image and get bricked router. I tired to restore it by using Serial port, but get unreadable data and router do not accept tpl command. Therefore patch cord LED's working fine, but connection is absent. Is it possible to debrick my router? Model of my router is TL-WR1043ND. Is only way to use JTAG port?

The discussion might have continued from here.