GL-AR300M vs GL-AR300M16 questions

Hello,

I purchased GL-AR300M16 model and upgraded couple of weeks ago to 4.3.22-1218-1734488982. I see that there is 4.3.25-0331-1743424534 with security fixes in a release notes. Before I try to upgrade I have a few questions.

  1. Is there a way to downgrade to 3.x version? I realized that GL-AR300M16 has only 16Mb NAND, and after upgrading to 4.x, there is not space to install pretty much any packages, like tcpdump (full) which I like to use.
    a. If it is possible to downgrade to latest 3.x, how much space could I gain? Any specific steps when downgrading I should be aware of?
    b. An alternative, I am thinking maybe installing openwrt version to cut on space. When can I get the latest stable openwrt version with out Luci? Any special instructions/steps to install it?
  2. I realized that where is a GL-AR300M version with 128Mb nand. I looked everywhere and I do not see this version available.
    a. Is it discontinued? If not when will it be available again for purchase?
    b. Is there a refresh planned? any ETA?

Bottom line, I like to have similar device with options to install additional packages.

Thank you

It's discontinued. I have a few AR300m. They're super nice. I wish that GLI net would make a similar router like the r5c

3 Likes

I have a Certa (GL-AR750). It also has 16MB of flash. It is currently sitting @ 152.0K free after getting v4.3.25 & some basic utils installed:

root@certa:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                11.8M     11.8M         0 100% /rom
tmpfs                    59.2M      2.0M     57.1M   3% /tmp
/dev/mtdblock6            1.4M      1.3M    152.0K  90% /overlay
overlayfs:/overlay        1.4M      1.3M    152.0K  90% /
tmpfs                   512.0K         0    512.0K   0% /dev

Get a reputable USB drive of your choice connected. Format & mount it. I have to reproduce & properly document how to conf opkg to install to alternate locations. It'd roughly look like this:

cat /etc/opkg.conf
dest root /
dest ram /tmp
dest sda1_gcc /mnt/sda1/opt/compiler/gcc
dest sda1_golang /mnt/sda1/opt/compiler/golang
lists_dir ext /var/opkg-lists
option overlay_root /overlay

From what I recall it'd be executed something like:

opkg --dest sda1_golang install $some-golang-pkg-name-here

opkg --help
[...]
--dest <dest_name>      package installation, removal, upgrading.
                        <dest_name> should be a defined dest name from
                        the configuration file, (but can also be a
                        directory name in a pinch).

Be sure to add whatever is the destination dir to your $PATH.

tags: extroot alternative, extalt, extroot, storage expansion, stor expansion, liblink, script, shell, certa, gl-ar750, limited flash space, limited storage space, opkg destination, usb drive, usb stick, flash card, usdhc card, sd card

So the basis of opkg install $packageHere -d $targetStorageHere seems to work as expected once the proper $PATH, libraries & xterm dependencies are set. You'd have to run liblink.sh after every firmware upgrade but it's easier to do that than risk extroot which may cause an unbootable system if the flash dies/corrupts.

Caveats

  • The installed packages do not show as installed in LuCI -> System -> Software.
    • Use opkg list-installed | grep '$somePackageNameHere' to see what's already installed.
  • liblink.sh should be executed every time a package installs a dependent library to keep the symlinks in sync.

Here's what it looks like when setting up htop to run off /mnt/sdb1:

root@002:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 4.3M      4.3M         0 100% /rom
tmpfs                   115.7M   1008.0K    114.7M   1% /tmp
/dev/loop0               88.1M      2.3M     78.8M   3% /overlay
overlayfs:/overlay       88.1M      2.3M     78.8M   3% /
/dev/sda1                15.7M      5.5M      9.9M  36% /boot
/dev/sda1                15.7M      5.5M      9.9M  36% /boot
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/sdb1               124.0M     41.1M     82.9M  33% /mnt/sdb1
root@002:~# cat /etc/opkg.conf 
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay
option check_signature
dest opt /mnt/sdb1
root@002:~# head -n 1 /root/.profile
PATH="${PATH}:/root/.bin:/mnt/sdb1/usr/bin:/mnt/sdb1/usr/sbin"

opkg update && opkg install htop -d opt
root@002:~# which htop
/mnt/sdb1/usr/bin/htop

Before symlinks are in place:

root@002:~# htop
Error loading shared library libncursesw.so.6: No such file or directory (needed by /mnt/sdb1/usr/bin/htop)
Error relocating /mnt/sdb1/usr/bin/htop: mousemask: symbol not found
Error relocating /mnt/sdb1/usr/bin/htop: start_color: symbol not found
< snip >
Error relocating /mnt/sdb1/usr/bin/htop: COLORS: symbol not found
Error relocating /mnt/sdb1/usr/bin/htop: stdscr: symbol not found
Error relocating /mnt/sdb1/usr/bin/htop: COLS: symbol not found

After:


The script:

/root/.bin/liblink.sh
#!/bin/sh

# set the mount point of the usb drive or usdhc card here
STOR='/mnt/sdb1/'

# functions for var sanitization
lstrip() {
	printf '%s\n' "${1##"$2"}"
}

rstrip(){
	printf '%s\n' "${1%%"$2"}"
}

# sanitize the vars
STOR="$(lstrip "${STOR}" '/')"
STOR="$(rstrip "${STOR}" '/')"

# create the libraries symlinks if dirs are present
if [ -d /"${STOR}"/usr/lib ]; then
	for link in $(find /"${STOR}"/usr/lib -maxdepth '1' -type 'l' -print0 | grep -o '[^/]*$'); do
		[ -h /usr/lib/"${link}" ] || ln -s /"${STOR}"/usr/lib/"${link}" /usr/lib/"${link}"
	done
else
	logger -p notice -t liblink "Failed to link /${STOR}/usr/lib libraries within /usr/lib [✘]"
	exit 1
fi

# link any init sh to be within /etc/init.d/
# don't expect these to exec on boot if the stor isn't mounted
if [ -d /"${STOR}"/etc/init.d ]; then
	for link in $(find /"${STOR}"/etc/init.d -maxdepth '1' -print0 | grep -o '[^/]*$' | grep -v 'init.d'); do
		[ -h /etc/init.d/"${link}" ] || ln -s /"${STOR}"/etc/init.d/"${link}" /etc/init.d/"${link}"
	done
else
	logger -p notice -t liblink "Failed to link /${STOR}/etc/init.d/${link} within /etc/init.d [✘]"
	exit 1
fi

# ensure the xterm symlinks are present
if [ ! -h /usr/share/terminfo ]; then
	ln -s /"${STOR}"/usr/share/terminfo /usr/share/terminfo
else
	logger -p notice -t liblink "Failed to link /${STOR}/usr/share/terminfo within /usr/share [✘]"
	exit 1
fi

exit 0

Tested with htop & nano in a 23.05.0 x86_64 VM & a Certa (GL-AR750) v4.3.25-release1. YMMV.


root@002:~# grep -m '1' 'PRETTY_NAME' /etc/os-release && grep -m '1' 'OPENWRT_ARCH' /etc/os-release && now
PRETTY_NAME="OpenWrt 23.05.0"
OPENWRT_ARCH="x86_64"
20250817T032423UTC
root@certa:~# cat /etc/glversion && grep -m '1' 'PRETTY_NAME' /etc/os-release && now
4.3.25
PRETTY_NAME="OpenWrt 22.03.4"
20250822T022949UTC
2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.