Open main menu
SUPPORT DOCUMENTATION

Upgrading EAMs with unreliable Internet connections

If your EAM, DM24SxEAM or *TDE instrument has a slow or intermittent Internet connection, there is a possibility of problems occurring during a firmware upgrade. The system can enter a fault state when an upgrade takes a significantly long time or is interrupted. To guard against this, it is possible to download a mirror copy of the firmware onto the file-system of the EAM itself. It can then upgrade itself using this copy as the upgrade source. The process is essentially identical to using a local mirror site with the exception that it uses the device itself as its own mirror server.

The current firmware build must be greater than 10,000. If the current firmware build is below 10,000, please contact for advice.

The system should have access to the Internet during the download step but it does not need Internet access while it is actually upgrading. If the download process is interrupted, it can be easily restarted and it will continue from the point at which it failed. The operation of the device is not affected during the download (other than by creating a bandwidth requirement) so this process can be repeated safely and incrementally until it is complete.

Platinum systems use the rsync protocol to update their firmware to the latest revision. rsync is an extraordinarily flexible tool but can be rather complex. The upgrade script on the EAM is a front-end to rsync which is used to hide this complexity and ensure the safe use of the protocol.

Setting up a Platinum system as its own upgrade mirror involves four steps:

You can then perform the upgrade and, once you are happy that it has been successful, remove the mirror content and return the upgrade system to its standard configuration.

The procedure is slightly different for systems with different architectures so the instructions have been split into three. This set only covers EAMs, DM24SxEAM and *TDE instruments. If you are attempting to upgrade a MkⅡ NAM or Affinity, please select one of the links below:

Downloading the mirror content

It is essential to ensure that sufficient space is available before starting the download step.

The mirror content occupies a significant amount of disk space, so it is important to check the available space before proceeding. To check the space available, log on to the command line of your system and type the command

df -h

The output will normally consist of a table with one line of content, such as:

EAM1234 ~ # df -h Filesystem Size Used Available Use% Mounted on /dev/root 512.0M 190.3M 321.8M 37% / EAM1234 ~

If more than one line is displayed, look for the row where the value in the Mounted on column is "/". The free space is shown in the Available column of the same row. In the example above, it is 321.8 MB

These systems require around 70 MB of free space to store the upgrade image. Only proceed if you have enough space.

The current firmware build must be greater than 10,000. If the current firmware build is below 10,000, please contact for advice.

Next, enter the following command sequence to download the mirror content.

mkdir /home/Pt-firmware-mirror.local cd /home/Pt-firmware-mirror.local GSLSRC=rsync.guralp.com/platinum-stable/CMG-DCM-mk4-eabi rsync -EgHlopPrtv --exclude resolv.conf rsync://$GSLSRC .
Be careful not to omit the final ‘.’ or the space before it in the rsync command above.

These commands download the appropriate firmware image from Güralp’s server. If a command fails for any reason, it can be repeated. It causes no harm to repeat a command even if it appears to have succeeded.

The final output from a successful download looks like this (although the numbers may be different):

⋮ CMG-DCM-mk4-eabi/var/spool/recdata/.keep CMG-DCM-mk4-eabi/var/spool/to-rdisk/ CMG-DCM-mk4-eabi/var/spool/to-rdisk/.keep CMG-DCM-mk4-eabi/var/tmp/ CMG-DCM-mk4-eabi/var/tmp/.keep sent 52,768 bytes received 91,126,040 bytes 6,753,985.78 bytes/sec total size is 90,933,054 speedup is 1.00 EAM1234 ~ #

A repeated download, after a successful download, looks like this (although the numbers may be different):

EAM1234 ~ # rsync -EgHloprtv --exclude resolv.conf rsync://$GSLSRC . receiving incremental file list sent 418 bytes received 74,456 bytes 49,916.00 bytes/sec total size is 90,933,054 speedup is 1,214.48 EAM1234 ~ #

Problems?

The most common problems experienced at this stage are:

rsync reports “Temporary failure in name resolution

If you see error messages like

rsync: getaddrinfo: rsync.guralp.com 873: Temporary failure in name resolution rsync error: error in socket IO (code 10) at clientserver.c(122) [receiver=3.0.2]

it means that the Domain Name Service (DNS) client is misconfigured. If you are running DHCP, this may be a problem with your DHCP server not providing the address of a name-server (or providing an incorrect one). If you are using static addressing, check and correct the nameserver using the net-setup tool.

rsync reports “Network is unreachable

If you see error messages like

rsync: failed to connect to rsync.guralp.com: Network is unreachable (101) rsync error: error in socket IO (code 10) at clientserver.c(122) [receiver=3.0.2]

it means that the network routing is misconfigured. If you are running DHCP, this may be a problem with your DHCP server not providing a default route (or providing an incorrect one). If you are using static addressing, check and correct the default route using the net-setup tool.

rsync reports “rsync error

If you see error messages like

rsync error: received SIGINT, SIGTERM or SIGHUP (code 20) at rsync.c(541)

it means that, most probably, a firewall is blocking traffic on the rsync port. Ask your network administrator to permit the EAM to open TCP connections to host rsync.guralp.com on port 873.

Setting up an rsync server

The rsync server is configured by creating the file /etc/rsyncd.conf using the following commands:

cat >/etc/rsyncd.conf <<EOF port = 61616 [platinum-local-mirror] path = /home/Pt-firmware-mirror.local comment = Platinum firmware numeric ids = yes log file = /var/log/rsync.log timeout = 600 hosts allow = * uid = 0 gid = 0 EOF

Once the /etc/rsyncd.conf file is in place, you should start the rsync server with the command

rsync --daemon

Configuring the upgrade system to use the local server

Create the file /etc/conf.d/upgrade.local using the following commands:

cat >/etc/conf.d/upgrade.local <<EOF RSYNC_HOST="localhost" RSYNC_PORT="61616" RSYNC_MODULE="platinum-local-mirror" RSYNC_ADDITIONAL_OPTS="--no-delay-updates --delete-during" EOF

Safeguarding the upgrade session.

The system is now ready to be upgraded and the upgrade process will not depend on the internet connection. However, if the command-line session running the upgrade is terminated by a broken connection, that will termnate the upgrade, leaving the system in an undefined state. To guard against this, the upgrade will be run in the screen environment. This creates a protected session which cannot be disconnected. To start the session, enter the commmand

screen

and then key enter again to give you a command-line prompt.

If your session is disconnected, reconnect, log in again and then enter screen -r to resume from where you were. Any running commands will have continued to run in the background.

Performing the upgrade

The system can now be updated from the mirror by using the upgrade command. Once the upgrade has completed successfully, the system should be rebooted, either by using the web interface or, from the command-line, with the command reboot.

Tidying up

Once you are totally happy that the upgrade has successful, you can remove the mirror content and return the upgrade system to its normal condition with the commands

rm /etc/conf.d/upgrade.local rm -r /home/Pt-firmware-mirror.local

Further Reading

rsync is a fascinating and elegant solution to many file transfer problems. Further information is available from the rsync documentation page.

For more information, first contact your local distributor or email .