GL-MT1300 Beryl Bugs

It seems that if you use this router out of the box and never do a firmware update then you are fine but it’s pretty frustrating that every time I do a firmware update, I’m having to rebuild the router from scratch. I understand that I don’t have a ‘standard’ setup due to that I’m leveraging a /overlay fs to enable AGH but it’s still pretty ridiculous that it’s completely blowing away my config every firmware update (4.x to 4.x).

Also with 4.3.11, if you try to set your DHCP scope to have 245 IP addresses, it starts the scope at 10 and then on reboot you are in factory reset mode. If you force it to start at .10 and end at .254 or .255, save and on reboot, you are in factory reset mode. Similar if you go through luci. Once I finally figured this out after spending hours manually keying in my config only to have it blown away on reboot, I set my DHCP scope to start at .10 and end at .253.

The overlay feature is also buggy. When it works, it seems to persist but if you want to force a factory reset, you can’t while overlay is in place. I found this out the hard way as well. Also, I had a weird experience where the overlay was supposedly in place as noted through my df and mount outputs but I had /usr/bin/AdGuardHome as one version and my /mnt/mmcblk0/upper/usr/AdGuardHome as a completely different version. (paths might not be precise — going off memory). Reboot solved that issue but once the overlay is in place, any files written to internal storage e.g. /usr/bin/AdGuardHome are now off limits. If it shows /overlay is mounted correctly then there should never be this issue of duplicate files via different paths.

I’m not sure if GliNet uses ATDD or some other similar framework but until the firmware code quality improves, there’s zero chance I’m going to be moving over to the Flint 2 as a replacement to my home rig (Asus). Sorry if this sounds a bit rantish but it’s pretty frustrating that after years, even basic features are still broken.

1 Like

Can you let me know exactly what you have done about the /overlay?
When overlay has problems setttings may be not saved.

The dhcp settings cannot be saved problems, as you said it is even so when using luci, seems due to problems from configurations.

I'm not doing anything strange with overlay. Just in luci adding it as an overlay mount, and then rebooting. The first time /mnt/mmcblk0 was present and mount output showed that it was present in /overlay but indeed it was not working correctly for at least the /usr/bin directory. Rebooting a second time resolved the issue.

DHCP, easy to test. Just change the DHCP scope to be 245 IP addresses in the GLiNET GUI and then reboot. It will factory reset every single time. There is something wrong with the scope setting I believe. I think it's trying to leverage up to 192.168.8.255 which obviously won't work correctly. But even setting the DHCP scope to end at 192.168.8.254 seems to cause issues which is why I end it now at .253.

Can't confirm the DHCP issue on Beryl with FW 4.3.11
Working as expected.

I changed DHCP to serve 245 clients and rebooted.
No reset happen.

What was your starting IP address?

192.168.8.10 was the one the Beryl chose.

Yeah. This crashes/resets my router every time on apply then reboot.

That's weird.

What else did you configure on your Beryl? Guest Wi-Fi? VPN?
Anything else?

After factory resetting this would be the first and only thing I would configure and then reboot. It would immediate go into reset mode. I narrowed it down after resetting my router multiple times after the 4.3.x firmware update reset my router.

And now overlay is broken again....

I am not (yet) fully aware of the options /overlay provides, but are you sure it should work like this?
Normally, extroot is required for extending the internal storage: [OpenWrt Wiki] Extroot configuration

Did you do this?

Yeah. I've been running like this for years but .11 definitely seems to be less stable in this regard. I just rebooted the router and it's now factory reset itself, again. For whatever reason it's corrupting my sdcard on reboot. I'm going to swap it out (Sandisk) to another sdcard (Samsung) and see if I can narrow down what's going on.

1 Like

Pulled the SD card and set the network to have a 245 client limit. Went to luci to manage DHCP advanced settings. There was a prompt that luci needed to make some updates. After, I added 6,192.168.8.1 as a DHCP option and rebooted. This resulting in phy2.4 going up and down like a yoyo. Eventually reset it and was able to get into the UI and moved the client limit to 244 (from .10) in Luci and things started to stabilize.

Starting to wonder if I have some hardware issue or an issue with this FW release. With the new SD card, I'm unable to successfully format it. I keep getting timeouts leveraging mke2fs and fdisk (to wipe the partition table). I can format it just fine with my MBP. Also, with my old SD card, I reformatted in my MBP and ran Blackmagic disk speed test continuously for over an hour without any issue. I may try to downgrade next to see if the issue resolves.

Downgraded with no improvements. Samsung card for whatever reason can't be formatted in the MT1300. Sandisk results in disk errors after reboots / shutting down. Ordered a Kingston to see if there is any difference. I was able to get AGH working without any SD card but it's right on the edge of having the router running out of space. I think the FS must be compressing what's stored because df will show 15.6MB free but I can opkg install adguardhome which has a 32MB binary. I end up with < 1MB working space when I do this.

One thing that's interesting is that .11 release includes e2fsprogs where .7 does not installed by default. As I previously mentioned, going to Luci to modify network settings you are presented with this prompt

I'm not sure why there is some conflict between Luci and whatever GLiNET is setting by default.

Just click "Continue" and it should be safe.

Learned something new. Apparently jffs2 has compression enabled by default which means there is no practical way to determine how much free space is available on a partition formatted this way.

Does Beryl AX also leverage jffs2?

Beryl AX does not leverage jffs2. Instead it uses ubifs for its main mount point which means it has a pessimistic 170MB of usable space to start with:

root@GL-MT3000:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                44.0M     44.0M         0 100% /rom
tmpfs                   240.2M    508.0K    239.7M   0% /tmp
/dev/ubi0_2             169.7M      1.0M    163.9M   1% /overlay
overlayfs:/overlay      169.7M      1.0M    163.9M   1% /
tmpfs                   512.0K         0    512.0K   0% /dev
root@GL-MT3000:~# mount
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/ubi0_2 on /overlay type ubifs (rw,noatime,assert=read-only,ubi=0,vol=2)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)
pstore on /sys/fs/pstore type pstore (rw,noatime)

It's definitely zippier than the Beryl MT1300 in both CPU performance and Disk IO but still not to the level of something like a BMC4908 much less a BMC4912. The 'numbers' are in 1000s of bytes per second processed.

Beryl AX:

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
blowfish cbc     42867.48k    48022.36k    49695.76k    49990.66k    50289.02k    50118.66k
aes-128 cbc      47493.63k    51901.60k    53360.73k    53963.77k    53897.90k    54050.76k
aes-256 cbc      36996.83k    39643.80k    40452.69k    40829.86k    40896.98k    40697.86k

BMC4908:

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
blowfish cbc     47774.26k    56447.57k    59677.62k    60133.46k    60582.44k    60511.57k
aes-128 cbc      57659.15k    71957.35k    77010.79k    78551.42k    78604.97k    78582.72k
aes-256 cbc      45797.69k    54128.37k    57348.81k    57799.15k    58234.67k    57890.13k

BMC4912:

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
blowfish cbc     54371.69k    65426.60k    69130.67k    70232.31k    70382.24k    70555.31k
aes-128 cbc      62112.32k    78851.61k    85189.50k    87079.99k    87247.53k    87291.53k
aes-256 cbc      49896.06k    59858.20k    63485.52k    64060.28k    64670.22k    64389.12k

Beryl MT-1300

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
blowfish cbc     13558.07k    14779.26k    15353.88k    15077.72k    15425.54k    15257.26k
aes-128 cbc      11820.90k    13560.92k    12850.69k    13802.57k    13373.92k    13771.27k
aes-256 cbc       9250.92k     9904.52k    10036.73k    10060.37k    10130.77k     9961.04k

Script: openssl speed aes-128-cbc aes-256-cbc bf-cbc

Updated! I'll update with the Beryl MT1300 once I get that back up and running.

The 4.5.x firmware removes the "max number of users" that breaks the MT1300 in favor of just setting the beginning and end DHCP scope which is nice.

The integrated adguardhome is decent but to do anything you really have to flip over to AdGuardHome running on port 3000. According to netstat AdGuardhome is running on 3053. Instead of having AGH respond natively, instead they add a dns forwarder to forward requests from port 53 to 3053. You can see this in luci here:

My preference in setting up AGH is to have it resolve natively to requests on port 53 and then have dnsmasq respond on a different port local and specific upstream requests. Personally, I just find it more efficient because you are only putting load on one service rather than two and your overall response time should be shorter but whether all this is measurable is probably a debate for another time. I'll likely tweak the settings to minimize the hops internally.

I did happen to test my adguardhome updater script and it breaks because, for some absurd reason, GLiNET decided to rename the default config file from adguardhome.yaml to config.yaml. Edit - this has now been fixed to work with Beryl AX and similar routers.

Got a new sd card and I'm seeing similar behavior where /overlay isn't working properly.

root@GL-MT1300:/overlay/upper/usr/bin# mount
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mmcblk0 on /overlay type ext4 (rw,relatime)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,noexec,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)
/dev/mmcblk0 on /mnt/mmcblk0 type ext4 (rw,relatime)
root@GL-MT1300:/overlay/upper/usr/bin#
root@GL-MT1300:/overlay/upper/usr/bin# ls -lah
drwxr-xr-x    2 root     root        4.0K May 30 14:09 .
drwxr-xr-x    7 root     root        4.0K Apr 15  2023 ..
-rwxr-xr-x    1 root     root       32.8M May 30 14:09 AdGuardHome
-rwxr-xr-x    1 root     root       36.6M May 30 14:09 AdGuardHome.old
-rwxr-xr-x    1 root     root      159.2K Apr 15  2023 htop
lrwxrwxrwx    1 root     root          21 May 30 14:07 wget -> /usr/libexec/wget-ssl
root@GL-MT1300:/overlay/upper/usr/bin#
root@GL-MT1300:/overlay/upper/usr/bin# ls -lah /usr/bin/Ad*
-rwxr-xr-x    0 root     root       36.6M Jan  4  2023 /usr/bin/AdGuardHome
-rwxr-xr-x    1 root     root       36.6M May 30 14:09 /usr/bin/AdGuardHome.old

Notice that while the ".old" version of the file matches, the current version does not.

However, if I remove the file from the overlay directory, it IS removing the file from /usr/bin

root@GL-MT1300:/overlay/upper/usr/bin# rm AdGuardHome
root@GL-MT1300:/overlay/upper/usr/bin# ls -lah
drwxr-xr-x    2 root     root        4.0K May 30 17:45 .
drwxr-xr-x    7 root     root        4.0K Apr 15  2023 ..
-rwxr-xr-x    1 root     root       36.6M May 30 14:09 AdGuardHome.old
-rwxr-xr-x    1 root     root      159.2K Apr 15  2023 htop
lrwxrwxrwx    1 root     root          21 May 30 14:07 wget -> /usr/libexec/wget-ssl
root@GL-MT1300:/overlay/upper/usr/bin# ls -lah /usr/bin/AdGuardHome*
-rwxr-xr-x    1 root     root       36.6M May 30 14:09 /usr/bin/AdGuardHome.old
root@GL-MT1300:/overlay/upper/usr/bin#

I can copy as many times as I want and the 2023 version of AdGuardHome reappears.

root@GL-MT1300:/overlay/upper/usr/bin# ./AdGuardHome --version
AdGuard Home, version v0.107.50
root@GL-MT1300:/overlay/upper/usr/bin# /usr/bin/AdGuardHome --version
AdGuard Home, version v0.107.21

On reboot /overlay started to sync again but that shouldn't be the case where a reboot changes the actual file in a location. Someone at GliNET needs to take a look into this.

root@GL-MT1300:~# ls -lah /usr/bin/Ad*
-rwxr-xr-x    1 root     root       32.8M May 30 17:48 /usr/bin/AdGuardHome
-rwxr-xr-x    1 root     root       36.6M May 30 17:48 /usr/bin/AdGuardHome.old
root@GL-MT1300:~# ls -lah /overlay/upper/usr/bin/AdGuardHome*
-rwxr-xr-x    1 root     root       32.8M May 30 17:48 /overlay/upper/usr/bin/AdGuardHome
-rwxr-xr-x    1 root     root       36.6M May 30 17:48 /overlay/upper/usr/bin/AdGuardHome.old
root@GL-MT1300:~# /usr/bin/AdGuardHome --version
AdGuard Home, version v0.107.50
root@GL-MT1300:~# /overlay/upper/usr/bin/AdGuardHome --version
AdGuard Home, version v0.107.50
root@GL-MT1300:~#

@alzhao - Can you take a look into this?