So I learned the hard way that uninstalling random "unnecessary" packages is not the best way to do things.
Do I have to hard-reset my router or is there another option I can do without losing my settings?
The error when I attempt to access via luci:
/usr/lib/lua/luci/dispatcher.lua:724: No valid theme found
[C]: in function 'assert'
/usr/lib/lua/luci/dispatcher.lua:724: in function 'init_template_engine'
/usr/lib/lua/luci/dispatcher.lua:848: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:478: in function </usr/lib/lua/luci/dispatcher.lua:477>
Regarding this statement, obviously you are dealing with to consequences of that action. That said, I will ask why you were doing this (not in a judgmental way, but rather to understand what you were trying to achieve).
Although it is counterintuitive, removing the packages you believe to be unnecessary will not free up any space. Quite the opposite, actually, as it will consume space. This is is because the entire installation resides in a ROM partition. This means that the packages cannot actually be removed. Instead, what happens is that the packages are 'marked' as deleted in the overlay partition (that is R/W) -- but this actually requires space in order to tell the system to ignore the contents of ROM. In your case, this is actually a good thing because the files are all intact in the ROM, so a failsafe based reset-to-defaults (firstboot) will resolve the issue.
If you are trying to save space, you will need to build your own image. This isn't hard, but it isn't quite as straightforward as just downloading the pre-built firmware image. You can completely customize your own image, though, including removing packages that you don't need for space or other resource/security reasons. Be careful, though, recovering from a poorly constructed image could be more complicated.
Hi psherman, sorry for the delay (I had a covid scare). Thank you for writing that up and helping me with my issue.
I tried the methods listed on the docs page. The softboot method did not work with either of the two buttons on the router. The router does not have any sort of LED boot sequence: all the lights flash on when the router is turned on, and the only way to know when the router is fully booted is to test through a connected machine (it takes about 40 seconds).
I tried the second method of setting a static IP and listening on a port, which did not yield anything.
Finally, I tried hard resetting via holding down the reset button on the router, which did nothing. The router is soft-bricked in that it actually perfectly works as a router with all of its settings, but I can't access it or reset it in any way.
The router is a Netgear WNDR3400. I tried to remove one of the luci-theme packages because I figured they were extra themes or something (I needed just a tiny bit more space, not something worth rolling a custom image for). That's why it's yelling at me about no themes being found. Anyway that would not have been a problem had I not forgotten that I had SSH login disabled. I did that out of a flash of paranoia over security, which I have been advised now is a little unnecessary for my use case.
Sorry to hear you had a COVID scare. I hope everything is okay now.
So you have two options that I can think of...
Try the failsafe again (it might be possible, I'll explain shortly)
Open the device and connect a USB-Serial adapter. There are serial header pads on the board. Once the device is booted up, you should be able to run a serial session that would be equivalent to ssh, but doesn't require the dropbear service to be running/listening.
On the failsafe, try the following:
set your computer to a static IP address in the 192.168.1.0/24 network (for example: 192.168.1.10, subnet 255.255.255.0).
start a continuous ping test to 192.168.1.1
Power cycle the router.
immediately after applying power, press the WPS button repeatedly
watch for the pings to return, when they do, you can stop pressing the WPS button
attempt to ssh into the router (username root, password is blank)
Would you be willing to link an example of this cable? All I find are USB-serial connectors with the type of serial that comes with printers and motherboards. I see no such connection when I open up my router.
I don't use windows, but I've never seen this type of thing happen on a Mac or Linux system. If you set the IP address manually, it should not be removed, although the interface will become inactive when the link goes down. But as soon as the link comes back up, the static address that was set manually should work as expected, at least on all the systems I have used.
EDIT: if you need to ensure that the link doesn't go down, just stick a cheap unmanaged switch between the computer and the router.
If you set the address manually on the computer itself (typing in all of the network info), you have a static IP address set on the computer. If the computer uses DHCP to obtain an address and the router has a static lease set, the computer is expecting to get the information from the router (and the router will always assign the same address to the computer -- the static lease is also called a DHCP reservation).