Davidc502- wrt1200ac wrt1900acx wrt3200acm wrt32x builds

root@WRT32X:/# mkdir /mnt
mkdir: can't create directory '/mnt': I/O error

root@WRT32X:/# ls
bin etc opt proc root sys usr www
dev lib overlay rom sbin tmp var

i can mount to opt just fine and if i reboot to the previous firmware mnt returns

This is the identical behaviour to what I saw when trying to setup openVPN.
When you follow this guide, you get the same I/O error- https://openwrt.org/docs/guide-user/services/vpn/openvpn/basic

The problem turns out to be that any folder setup as part of the overlay filesystem that is in the original flash can not be deleted and rebuilt. I found the only (easy) solution was to re-flash the firmware. The openVPN guide says to run this-

I found this command deletes the /etc/easy-rsa/pki directory (and everything inside), and it cannot be recreated with the same IO error you saw above. So essentially don't delete any directory that is in David's overlayfs as it will not be able to be built again. My solution to restore was to do a factory reset which restores the default directory structure (including the pki directory), and the workaround for the easy-rsa guide is to manually delete the files in the pki directory but not the directory itself (nor the private issued & reqs directory in that).

hi all ive been trying to follow this thread for awhile i was hoping to get more of a understanding of the build davidc502 is Ive been using openwrt for long time since at least 15.04 i think but whats diff about this build from the main build im hoping I said that right also can I backup the settings from the main tree or do i start from the oem build. have pfsense box dell r210ii to a sg300 switch to ap 32x with sqm thanks for the help

/mnt exists by default, and since it has gone missing you need to go back to the previous firmware and flash again.

1 Like

I like openwrt becuase its stable its clean and lots of packages from the community thanks to all the people here that put there own time into it. I like the wrt32x I never seen a consumer wifi ap that could route traffic as fast is the wrt32x I have a roku streaming all day from it there are few hickups the wrt32x combinding with sqm you cant go wrong with. I do think having pfsense behind the AP helps it even though the horsepower is there. I hope the marvell project is not totaly abanded. I aslo have the 1900ac v1 any way long winded post I think Im stuck with Pfsense and openwrt for my back end network the open source has been a great expirence for me. thanks again.

1 Like

Is there a bug with the internet LED indicator? When I unplug the internet Ethernet cable, the LED is still blinks as normal, instead of the turning red. I rebooted the router and I still see the same behavior.

Iā€™m on the 11/23 davidc502 build for a 3200acm router

I edited my previous post, there is some kind of quirk deleting directories in the overlayfs that are part of the factory reset default state. To recover (for my pki/openVPN issue discussed previously) I did a factory reset which restored the directories necessary, there seemed to be no way of creating directories again with IO errors once removed (almost like the directory still exists in some way after deleting thanks to how the mounting of the overlay works?).

Reading here- https://openwrt.org/docs/techref/filesystems?s[]=overlayfs#overlayfs it would seem that various directories are in the read only squashfs, and any changes end up in the jffs2 but because the thing is overlayed, it can get messy. My brief experience with getting the IO error is that it doesn't seem to hurt files being deleted/created, but does hurt directories. I guess it is important as to what should exist by default in the squashfs vs the factory reset jffs, and don't delete any important directories (as they may not be able to be recreated again with IO errors).

More interesting info pertaining to directories vs files https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git/tree/Documentation/filesystems/overlayfs.txt

Some more google foo, perhaps this will work to create the /mnt in the writable fs-
touch /mnt (rather than mkdir /mnt).

LED behaviour is configurable.

I presume you're talking about stock LED behavior. The LED will still blink as OpenWrt has it programmed to respond to traffic that is coming from it or going to it. So if your LAN clients try to access WAN, it still registers on netdev leading to the WAN LED blinking.

The (red) amber LED is unused in OpenWrt's default configuration. However, it is still found in LuCI under the LED Configuration section.

I recall reading somewhere that the stock LED behavior is to blink the amber LED if it can't successfully ping linkys.com.

DD-WRT has implemented this behaviour. However, the repo on git is obfuscated/hard to follow through. I tried looking for how they're doing it, but I've been pretty unsuccessful.

Hi all,
I need Tp-link T3U (RTL8822bu) usb wifi AC dongle driver for OpenWRT.
My Linksys WRT3200ACM informations:

Firmware Version: OpenWrt SNAPSHOT r11583-68fb38548b / LuCI Master git-19.327.83508-5e1253f
Kernel Version : 4.19.85
# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 2357:012d TP-Link
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

thank you

Using r11583 I have a problem using cryptsetup. cryptsetup benchmark works fine. However, when I try to open my device like this: cryptsetup --veracrypt open --type tcrypt /dev/sda1 hdd I get the following error:

Required kernel crypto interface not available.
Ensure you have algif_skcipher kernel module loaded.

This has worked before. Could this somehow be related to setting CONFIG_CRYPTO_USER_API_SKCIPHER at compile time? I found this after a little googling: https://superuser.com/questions/1274365/dmcrypt-what-happens-when-userspace-crypto-wrapper-not-present

I am honestly at a loss here. lsmod | grep algif returns

af_alg                 20480  4 algif_skcipher,algif_rng,algif_hash,algif_aead
algif_aead             16384  0
algif_hash             16384  0
algif_rng              16384  0
algif_skcipher         16384  0

which looks fine to me. lsmod | grep crypto looks also fine:

crypto_user            16384  0
cryptodev              45056  1

I would really appreciate any help!

What I'm finding is cryptsetup is based on DMCrypt kernel module, and I'm not finding that module being available in the repository. Also, I'm not finding anything on "algif_skcipher kernel module" either.

Did you get a chance to look at the OpenWrt repository to see if either of these exist there?

This is fixed in r11583

Hi David,
can you plz tell me why you implemented the following tweak? I ask, because i can not find this one in the 19.07-branch ...

Is it proven to lower the latency ...? For Wifi? For Ethernet?

Thanky a lot ... Andreas

I am not really an expert, so I am not entirely sure where to look. But there are these modules in /lib/modules/4.19.85 on my local install:

-rw-r--r--    1 root     root        9.1K Nov 23 21:32 algif_aead.ko
-rw-r--r--    1 root     root        9.1K Nov 23 21:32 algif_hash.ko
-rw-r--r--    1 root     root        4.9K Nov 23 21:32 algif_rng.ko
-rw-r--r--    1 root     root        7.6K Nov 23 21:32 algif_skcipher.ko

If there are there, should they not also be in the openwrt tree? I installed kmod-crypto-user and kmod-crypto-rmd160 besides cryptsetup

Ahh, the solution is even easier than I thought.
I decided to delete my own /mnt directory to see the behaviour-

root@TonyOpenWrt:~# cd /
root@TonyOpenWrt:/# rmdir mnt
root@TonyOpenWrt:/# mkdir mnt
mkdir: can't create directory 'mnt': I/O error

Now the overlay that creates/appends the writeable partition to the read-only root filesystem is here, notice the mnt folder is marked in some way to "hide" it in the main filesystem and it is this character device (shows as purple in my putty terminal session) that is blocking the ability to recreate the directory again.

root@TonyOpenWrt:/#  ls -al /overlay/upper/
drwxr-xr-x    8 root     root           608 Nov 28 18:03 .
drwxr-xr-x    4 root     root           360 Nov  4 06:25 ..
drwxr-xr-x   19 root     root          2632 Nov  4 06:25 etc
drwxr-xr-x    4 root     root           288 Nov  4 06:25 lib
c---------    1 root     root        0,   0 Nov 28 18:03 mnt
drwxr-xr-x    4 root     root           352 Nov 19 17:24 root
drwxr-xr-x    2 root     root           288 Nov 27 02:07 sbin
drwxr-xr-x    7 root     root           480 Nov  4 06:25 usr
drwxr-xr-x    3 root     root           232 Nov  4 06:25 www

So simply delete the "character" file/node and remake that mnt directory-

root@TonyOpenWrt:/overlay/upper# rm mnt
root@TonyOpenWrt:/overlay/upper# ls
etc   lib   root  sbin  usr   www
root@TonyOpenWrt:/overlay/upper# mkdir mnt
root@TonyOpenWrt:/overlay/upper# ls -alstr
     0 drwxr-xr-x    3 root     root           232 Nov  4 06:25 www
     0 drwxr-xr-x    7 root     root           480 Nov  4 06:25 usr
     0 drwxr-xr-x    4 root     root           288 Nov  4 06:25 lib
     0 drwxr-xr-x   19 root     root          2632 Nov  4 06:25 etc
     0 drwxr-xr-x    4 root     root           360 Nov  4 06:25 ..
     0 drwxr-xr-x    4 root     root           352 Nov 19 17:24 root
     0 drwxr-xr-x    2 root     root           288 Nov 27 02:07 sbin
     0 drwxr-xr-x    2 root     root           160 Nov 28 18:05 mnt
     0 drwxr-xr-x    9 root     root           608 Nov 28 18:05 .

And bingo, directory is back-

root@TonyOpenWrt:/overlay/upper# cd /
root@TonyOpenWrt:/# ls -alstr
     0 dr-xr-xr-x  105 root     root             0 Jan  1  1970 proc
     0 dr-xr-xr-x   11 root     root             0 Jan  1  1970 sys
     0 drwxr-xr-x    1 root     root           232 Nov  4 06:25 www
     0 lrwxrwxrwx    1 root     root             3 Nov  4 06:25 var -> tmp
snip
     0 drwxr-xr-x    4 root     root           360 Nov  4 06:25 overlay
     0 drwxr-xr-x    1 root     root           352 Nov 19 17:24 root
     0 drwxr-xr-x    1 root     root           288 Nov 27 02:07 sbin
     0 drwxr-xr-x    6 root     root          1880 Nov 28 15:16 dev
     0 drwxrwxrwt   23 root     root           680 Nov 28 18:04 tmp
     0 drwxr-xr-x    1 root     root           160 Nov 28 18:05 mnt

So the "bug" is that any directory that is in the root (read only) filesystem, if deleted will create a character file to highlight not to show it, however, will throw an IO error if attempting to rebuild again, solution is to rebuild it in the /overlay/upper area.

Ahh, an even easier way to restore it if it exists in the readonly filesystem only and not necessarily in the writeable upper area is to delete the mnt character file in /overlay/upper, and then
mount -o remount /
and the /mnt directory comes back. This quirk/bug only seems to only impact directories that were in the original read only root filesystem. If I create a directory in "/" I can delete and re-create no issues at all. I guess this means that it is very important to only have directories that are necessary 100% of the time in the rootfs build, any superfulous ones that may be purged from time to time (e.g. pki directory following the openVPN guide to reset & rebuild certs etc) should probably not sit in the readonly image.

I suppose I never saw this behaviour deleting files (rather than directories) from the readonly filesystem because they are also marked with a character file pointer in the /overlay/upper area, but when recreating them, there is no IO issues overwriting a character file with real file, but overwriting a character file with directory of the same name gives the IO error.
Yep-

root@TonyOpenWrt:/# cd /overlay/upper/
root@TonyOpenWrt:/overlay/upper# ls
etc   lib   mnt   root  sbin  usr   www
root@TonyOpenWrt:/overlay/upper# mknod tonytest c 0 0
root@TonyOpenWrt:/overlay/upper# ls -alstr
snip
     0 drwxr-xr-x    2 root     root           160 Nov 28 18:48 mnt
     0 crw-r--r--    1 root     root        0,   0 Nov 28 19:15 tonytest
     0 drwxr-xr-x    9 root     root           680 Nov 28 19:15 .
root@TonyOpenWrt:/overlay/upper# mkdir /tonytest
mkdir: can't create directory '/tonytest': I/O error
root@TonyOpenWrt:/overlay/upper# touch /tonytest
root@TonyOpenWrt:/overlay/upper# ls -alstr
snip
     0 drwxr-xr-x    2 root     root           160 Nov 28 18:48 mnt
     0 -rw-r--r--    1 root     root             0 Nov 28 19:17 tonytest
     0 drwxr-xr-x    9 root     root           680 Nov 28 19:17 .

This to me seems like a bug that can be fixed, just need to allow a directory to overwrite a 0,0 node character file of same name if it belongs to upper overlay?

Hello @davidc502,
I flashed a new snapshot r11583 and i have a problem with mwan3 package.

I get this when i start mwan3.

root@Link:~# mwan3 stop
root@Link:~# mwan3 start
uci: Entry not found
uci: Entry not found
uci: Entry not found
uci: Entry not found
grep: /var/etc/miniupnpd.conf: No such file or directory
uci: Entry not found
uci: Entry not found
grep: /var/etc/miniupnpd.conf: No such file or directory
root@Link:~#  103110  WARN : Service section disabled! - TERMINATE
uci: Entry not found
uci: Entry not found

I think there is a problem in /etc/hotplug.d/iface/ scripts.

Thanks for your time and builds.

Thanks for the information -- Please report this bug. https://openwrt.org/bugs

I've confirmed they are missing, but at a loss to know why... The only change I have done recently was to replace libustream-openssl with libustream-mbedtls. This fixed the LuCi hang issue.

Do you know if those modules are supplied by openssl?

The tweak is to fix latency in Wifi for the 1200ac when gaming. All other forms of hardware are not affected by this tweak.