I have a Linksys WRT1900ACS with OpenWRT and running a VPN with the openvpn package. It started to give problems and I started to check what may be wrong.
At some point I decided to remove the package and start from scratch. One of the packages to reinstall is openvpn-easy-rsa
And then I discovered what could be the root of the problem:
Installing openvpn-easy-rsa (3.0.4-1) to root...
Downloading https://dc502wrt.org/snapshots/r11086/packages/arm_cortex-a9_vfpv3/base/openvpn-easy-rsa_3.0.4-1_arm_cortex-a9_vfpv3.ipk
Configuring openvpn-easy-rsa.
Collected errors:
* extract_archive: Cannot make dir /etc/easy-rsa/pki/private/: I/O error.
* extract_archive: Cannot make dir /etc/easy-rsa/pki/reqs/: I/O error.
The directory already exists as it could not be removed when the package was uninstalled. When I try to remove it, I still get the I/O error.
How can I check the file system integrity to solve this problem? or is there a different approach I can take?
As I believe the WRT1200AC uses a NAND-based root file system and overlay, nand-utils are required. I'd back up all partitions, as well as your install. If there are errors in the file system that aren't resolved by a re-flash, there may be one or more bad blocks in the NAND (not unexpected for "raw" NAND).
I've use nand-test with the devices /dev/mtd5 and /dev/mtd7 (extracted from here). No errors were detected.
Immediately after that, I started to get errors of "read-only filesystem". I decided (bad decision, I should have investigate more) to reboot the router. Now it keeps in a booting loop just after the "sata" led switches on. I'm trying to recover the Bootloader as described here.
But any other suggestion is welcome, since I'm not sure what is the current status of the router.