TerraMaster F2-210 - opkg wget returned 255

I recently got a TerraMaster F2-210 NAS. However, it doesn't have quite a few useful commands, such as make. opkg is also not configured to download packages from anywhere. I've added http://archive.openwrt.org/chaos_calmer/15.05.1/x86/64/packages/packages and https://archive.openwrt.org/chaos_calmer/15.05.1/x86/64/packages/base (which shall now be referred to as packages_url and base_url to avoid the 8 link limit) to the opkg customfeeds.conf file. I've also added arch all 100 and arch x86 200 to the opkg.conf file. However, when I try to run opkg update (as root), it returns a whole lot of lines saying "Package X version Y has no valid architecture, ignoring.", and after that it returns

Downloading packages_url/Packages.gz.
Downloading packages_url/Packages.sig.
Signature check failed.
Remove wrong Signature file.
Downloading base_url/Packages.gz.
Downloading base_url/Packages.sig.
Signature check failed.
Remove wrong Signature file.
Collected errors:
 * opkg_download: Failed to download packages_url/Packages.gz, wget returned 255.
 * opkg_download: Failed to download packages_url/Packages.sig, wget returned 255.
 * opkg_download: Failed to download base_url/Packages.gz, wget returned 255.
 * opkg_download: Failed to download base_url/Packages.sig, wget returned 255.

I believe this to be due to not adding the repository key to the /etc/opkg/keys folder, but I don't know how to do that. Also, wget has to be run using busybox. I have aliased it, though. Any help is appreciated, thanks!

The distfeeds.conf file would pull from the http://downloads.openwrt.org/chaos_calmer/15.05.1/rtd1295/nas_spi/packages repository, but all the relevant links are commented out.

cat /proc/version returns Linux version 4.4.18-g8bcbd8a-dirty (root@developer) (gcc version 4.9.4 (OpenWrt/Linaro GCC 4.9-2015.06 r48422) ) #1248 SMP Wed Nov 27 11:46:14 CST 2019

cat /etc/openwrt_release returns

DISTRIB_DESCRIPTION='OpenWrt Chaos Calmer 15.05.1'
DISTRIB_TAINTS='no-all glibc busybox'

Update to a new version. Chaos Calmer (15.05.1) is VERY VERY old and has many documented security vulnerabilities.

Please update to 19.07.4 and then try again.

1 Like

The rtd1295 target that it's running doesn't seem to be available online anywhere, otherwise I would have. However, I can't risk attempting to install or reinstall an OS on the NAS without being completely sure it'll work perfectly, as it has no video outputs, so if something goes wrong, I can't fix it. If I attempt to install TrueNAS or FreeNAS on the main disk using another PC, it just overwrites it with TerraMaster's TOS software.

EDIT: An important note here is that the NAS will never be completely open to the internet, only a couple of selected ports will be.
EDIT 2: /proc/version says it's running firmware from Nov. 2019

If this is true, it must not be running the official OpenWrt. The last official OpenWrt build for Chaos Calmer was in 2016.

You should probably look for help from the product vendor and/or from support forums dedicated to those devices.

1 Like

Also, it should be stated that your device has an ARM v8 quad core processor. The x86 packages are not compatible with that processor, so you should not be adding architecture to your feeds.

1 Like

TerraMaster probably won't be any help. The F2-210 is fairly new, so there's not a huge amount of info on hacking it out there. Thanks for your time!

If I do find a solution, I'll post it here for anyone in the same situation as me.

1 Like

I've found a workaround for this. The Arch Linux aarch64 (core and extra) packages run on the NAS. I download the package(s), transfer them to the NAS, and run tar -C / -xf <PACKAGE_PATH> to extract it. The dependencies to be manually downloaded and extracted, though. Post-install commands also need to be run manually. I've successfully installed htop using this method, although it's not perfect - many commands, such as make require a newer glibc, which isn't compatible with the other, preinstalled commands on the NAS.

If the old glibc version is removed, it breaks everything but shell builtins (no other SSH sessions can be opened, either). Deleting the old glibc version or libc.so.6 (in /lib) is recoverable by reformatting the HDD, and the bootloader on the NAS will reinstall a clean version of TOS as if nothing ever happened. This will, however, wipe all your data, so make a backup on another disk! The glibc packages from the Arch Linux website install to /usr/lib, so it doesn't immediately break when it is extracted, as the glibc in /lib is prioritised.

It might be easier to use an old CentOS or Debian in a VM as your build environment.