Firstboot wont reset OpenWrt

I did something stupid and now I cant restore my router with firstboot.
I basically removed all packages/dependencies with the following command:

opkg remove --autoremove '*'

now I am able to get into FailSafe Mode and ssh into the router (TP-LINK C7 V2)
but after running:

firstboot && reboot now

the router reboots and is not connecting to internet and I cant connect my PC to it either.

I think maybe it has something to do with failure to mount maybe?
when in FailSafe Mode I tried to mount_root and its not working.
I'm getting this error:

>mount_root
jffs2 not ready yet, using temporary tmpfs overlay

anyone has an idea how I can firstboot my router so I can use it again?

Any help would be appreciated.

Do a normal boot and wait for the jffs to be completely formatted-- the power LED will stop blinking and stay on steady. That may take 3 minutes or so. Then the router should be operating with default settings, i.e. the lan is 192.168.1.1.

1 Like

What is the output of

ubus call system board; \
mount; df -h

Hi trendy
I have an ssd connected to the router.
but I tried everything with and without the ssd connected.

This is the output with the ssd connected to the router:

ubus call system board; mount; df -h
Failed to connect to ubus
/dev/root on / type squashfs (ro,relatime)
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 /dev type tmpfs (rw,nosuid,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,mode=600,ptmxmode=000)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
Filesystem Size Used Available Use% Mounted on
/dev/root 3.5M 3.5M 0 100% /
tmpfs 512.0K 0 512.0K 0% /dev
tmpfs 60.3M 28.0K 60.2M 0% /tmp

Hi mk24
I tried waiting.
the status lights blink slowly about 2.5 per seconds like it say's in the documentation this should mean it went into a normal boot I think...
I waited and left the router for hours and retried. nothing changed.

Your root filesystem is full and read only and cannot do anything. Try to boot into failsafe and try to do an fsck along with removing some files which you added after the installation.

Thanks @trendy for your help!
Do you know where should I remove files from without risking turning my router into a brick?

Also cross-posted on reddit -

Whenever you cross-post, it's considered a courtesy to include the link(s) to the other site(s) you've posted the issue on.

It helps eliminate confusion, and wasting other people's time researching and suggesting things that have already been done.

1 Like

Remove from /overlay/upper/

1 Like

Sorry to cause the confusion i am kind of desperate after trying to read everywhere looking for a solution.
I tried the umount command you mentioned in the reddit post and it failed.
I guess I'll reinstall using TFTP protocol.
Thank you.
Will update once its working :crossed_fingers:

There is no upper directory in overlay. overlay is empty.

Recover using the TFTP server method. Written for Windows users...but the concepts are the same for other OS.

Download the stock firmware...you may need to try more than one version.

The OpenWRT "factory" firmware can also be used if you don't want to go back to stock.

Download TFTP64.

Rename the downloaded firmware file to ArcherC7v2_tp_recovery.bin, and place it in the same folder as TFTPD64.

Open your network settings in Windows, and select the wired adapter (don't try this on a wireless connection).

Note: It's a good idea to use an unmanaged switch between the router and the computer. It avoids the link-down event, and link training.

Right-click and select Properties.

Select Internet Protocol Version 4 (TCP/IPv4) and click on the Properties button.

In the General tab, select the radio button for Use the Following IP Address.

Enter 192.168.0.66 for the IP address.

Should default to 255.255.255.0 for the Subnet Mask.

Turn the router off.

Make sure nothing else is connected to the router, it should be just the router and your computer.

Open TFTPD64. You may be asked to allow it through the firewall. Select Public.

Note: You may need to temporarily disable the firewall.

Go to Settings > Global, and uncheck everything except TFTP Server.

Go to Settings > TFTP. Select None for TFTP security. Uncheck Option negotiation, and enter 192.168.0.66 in the Bind to this IP address drop down.

Go back to the main window, and make sure the Current Directory dropdown is showing the path to the TFTPD64 folder, which should also contain your recovery firmware file ArcherC7v2_tp_recovery.bin

The IP address 192.168.0.66 should be displayed in the Server Interface dropdown. If not, select it.

Go to the router and press the power button and the reset button at the same time.

Release the power button...but continue to hold the reset button for about 4 or 5 seconds, then release.

You should see a progress bar going across the TFTPD64 screen (although it should only take a very short time).

View the log. It should show 100% transferred.

Go back to your wired network adapter, and change the radio button back to Obtain an IP Address Automatically.

Try to access the router GUI. The stock firmware IP address is 192.168.0.1 and admin/admin for the User Id and Password.

If you can see that you have Internet access in the Network icon, but can't access the GUI, open a Command prompt and run ipconfig /release and then ipconfig /renew.

Try to access the GUI again.

2 Likes

Wow @anon89577378
Thank you so much for the detailed instructions.

I was reading openwrt docs and tried using solarwind tftp server and it didnt work.

Then i saw your reply and installed tftp64 instead.
Iā€™m kind of stuck on the part where I turn on the router with reset button on for 5 seconds and expecting to see progress on tftp server window.
But nothing is happening.
Im also not able to ping 192.168.0.86
Should it be pingable?
Should I see any kind of lights on the router indicating the reset button was held the right amount of time?

Again thank you for your help!

It should be 192.168.0.66

Continue holding it in until the WPS light comes on, then release.

1 Like

its not working :sob:
is it ok to leave default gateway empty?
in any case I tried empty and tried 192.168.0.86 both dont work
shouldnt the routers IP and the PC's default gateway be 192.168.0.86?

I uploaded screenshots of relevant things. hopefully you might spot a mistake?
combined into 1 image since I'm a new user :slight_smile: limited to upload 1 media file.

The PC should be set to .66/24
It is not necessary to set a gateway.
The bootloader does not have any software to answer pings. In this mode it only does one thing: TFTP.
Disable all firewalls completely. That is safe to do since the PC will not be connected to the Internet or any other networks during the process.
You can use the CLI TFTP client built into Windows to try to TFTP from yourself. The client needs to be enabled in Windows Features.

1 Like

192.168.0.66...as I posted above.

No gateway entry is needed.

The only thing that should be connected to the router is your computer.

You should use the recommended unmanaged switch between the computer and the router.

If that's not possible, set the Speed & Duplex on the network adapter to 100 Mbps Full Duplex.

Click on the Show Dir button on the right hand side of the main TFTP64 window and make sure that ArcherC7v2_tp_recovery.bin shows in the list of files.

1 Like

I tried disabling windows defender so no firewall is active.
added a switch inbetween my pc and router.
tested the tftp server using windows tftp client and server looks good!

I must go to sleep now... if I want to wake up to work tommorow :smiley:
I really want to thank you and if you have any other ideas on how to fix this I would really appriciate it.
would give it another shot tomorrow.

Thanks @anon89577378 @mk24
The internet is awsome thanks to people like you!

Is there no way to somehow fix this from the FailSafe Mode?

Your network adapter is not set up correctly.

That's why you're getting the "Bad Interface" in the TFTP64 Server Interface drop down.

Should look like this -

Screenshot 2022-05-08 151347

Failsafe was tried and didn't work.

That's why we've moved on to TFTP.

The bad interface is because Iā€™m moving my ethernet cable between my modem and the router for internet to reply here. So the screen shot was taken while I was connected to the modem with the firewall and DHCP client on ipv4 settings.
I see the settings are the same as in your screen shot. If you look a few replies back you can see my screen shot with a good interface.

The tftp command screen shot was taken while i was connected to router.