After a configuration mistake I locked myself out of having any sort of network access (incorrect firewall rule order basically sending all packets on all interfaces into lala-land.)
As I now restarted from the other partition (2) as per recovery options outlined on the device page. I was wondeing would it be possible to mount partition 1 as a generic drive, correct the firewall rule and then boot again from partition 1.
Hi Jeff, this almost seems to work weren't it for the fact overlay do not seem to have a upper and lower directory. No idea on how to recover that.Looks like that partition has been scrubbed. Only the rom partition seems to have its basic default data.
A faulty firewall configuration just means that you can't access your device over the network anymore, at least not normally, but it will still boot up correctly. So if everything else fails, the following should work:
do the 3-failed-reboots trick to switch back to the faulty partition set
you can now connect to the failsafe system with ssh/ blank password, the configuration in your overlay is not applied, so the faulty firewall rules aren't in effect.
mount_root will now make your old configuration files available, read/ write, but not applied (meaning you'll retain ssh access)
now you can fix the firewall configuration manually, reset them to their /rom/etc/config/firewall (respectively remove the modified file from the overlay) state or backup whatever you need.
reboot
now you should be back in your previously configured system, without the problematic firewall rules.
Thanks for this. I'll have a look what my options are as I have it now booted from the secondary partition and restored the configuration from backup. I still need to recover the primary partition though. Maybe a dd might work from mtd7 to mtd5
I haven't had access to these dual-boot Linksys devices yet, so I don't have any personal experience with them (and can't help you with the details, therefore the rather crude approach above - which will work, though), but for NAND based devices cat/ dd are always wrong, you need nanddump instead.
You're right. Did some further reading on mtd and ubi over here and here . Need to check what the options are here. The partition layout is aset on mt5 and mtd7 where the current ubi filesystem is set on 5 according to the /sys/devices/virtual/ubi/ubi0/mtd_num . So a mtdwrite from 5 to 7 should technically work