Setups
General information
Wirnet™ iBTS information
Wirnet™ iFemtoCell information
Wirnet™ iFemtoCell-evolution information
Wirnet™ iStation information
System management
Network management
LoRa Features
KerOS customization
Support and resources
Setups
General information
Wirnet™ iBTS information
Wirnet™ iFemtoCell information
Wirnet™ iFemtoCell-evolution information
Wirnet™ iStation information
System management
Network management
LoRa Features
KerOS customization
Support and resources
This is an old revision of the document!
Major versions of KerOS introduce some important modifications (new kernel, hotfixing) requiring an upgrade with a liveburner when coming from the previous KerOS version. A liveburner package will by default flash the eMMC content and install only the KerOS package. So any packages, data, and configurations will be lost using such upgrade packages. This upgrade will be problematic for products already on the field that need to keep a device management link up and running before and after the upgrade.
This page provides:
A custom liveburner has been generated to save usual configuration files:
To upgrade your gateway from version 4.3.3 to version 5.5.4 with this configuration files preservation, use the custom liveburner file custom-liveburner_5.5.4_klkgw-signed.ipk available in the 5.11 release page. To upgrade your system, follow the software update process here.
This custom liveburner can be used to upgrade a gateway without WMC connection. In this case, OpenVPN and BSCC configurations are ignored. Network and LoRa configuration will be saved.
When using this customized liveburner, the following steps are done to achieve the upgrade:
preinst. It will mount a safezone to backup the configuration files BEFORE the installation of the new firmware.postinst. It will mount a safezone to backup the configuration files AFTER the installation of the new firmware.preapps script.postapps script.prereboot script.liveburner package.update_liveburner_package-v5.5.4.tar.gz tool available in the  5.5.4 release page.sudo apt-get install device-tree-compiler cpio binutils tree
Some limits are present in this upgrade mechanism:
The tool integrates sample scripts in the sample_scripts directory that will provide some default migrations:
These scripts can be customized to adapt the custom liveburner to the use case. Please note that some variables/mountpoints are provided:
| Variable | Role | Example | 
|---|---|---|
| ROOTFSRW_PATH | Root path adapted to the firmware version. | cp ${ROOTFSRW_PATH}/etc/hosts ${SAFEZONE_MOUNTPOINT}/ | 
| SAFEZONE_MOUNTPOINT | The mountpoint to use to access the safezone | cp ${ROOTFSRW_PATH}/etc/hosts ${SAFEZONE_MOUNTPOINT}/ | 
| /user | The mountpoint to use to access the RW USER partiton | cp /user/myfile.txt ${SAFEZONE_MOUNTPOINT}/ | 
Please note that the management of the content of the safezone needs to be done using the scripts preinst, postinst, preapps, postapps, prereboot like detailed below.
The recommended way is at least to clean the safezone content before starting to backup your files. The only files that must be kept in the safezone are keros_config.tar.gz, upgrade_logs.tar.gz and upgrade.log.
Uncompress the update_liveburner package:
$ tar -xzvf update_liveburner_package-v5.5.4.tar.gz update_liveburner.sh extract_custom_elements.sh show_ipk_infos.sh functions dumpimage mkimage sample_scripts/ sample_scripts/postinst sample_scripts/postapps sample_scripts/prereboot sample_scripts/preinst sample_scripts/preapps files/ files/rootfs/ files/rootfs/etc/ files/rootfs/etc/rcU.d/ files/rootfs/etc/rcU.d/S99magic_link_renew_certificate.sh
Saving files must be done using the preinst script. It will be executed before installing the new firmware. 
To save some files, append them at the end of the script like shown in the commented example line of sample_scripts/preinst.
####################
# MAIN CUSTOMER PART
####################
# Example:
# cp ${ROOTFSRW_PATH}/etc/hosts ${SAFEZONE_MOUNTPOINT}/
# cp ${ROOTFSRW_PATH}/etc/my_appli ${SAFEZONE_MOUNTPOINT}/
# cp /user/testfile ${SAFEZONE_MOUNTPOINT}/
In the case a custom upgrade blocking problem happens during the execution of this script, it is possible to interrupt the upgrade. To do so, it is possible to use the function fatal_error in the custom part of the script like this:
cp ${ROOTFSRW_PATH}/etc/non_existant_file ${SAFEZONE_MOUNTPOINT}/ || fatal_error "Error detected! stop the upgrade!!"
In addition, customers must take care of the last command launched by the script. If it returns an error, the upgrade will also be aborted. This script is the last chance to stop an upgrade without consequences on the system. After this script, the upgrade is started and errors in other scripts will not stop the process.
To restore file, the method consist of adapting the preapps/postapps scripts (like for preinst).
####################
# MAIN CUSTOMER PART
####################
# Example:
# cp -fR ${SAFEZONE_MOUNTPOINT}/hosts /etc/
# cp -fR ${SAFEZONE_MOUNTPOINT}/my_appli /etc/
# cp -fR ${SAFEZONE_MOUNTPOINT}/testfile /user/
preapps script will be launched after the installation of the KerOS firmware but before installing any application package. postapps script will be launched after the installation of all the application packages.</note>
Then you can launch a generation of custom liveburner using the following command:
#./update_liveburner.sh liveburner_5.5.4_klkgw-signed.ipk sample_scripts/preapps sample_scripts/postapps sample_scripts/preinst sample_scripts/postinst sample_scripts/prereboot
Liveburner custom-liveburner_5.5.4_klkgw-signed.ipk created
-m my_information. This information will be added in the CONTROL file of the package that you can read using the show_ipk_infos.sh tool.
./update_liveburner.sh -m my_information liveburner_5.5.4_klkgw-signed.ipk sample_scripts/preapps sample_scripts/postapps sample_scripts/preinst sample_scripts/postinst sample_scripts/prereboot
./update_liveburner.sh liveburner_5.5.4_klkgw-signed.ipk sample_scripts/preapps sample_scripts/postapps sample_scripts/preinst sample_scripts/postinst sample_scripts/prereboot my_package.ipk
files/rootfs/ of the update liveburner package (example: creation of file S99magic_link_renew_certificate.sh for WMC certificate preservation). The files tree needs to be created in this folder.To upgrade your system, follow the software update process. Information here.
It is possible to extract some information about the content of a previously generated custom liveburner using the tool show_ipk_infos.sh:
# ./show_ipk_infos.sh -h Usage: ./show_ipk_infos.sh [-h] <custom_liveburner.ipk> -h: this usage custom_liveburner.ipk: custom liveburner to extract elements from
Custom packages and scripts are integrated deeply in the liveburner. A tool is available to extract them easily:
# ./extract_custom_elements.sh -h Usage: ./extract_custom_elements.sh [-h] <custom_liveburner.ipk> -h: this usage custom_liveburner.ipk: custom liveburner to extract elements from
Some traces are available after an upgrade with custom_liveburner in /user/.upgrade.log.