How to check the file system

Hello!

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?

Thanks!

Try running

df
1 Like

df does not check the file system, it only gives information about the current usage of the mounted partitions.

If your suggestion is "do you have enough space?" the answer is that / only uses 8% of the available space.

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).

For UBIFS, perhaps some hints at

1 Like

Do you know how can I run nand-utils on a mounted filesystem or, how to check the router filesystem?

With a normal computer I could use a Live distro for running the checks, but I do not know how to proceed with the router.

If it’s a dual-firmware device, you can boot the “other” one.

1 Like

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.

If I were in your place, I'd connect up serial to get some visibility into what's happening.