# GL-AR300M vs GL-AR300M16 questions

**URL:** <https://forum.gl-inet.com/t/gl-ar300m-vs-gl-ar300m16-questions/58000>\
**Category:** Router\
**Created:** [May 2, 2025, 2:11pm UTC](https://forum.gl-inet.com/t/gl-ar300m-vs-gl-ar300m16-questions/58000 "2025-05-02T14:11:35Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![9b9e69c2-4b75-4420](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/9/a587f6/32.png) [@9b9e69c2-4b75-4420](https://forum.gl-inet.com/u/9b9e69c2-4b75-4420)\
**Post date:** [August 17, 2025, 3:17am UTC](https://forum.gl-inet.com/t/gl-ar300m-vs-gl-ar300m16-questions/58000/4 "2025-08-17T03:17:01Z")

</div>

_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`:

```auto
root@002:~# df -h

```

```auto
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

```

```auto
root@002:~# cat /etc/opkg.conf 

```

```auto
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay
option check_signature
dest opt /mnt/sdb1

```

```auto
root@002:~# head -n 1 /root/.profile

```

```auto
PATH="${PATH}:/root/.bin:/mnt/sdb1/usr/bin:/mnt/sdb1/usr/sbin"

```

* * *

```auto
opkg update && opkg install htop -d opt

```

```auto
root@002:~# which htop

```

```auto
/mnt/sdb1/usr/bin/htop

```

Before symlinks are in place:

```auto
root@002:~# htop

```

```auto
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:

 ![Screenshot_20250817_030033](https://forum-static.gl-inet.com/original/3X/1/0/10f8d98e17c967b5472c5de1dfa88176aebd3b96.png)

* * *

The script:

```auto
/root/.bin/liblink.sh

```

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

* * *

```auto
root@002:~# grep -m '1' 'PRETTY_NAME' /etc/os-release && grep -m '1' 'OPENWRT_ARCH' /etc/os-release && now

```

```auto
PRETTY_NAME="OpenWrt 23.05.0"
OPENWRT_ARCH="x86_64"
20250817T032423UTC

```

```auto
root@certa:~# cat /etc/glversion && grep -m '1' 'PRETTY_NAME' /etc/os-release && now

```

```auto
4.3.25
PRETTY_NAME="OpenWrt 22.03.4"
20250822T022949UTC

```

---

_[View the full topic](https://forum.gl-inet.com/t/gl-ar300m-vs-gl-ar300m16-questions/58000)._
