Turris Mox setup and update?

Hi there,

I had a mox on crowd funding campaign. And I first tested it this month.
My current setup is router from my provider on with wifi and cables 1gb.
Then the mox has the provider router on Lan two pcs on lan and wifi 2.4ghz. Nothing on Wan.
I don’t know if it is very conventional but it kind of work.
I had to reboot the mox more than once. I have stopped the led and not much more on configuration.
Auto update does not seem to work. How to force it correctly? Or how to get it right?
Are they some update that I am forced to do manually?
Don’t be harsh on me as I am not ultra efficient on these machines

Try run command pkgupdate from CLI.


I wonder why you don’t operate the wan port …

conventional -> wan = internet (isp)
lan = private network (lan)

ideally you connect a cable from your router / isp to the wan port of the turris.

The Pc’s via lan ports then to the Turris.
If your Turris has wifi then set (Refloris) ip des> Turris <here on the web interface.

The updates with restart are a bit buggy the first time (my experience)

First time through update, power off, power on, restart, wait until the hearth beat can be seen and if necessary check whether any errors are being sent …

By default, the Turris has the internal ip (lan)
If your PC is connected to the Turris you can enter this address in your browser and you will get to the Config page of Refloris etc. here you have to follow the instructions. Under certain point there is also updater, here you can then “properly” carry out an update and set a time interval, you may want to get an email if the Turris needs a reboot, you can also set this up.

I hope I could help :slight_smile:


What exactly do you call CLI?
In advanced LuCI configuration I have been to and ran pkgupdate with no success.

In basic configuration I have like 50 error message like that:

Error from 2020/10/15 06:01:32

Updater selhal:

runtime: [string “requests”]:395: [string “utils”]:429: Unable to finish URI (https://repo.turris.cz/hbs/mox/lists/base.lua): Download failed

https://repo.turris.cz/hbs/mox/lists/base.lua works well in my browser.

It is working too if I plug it to wan but in this case I will have a router cascade which will create problems that are above my understanding. Especially for NAT and port forwarding, I tried that years ago and I did not like it too much. Currently I would prefer to keep it this way, router and then switch behaviour of the MOX. Due to cable location and wifi drop I would prefer to keep ip this way.
I see physically two alternative, change position, of router and MOX or buy 4 extra ports for the MOX and get rid of the rooter, with the wifi not where I want it to be.

I have changed turris address to 101 to avoid conflict with the router. I know that this situation is not ideal but it should work and update. It does not update.

  • What is the response to the opkg update command in the MOX terminal?

  • How is Foris - Updater set up? image

  • I would try the MOX update feature once in wiring as the primary router.

  • fabulation :slight_smile: If MOX is as a child router and there is an update request there is no need for any settings on the parent router (port forward, DMZ) or specific DNS setting on MOX.

Sorry for the slow feedback, but I can’t tweak everyday.
So today I have tried to get rid of my provider router, hence trying to wire it as a primary router.
It has been a pain but I think I have found my credentials.
I have tried to set my Turris accordingly, but some parameters don’t show up. Is my version of turris compatible with 802.1P 802.1Q?
Other than that I am set at PPPoE username passowrd MTU1492 but no success.

Edit1: Foris updater is set as automatic. (Setup is kind of stable now)
Edit2: I can’t find how to get to the mox terminal.
You are right as a child router there is no need to setup but still. Ideally it would be my only router.

On another post there is a mention of refloris. I don’t know about that…

App for terminal (or other)

Thanks. That’s a whole new strange world to me. Anyway I managed to connect, But I can’t go online anymore with the turris…
So the result of opkg update is failed to download https://repo.turris.cz/
I tried to get back from PPPoE to dhcp without success. Tried the cable in Wan and Lan… No internet by cable neither wifi.

Edit: I have set back both Wan to dhcp without success but a reboot did the trick.
Opkg download still does the same.
Pasting it in a browser downloads it 393kb which is strange.

Is this a package from the MOX repository ? Then the procedure should be this:
1 - opkg update
2 - opkg install appnname

and help here

root@turris:~# opkg -h
/bin/opkg-cl: unrecognized option: h
opkg must have one sub-command argument
usage: opkg [options...] sub-command [arguments...]
where sub-command is one of:

Package Manipulation:
        update                  Update list of available packages
        upgrade <pkgs>          Upgrade packages
        install <pkgs>          Install package(s)
        configure <pkgs>        Configure unpacked package(s)
        remove <pkgs|regexp>    Remove package(s)
        flag <flag> <pkgs>      Flag package(s)
         <flag>=hold|noprune|user|ok|installed|unpacked (one per invocation)

Informational Commands:
        list                    List available packages
        list-installed          List installed packages
        list-upgradable         List installed and upgradable packages
        list-changed-conffiles  List user modified configuration files
        files <pkg>             List files belonging to <pkg>
        search <file|regexp>    List package providing <file>
        find <regexp>           List packages whose name or description matches <regexp>
        info [pkg|regexp]       Display all info for <pkg>
        status [pkg|regexp]     Display all status for <pkg>
        download <pkg>          Download <pkg> to current directory
        compare-versions <v1> <op> <v2>
                            compare versions using <= < > >= = << >>
        print-architecture      List installable package architectures
        depends [-A] [pkgname|pat]+
        whatdepends [-A] [pkgname|pat]+
        whatdependsrec [-A] [pkgname|pat]+
        whatrecommends[-A] [pkgname|pat]+
        whatsuggests[-A] [pkgname|pat]+
        whatprovides [-A] [pkgname|pat]+
        whatconflicts [-A] [pkgname|pat]+
        whatreplaces [-A] [pkgname|pat]+

        -A                      Query all packages not just those installed
        -V[<level>]             Set verbosity level to <level>.
        --verbosity[=<level>]   Verbosity levels:
                                        0 errors only
                                        1 normal messages (default)
                                        2 informative messages
                                        3 debug
                                        4 debug level 2
        -f <conf_file>          Use <conf_file> as the opkg configuration file
        --conf <conf_file>
        --cache <directory>     Use a package cache
        -d <dest_name>          Use <dest_name> as the the root directory for
        --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).
        -o <dir>                Use <dir> as the root directory for
        --offline-root <dir>    offline installation of packages.
        --add-arch <arch>:<prio>        Register architecture with given priority
        --add-dest <name>:<path>        Register destination with given path

Force Options:
        --force-depends         Install/remove despite failed dependencies
        --force-maintainer      Overwrite preexisting config files
        --force-reinstall       Reinstall package(s)
        --force-overwrite       Overwrite files from other package(s)
        --force-downgrade       Allow opkg to downgrade packages
        --force-space           Disable free space checks
        --force-postinstall     Run postinstall scripts even in offline mode
        --force-remove  Remove package even if prerm script fails
        --force-checksum        Don't fail on checksum mismatches
        --noaction              No action -- test only
        --download-only No action -- download only
        --nodeps                Do not follow dependencies
        --nocase                Perform case insensitive pattern matching
        --size                  Print package size when listing available packages
                                Remove package and all dependencies
        --autoremove            Remove packages that were installed
                                automatically to satisfy dependencies
        -t                      Specify tmp-dir.
        --tmp-dir               Specify tmp-dir.
        -l                      Specify lists-dir.
        --lists-dir             Specify lists-dir.

 regexp could be something like 'pkgname*' '*file*' or similar
 e.g. opkg info 'libstd*' or opkg search '*libop*' or opkg remove 'libncur*'

Well opkg update fail to download:

I have tried opkg update --offline-root c:\ (I have put Packages.gz there)
but it is missing something.

edit: simplified not to mix things

I don’t understand now.

I simplified my previous post not to mix everything.

Delete file opkg.lock if exist - maybe process opkg is active and is locked against run second instance

root@turris:~# ls /
bin boot.scr etc lib64 overlay rom sbin tmp var
boot dev lib mnt proc root sys usr www
root@turris:~# cd /
root@turris:/# cd var
root@turris:/tmp# cd lock
root@turris:/tmp/lock# ls
procd_.lock procd_gpio_switch.lock procd_sshd.lock
procd_atd.lock procd_kresd.lock procd_syslog-ng.lock
procd_cron.lock procd_lighttpd.lock procd_system.lock
procd_dnsmasq.lock procd_network.lock procd_ucitrack.lock
procd_firewall.lock procd_odhcpd.lock procd_umdns.lock
procd_foris-controller.lock procd_rpcd.lock procd_urandom_seed.lock
procd_foris-ws.lock procd_socat.lock smp_tune.lock
procd_fosquitto.lock procd_sqm.lock

no trace of opkg.lock …

I have copied Packages.gz to the / folder of the Turris router.
Then I have tried:
opkg update --offline-root /
Failed it tries to download anyway and then the following

root@turris:~# opkg update --offline-root /Packages.gz
Collected errors:

  • opkg_conf_load: Could not create lock file /Packages.gz//var/lock/opkg.lock: Not a directory.

Now I know how to copy stuff to the router.
What is the correct way to force the offline update?
To I have to move Packages.gz somewhere else?
Do I have to extract it somewhere?
It has to be possible!

Edit: Browsing around I have done the following:
Download rename copy and then wait for reboot each time .
sysupgrade -n -F /Core.gz
sysupgrade -n -F /Base.gz
sysupgrade -n -F /Luci.gz
sysupgrade -n -F /Openwisp.gz
sysupgrade -n -F /Pack.gz
sysupgrade -n -F /Sidn.gz
sysupgrade -n -F /Telephony.gz
sysupgrade -n -F /turrispackages.gz

cat /etc/turris-version still shows 4.0

opkg update now works. I have set Turris as my main Router and that is the key.
opkg install appnname
What do I set as appname? I tried opkg list-upgradable but it is way too long. Then opkg upgrade all, but the warning was strong enough…
So I went pkgupdate went well till INFO:Running postinst of python3-codecs then it disconnected.
A couple of minute of stress and then.
BusyBox v1.30.1 () built-in shell (ash)

  ______                _         ____  _____
 /_  __/_  ____________(_)____   / __ \/ ___/
  / / / / / / ___/ ___/ / ___/  / / / /\__
 / / / /_/ / /  / /  / (__  )  / /_/ /___/ /
/_/  \__,_/_/  /_/  /_/____/   \____//____/

TurrisOS 5.1.2, Turris Mox


Anything else to do?

Name of app. The available names of the depository are visible, for example, in Luci System-Software-Status

I mean pkgupdate went well I guess I am up-to-date now. Thanks for the support, there was so much I had no idea!!!

Warning :wink:, autoupdate is managed in Foris-Updater and visible in Foris Notifications, and actual version OS in Foris - About. For autoupdate is no need any specific action. OPKG … is only for instaling (uninstaling) any additional packet.