This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wiki:upgrade_keros3_to_4 [2019/02/14 14:55] hch [Limits] |
wiki:upgrade_keros3_to_4 [2019/09/25 17:08] ghi removed |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Upgrade from KerOS version 3.x to 4.x with custom liveburner ====== | + | ====== Upgrade from KerOS version 3.x to 4.0 with custom liveburner ====== |
- | KerOS v4.x introduces some important modifications (new kernel, rootfsRW, hotfixing) requiring an upgrade with a liveburner. This page will provide a way to do this upgrade with conservation of some elements like the configuration and reinstall some additional packages. | + | KerOS v4.0 introduces some important modifications (new kernel, rootfsRW, hotfixing) requiring an upgrade with a liveburner when coming from KerOS v3.x firmware. This page will provide a way to do this upgrade with conservation of some elements like the configuration and reinstall some additional packages. |
===== Introduction ===== | ===== Introduction ===== | ||
Line 22: | Line 22: | ||
- Upgrade of the KerOS system including the eMMC flash and installation of the KerOS package. | - Upgrade of the KerOS system including the eMMC flash and installation of the KerOS package. | ||
- Execution of the ''preapps'' and/or ''postapps'' scripts to access to the safezone and restore/merge saved files. | - Execution of the ''preapps'' and/or ''postapps'' scripts to access to the safezone and restore/merge saved files. | ||
- | - Installation of the additional packages and save in backup. | + | - Execution of the ''preapps'' script (if present) to access to the safezone and restore/merge saved files |
+ | - Installation of the additional packages | ||
+ | - Execution of the ''postapps'' script (if present) | ||
+ | - Save packages in backup | ||
+ | - Execution of the ''prereboot'' script (if present) | ||
- Restart on the new KerOS system. | - Restart on the new KerOS system. | ||
Line 28: | Line 32: | ||
* A desktop Linux machine (native or virtual). //=> It will be used to build the ''liveburner'' package.// | * A desktop Linux machine (native or virtual). //=> It will be used to build the ''liveburner'' package.// | ||
- | * An original KerOS liveburner 4.x package available in the resources page: [[resources_ibts:resources|Wirnet iBTS resources]] or [[resources_ifemto:resources|Wirnet iFemtoCell resources]]. | + | * An original KerOS liveburner 4.0 package available in the resources page: [[wiki:resources|Wirnet gateways resources]]. |
- | * The ''update_liveburner_package-4.0-g8c53719.tar.gz'' tool available [[wiki:common_resources#tools|here]]. | + | * The ''update_liveburner_package-v4.1.0.tar.gz'' tool available [[wiki:resources#tools|here]]. |
- | * The following packages: <code bash>sudo apt-get install device-tree-compiler cpio binutils</code> | + | * The following packages: <code bash>sudo apt-get install device-tree-compiler cpio binutils tree</code> |
===== Limits ===== | ===== Limits ===== | ||
Line 38: | Line 42: | ||
* Additional packages max size cumulated: 20MiB. | * Additional packages max size cumulated: 20MiB. | ||
+ | ===== Migrations supported ===== | ||
+ | |||
+ | The tool integrates sample scripts in the ''sample_scripts'' directory that will provide some migrations: | ||
+ | * System configuration: | ||
+ | * From KerOS 3.x product: Network configuration (/etc/network directory) | ||
+ | * From KerOS 4.0 product: Sysupgrade configuration (except /var directory) | ||
+ | * LoRa configuration: | ||
+ | * SPF to CPF v1.0 conversion | ||
+ | * CPF configuration | ||
+ | * BSCC configuration (for Wanesy Management Center customers) | ||
+ | * Secrets and OpenVPN configuration (for Wanesy Management Center customers) | ||
===== Usage ===== | ===== Usage ===== | ||
Line 47: | Line 62: | ||
First, uncompress the ''update_liveburner'' package: | First, uncompress the ''update_liveburner'' package: | ||
<code bash> | <code bash> | ||
- | #tar -xvzf update_liveburner_package-4.0-g8c53719.tar.gz | + | #tar -xvzf update_liveburner_package-v4.1.0.tar.gz |
update_liveburner.sh | update_liveburner.sh | ||
+ | extract_custom_elements.sh | ||
+ | show_ipk_infos.sh | ||
+ | functions | ||
dumpimage | dumpimage | ||
mkimage | mkimage | ||
- | fitimage.its | + | sample_scripts/ |
- | preinst | + | sample_scripts/postapps |
- | preapps | + | sample_scripts/preapps |
+ | sample_scripts/preinst | ||
+ | sample_scripts/prereboot | ||
+ | spftocpfconf.klk-lpbs | ||
+ | spftocpfconf.klk-wifc | ||
+ | spftocpfconf.klkgw | ||
</code> | </code> | ||
- | The package is ready to be used but will only backup/restore the ''network'' configuration files. | + | The package is ready to be used with some integrated [[wiki:upgrade_keros3_to_4#migrations_supported|migrations]]. |
Then you can launch a generation of ''custom liveburner'' using the following command: | Then you can launch a generation of ''custom liveburner'' using the following command: | ||
<code bash> | <code bash> | ||
- | #./update_liveburner.sh liveburner_4.0.X_klk-lpbs-signed.ipk preinst preapps | + | #./update_liveburner.sh liveburner_4.0.X_klk-lpbs-signed.ipk sample_scripts/preapps sample_scripts/postapps sample_scripts/preinst sample_scripts/prereboot |
Liveburner custom-liveburner_4.0.X_klk-lpbs-signed.ipk created | Liveburner custom-liveburner_4.0.X_klk-lpbs-signed.ipk created | ||
</code> | </code> | ||
Line 67: | Line 90: | ||
Additional packages can be installed simply by adding them as arguments. | Additional packages can be installed simply by adding them as arguments. | ||
<code bash> | <code bash> | ||
- | ./update_liveburner.sh liveburner_4.0.2_klk-lpbs-signed.ipk preinst preapps my_package.ipk | + | ./update_liveburner.sh liveburner_4.0.2_klk-lpbs-signed.ipk sample_scripts/preapps sample_scripts/postapps sample_scripts/preinst sample_scripts/prereboot my_package.ipk |
</code> | </code> | ||
</note> | </note> | ||
+ | |||
+ | <note tip>It is possible to add some information in the description of the package by adding ''-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. | ||
+ | <code bash> | ||
+ | ./update_liveburner.sh -m my_information liveburner_4.0.2_klk-lpbs-signed.ipk sample_scripts/preapps sample_scripts/postapps sample_scripts/preinst sample_scripts/prereboot | ||
+ | </code></note> | ||
=== Advanced process with customization (experienced user) === | === Advanced process with customization (experienced user) === | ||
- | Default upgrade will only keep the ''network'' configuration but it is possible to customize it using the ''preinst'' and ''preapps'' scripts. Please note that some variables/mountpoints are provided: | + | Default upgrade will only keep the ''network'' configuration but it is possible to customize it using the ''preinst'', ''preapps'', ''postapps'' or ''prereboot'' scripts. Please note that some variables/mountpoints are provided: |
^ Variable ^ Role ^ Example ^ | ^ Variable ^ Role ^ Example ^ | ||
Line 80: | Line 108: | ||
| ''/user'' | The mountpoint to use to access the RW USER partiton | ''cp /user/myfile.txt ${SAFEZONE_MOUNTPOINT}/'' | | | ''/user'' | The mountpoint to use to access the RW USER partiton | ''cp /user/myfile.txt ${SAFEZONE_MOUNTPOINT}/'' | | ||
- | In case of custom upgrade, please note that the management of the content of the safezone needs to be done using the scripts ''preinst'' and ''preapps'' like detailed below. | + | In case of custom upgrade, please note that the management of the content of the safezone needs to be done using the scripts ''preinst'', ''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 file that must be kept in the safezone is ''keros_config.tar.gz''. | + | 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''. |
== Save == | == Save == | ||
Line 96: | Line 124: | ||
# It will mount a safezone to backup the configuration files BEFORE | # It will mount a safezone to backup the configuration files BEFORE | ||
# the installation of the new firmware. | # the installation of the new firmware. | ||
- | |||
EMMC_DEVICE="NOT_SUPPORTED" | EMMC_DEVICE="NOT_SUPPORTED" | ||
Line 102: | Line 129: | ||
KEROS_CONFIGS_ARCHIVE="keros_config.tar.gz" | KEROS_CONFIGS_ARCHIVE="keros_config.tar.gz" | ||
ROOTFSRW_PATH="/" | ROOTFSRW_PATH="/" | ||
+ | LOGFILE="${SAFEZONE_MOUNTPOINT}/upgrade.log" | ||
+ | USER_LOGFILE=".upgrade.log" | ||
+ | USER_LOGFILE_ARCHIVE="${SAFEZONE_MOUNTPOINT}/upgrade_logs.tar.gz" | ||
+ | |||
+ | # SPF | ||
+ | SPF_CONFILE="/user/spf/etc/global_conf.json" | ||
+ | SPF2_CONFILE="/user/spf2/etc/config.json" | ||
+ | |||
+ | # CPF | ||
+ | LORAD_CONFDIR="/user/etc/lorad" | ||
+ | LORAFWD_CONFDIR="/user/etc/lorafwd" | ||
+ | CPF_CONFIGS_ARCHIVE="cpf_config.tar.gz" | ||
+ | |||
+ | # BSCC | ||
+ | BSCC_CONFFILE="/user/bscc/var.xml" | ||
+ | |||
+ | # WMC | ||
+ | WMC_CONFIGS_ARCHIVE="wmc_config.tar.gz" | ||
+ | WMC_CONFIGS_CLIENT_OVPN="etc/openvpn/client-openvpn.conf" | ||
+ | WMC_CONFIGS_FILES="\ | ||
+ | etc/hosts \ | ||
+ | ${WMC_CONFIGS_CLIENT_OVPN} \ | ||
+ | etc/firewall.d/iptables_openvpn.rules \ | ||
+ | " | ||
fatal_error() | fatal_error() | ||
{ | { | ||
echo "$1" | echo "$1" | ||
+ | touch /.need_reboot | ||
exit 1 | exit 1 | ||
} | } | ||
+ | |||
detect_emmc() | detect_emmc() | ||
Line 125: | Line 178: | ||
} | } | ||
+ | # Backup the upgrade journal file | ||
+ | # | ||
+ | backup_previous_logs() | ||
+ | { | ||
+ | if [ -f /user/${USER_LOGFILE} ]; then | ||
+ | echo "Saving /user/${USER_LOGFILE}..." | ||
+ | tar -cvzf ${USER_LOGFILE_ARCHIVE} -C /user ${USER_LOGFILE} | ||
+ | echo "/user/${USER_LOGFILE} saved" | ||
+ | fi | ||
+ | } | ||
+ | |||
+ | # Initialize (format) the safezone and mount it in ${SAFEZONE_MOUNTPOINT} | ||
+ | # | ||
create_safezone() | create_safezone() | ||
{ | { | ||
Line 135: | Line 201: | ||
} | } | ||
+ | |||
+ | # Show some information before starting the upgrade for the traces/logs. | ||
+ | # | ||
+ | get_product_description() | ||
+ | { | ||
+ | echo "Upgrade started at: $(date '+%f')" | ||
+ | echo "Installed packages:" | ||
+ | cat /.update/opkg/status | ||
+ | } | ||
+ | |||
+ | |||
+ | # Backup some KerOS configuration files in the safezone. | ||
+ | # Only the /etc/network information are saved. | ||
+ | # | ||
backup_keros_configurations() | backup_keros_configurations() | ||
{ | { | ||
echo "Backuping KerOS configurations in safezone..." | echo "Backuping KerOS configurations in safezone..." | ||
- | tar -cvzf ${SAFEZONE_MOUNTPOINT}/${KEROS_CONFIGS_ARCHIVE} -C ${ROOTFSRW_PATH} etc/network | + | if [ -f ${ROOTFSRW_PATH}/etc/sysupgrade.conf ]; then |
+ | echo "Product support sysupgrade, using it" | ||
+ | (find $(sed -ne "/^[[:space:]]*$/d; /^#/d; s@^/var/@@; p" \ | ||
+ | /etc/sysupgrade.conf /etc/sysupgrade.d/*.conf 2>/dev/null\ | ||
+ | ) /etc/sysupgrade.conf /etc/sysupgrade.d/*.conf \ | ||
+ | -type f -o -type l 2>/dev/null; \ | ||
+ | ) | sort -u > /tmp/keros_conffiles | ||
+ | tar -cvzf ${SAFEZONE_MOUNTPOINT}/${KEROS_CONFIGS_ARCHIVE} -C ${ROOTFSRW_PATH} -T /tmp/keros_conffiles | ||
+ | else | ||
+ | echo "Product does not support sysupgrade, backuping network" | ||
+ | tar -cvzf ${SAFEZONE_MOUNTPOINT}/${KEROS_CONFIGS_ARCHIVE} -C ${ROOTFSRW_PATH} etc/network | ||
+ | fi | ||
echo "Backup finished" | echo "Backup finished" | ||
} | } | ||
+ | |||
+ | |||
+ | # Backup SPF/CPF configuration filed in safezone, if present. | ||
+ | # | ||
+ | backup_lora_configurations() | ||
+ | { | ||
+ | local conf_found=false | ||
+ | local cpf_list_files="" | ||
+ | |||
+ | # SPF | ||
+ | echo "Backuping SPF configurations in safezone..." | ||
+ | for file_to_backup in ${SPF_CONFILE} ${SPF2_CONFILE} | ||
+ | do | ||
+ | if [ -f ${file_to_backup} ]; then | ||
+ | echo "File ${file_to_backup} found in system. Backup it in safezone" | ||
+ | cp -f ${file_to_backup} ${SAFEZONE_MOUNTPOINT}/ | ||
+ | conf_found=true | ||
+ | fi | ||
+ | done | ||
+ | |||
+ | if [ ${conf_found} = true ]; then | ||
+ | echo "Backup SPF finished" | ||
+ | else | ||
+ | echo "No SPF configuration found. Nothing done." | ||
+ | fi | ||
+ | |||
+ | # CPF | ||
+ | echo "Backuping CPF configurations in safezone..." | ||
+ | for dir_to_backup in ${LORAD_CONFDIR} ${LORAFWD_CONFDIR} | ||
+ | do | ||
+ | if [ -d ${dir_to_backup} ]; then | ||
+ | echo "Configuration dir ${dir_to_backup} found in system. Backup it in safezone" | ||
+ | cpf_list_files="${cpf_list_files} ${dir_to_backup}" | ||
+ | fi | ||
+ | done | ||
+ | |||
+ | if [ ! -z "${cpf_list_files}" ]; then | ||
+ | tar -cvzf "${SAFEZONE_MOUNTPOINT}/${CPF_CONFIGS_ARCHIVE}" -C / ${cpf_list_files} | ||
+ | echo "Backup CPF finished" | ||
+ | else | ||
+ | echo "No CPF configuration found. Nothing done." | ||
+ | fi | ||
+ | } | ||
+ | |||
+ | # Backup BSCC configuration file in safezone, if present. | ||
+ | # | ||
+ | backup_bscc_configurations() | ||
+ | { | ||
+ | echo "Backuping BSCC configurations in safezone..." | ||
+ | if [ -f ${BSCC_CONFFILE} ]; then | ||
+ | echo "File ${BSCC_CONFFILE} found in system. Backup it in safezone" | ||
+ | cp -f ${BSCC_CONFFILE} ${SAFEZONE_MOUNTPOINT}/ | ||
+ | echo "Backup BSCC finished" | ||
+ | else | ||
+ | echo "No BSCC configuration found. Nothing done." | ||
+ | fi | ||
+ | |||
+ | } | ||
+ | |||
+ | # Backup Prove&Core SecureStorage information | ||
+ | # | ||
+ | backup_securestorage() | ||
+ | { | ||
+ | echo "Backuping assets loaded in Prove&Core SecureStorage..." | ||
+ | dd if=/dev/${EMMC_DEVICE} bs=512 skip=10240 count=32768 | gzip > ${SAFEZONE_MOUNTPOINT}/pcore_data.img.gz | ||
+ | echo "Backup finished" | ||
+ | } | ||
+ | |||
+ | # Backup WMC configuration files | ||
+ | # | ||
+ | backup_wmc_configurations() | ||
+ | { | ||
+ | echo "Backuping WMC configurations in safezone..." | ||
+ | if [ -f "${ROOTFSRW_PATH}/${WMC_CONFIGS_CLIENT_OVPN}" ]; then | ||
+ | tar -cvzf ${SAFEZONE_MOUNTPOINT}/${WMC_CONFIGS_ARCHIVE} -C ${ROOTFSRW_PATH} ${WMC_CONFIGS_FILES} | ||
+ | echo "Backup WMC configurations finished" | ||
+ | else | ||
+ | echo "No WMC configurations found. Nothing done." | ||
+ | fi | ||
+ | } | ||
+ | |||
+ | #################### | ||
+ | # MAIN KEROS PART | ||
+ | #################### | ||
detect_emmc | detect_emmc | ||
create_safezone | create_safezone | ||
- | backup_keros_configurations | + | backup_previous_logs |
+ | |||
+ | echo -e "\n== START of PREINST script ==\n" 2>&1 | tee ${LOGFILE} | ||
+ | |||
+ | get_product_description 2>&1 | tee -a ${LOGFILE} | ||
+ | |||
+ | # KerOS configuration | ||
+ | backup_keros_configurations 2>&1 | tee -a ${LOGFILE} | ||
+ | |||
+ | # LoRa configuration | ||
+ | backup_lora_configurations 2>&1 | tee -a ${LOGFILE} | ||
+ | |||
+ | # BSCC configuration | ||
+ | backup_bscc_configurations 2>&1 | tee -a ${LOGFILE} | ||
+ | |||
+ | # SecureStorage information | ||
+ | backup_securestorage 2>&1 | tee -a ${LOGFILE} | ||
+ | |||
+ | # WMC configuration | ||
+ | backup_wmc_configurations 2>&1 | tee -a ${LOGFILE} | ||
#################### | #################### | ||
Line 152: | Line 347: | ||
# Example: | # Example: | ||
# cp ${ROOTFSRW_PATH}/etc/hosts ${SAFEZONE_MOUNTPOINT}/ | # cp ${ROOTFSRW_PATH}/etc/hosts ${SAFEZONE_MOUNTPOINT}/ | ||
+ | |||
+ | echo -e "\n== End of PREINST script ==\n" 2>&1 | tee -a ${LOGFILE} | ||
+ | sync | ||
</code> | </code> | ||
++++ | ++++ | ||
Line 178: | Line 376: | ||
#!/bin/sh | #!/bin/sh | ||
# Description: Script to be executed during a liveburner upgrade | # Description: Script to be executed during a liveburner upgrade | ||
- | # but before installing application packages. | + | # but before the installation of the application packages. |
# It will mount the safezone and restore the files. | # It will mount the safezone and restore the files. | ||
Line 184: | Line 382: | ||
SAFEZONE_MOUNTPOINT="/tmp/safezeone" | SAFEZONE_MOUNTPOINT="/tmp/safezeone" | ||
KEROS_CONFIGS_ARCHIVE="keros_config.tar.gz" | KEROS_CONFIGS_ARCHIVE="keros_config.tar.gz" | ||
+ | LOGFILE="${SAFEZONE_MOUNTPOINT}/upgrade.log" | ||
+ | |||
+ | # CPF | ||
+ | CPF_CONFIGFILE="${SAFEZONE_MOUNTPOINT}/cpf_config.tar.gz" | ||
+ | |||
+ | # BSCC | ||
+ | BSCC_CONFFILE="var.xml" | ||
+ | |||
+ | # WMC | ||
+ | WMC_CONFIGS_ARCHIVE="wmc_config.tar.gz" | ||
+ | WMC_SYSUPGRADE_FILE="/etc/sysupgrade.d/openvpn.conf" | ||
+ | WMC_OPENVPN_CONFIG="/etc/openvpn/client-openvpn.conf" | ||
+ | WMC_FIREWALL_RULES="/etc/firewall.d/iptables_openvpn.rules" | ||
+ | WMC_SYSUPGRADE_FILES="${WMC_OPENVPN_CONFIG}" | ||
fatal_error() | fatal_error() | ||
Line 190: | Line 402: | ||
exit 1 | exit 1 | ||
} | } | ||
+ | |||
detect_emmc() | detect_emmc() | ||
Line 205: | Line 418: | ||
} | } | ||
+ | |||
+ | # Mount the safezone mountpoint in ${SAFEZONE_MOUNTPOINT} | ||
+ | # | ||
mount_safezone() | mount_safezone() | ||
{ | { | ||
Line 214: | Line 430: | ||
} | } | ||
+ | # Restore configuration saved in safezone by preinst in | ||
+ | # the new filesystem. | ||
+ | # | ||
restore_keros_configurations() | restore_keros_configurations() | ||
{ | { | ||
Line 226: | Line 445: | ||
} | } | ||
+ | |||
+ | # Adapt KerOS system configuration files restored from | ||
+ | # previous version. In this version, only the Connman configuration | ||
+ | # files are adapted. | ||
+ | # | ||
adjust_keros_configurations() | adjust_keros_configurations() | ||
{ | { | ||
echo "Adjusting KerOS configurations..." | echo "Adjusting KerOS configurations..." | ||
- | |||
- | # Allow Connman to be configured by webui/restAPI | ||
- | for cnf_file in /etc/network/connman/lan.config /etc/network/connman/wlan.config | ||
- | do | ||
- | [ -f "${cnf_file}" ] && mv "${cnf_file}" "${cnf_file}.keros3" | ||
- | done | ||
- | echo "LAN and WLAN configuration files removed" | ||
for service_dir in $(find /etc/network/connman/ -type d \( -name ethernet_* -o -name wifi_* \)) | for service_dir in $(find /etc/network/connman/ -type d \( -name ethernet_* -o -name wifi_* \)) | ||
Line 248: | Line 465: | ||
fi | fi | ||
done | done | ||
+ | |||
+ | # Report nameservers for Ethernet interface | ||
+ | if [ -f /etc/network/connman/lan.config ] | ||
+ | then | ||
+ | local nameservers=$(awk -F "=" '$1 ~ "Nameservers" {gsub(",",";",$2);gsub(" ","",$2);print $2}' /etc/network/connman/lan.config) | ||
+ | if [ ! -z "${nameservers}" ] | ||
+ | then | ||
+ | for service_dir in $(find /etc/network/connman/ -type d -name ethernet_*) | ||
+ | do | ||
+ | local settings_file="${service_dir}/settings" | ||
+ | if [ -f "${settings_file}" ] | ||
+ | then | ||
+ | echo "Apply static nameservers ${nameservers} in ${settings_file}" | ||
+ | sed -i '/^Nameservers.*/d' "${settings_file}" | ||
+ | echo "Nameservers=${nameservers}" >> "${settings_file}" | ||
+ | fi | ||
+ | done | ||
+ | fi | ||
+ | fi | ||
+ | |||
+ | # Allow Connman to be configured by webui/restAPI | ||
+ | for cnf_file in /etc/network/connman/lan.config /etc/network/connman/wlan.config | ||
+ | do | ||
+ | [ -f "${cnf_file}" ] && mv "${cnf_file}" "${cnf_file}.keros3" | ||
+ | done | ||
+ | echo "LAN and WLAN configuration files removed" | ||
echo "Adjustements finished" | echo "Adjustements finished" | ||
} | } | ||
+ | |||
+ | |||
+ | # Restore SPF/CPF configurations from the content in the | ||
+ | # safezone. In case of SPF to CPF upgrade, convert configuration. | ||
+ | # | ||
+ | restore_lora_configurations() | ||
+ | { | ||
+ | echo "Restoring CPF configurations from safezone..." | ||
+ | if [ -f "${CPF_CONFIGFILE}" ]; then | ||
+ | tar -xvzf "${CPF_CONFIGFILE}" -C / | ||
+ | echo "CPF configuration restored" | ||
+ | else | ||
+ | echo "No CPF configuration in safezone. Nothing done." | ||
+ | fi | ||
+ | } | ||
+ | |||
+ | |||
+ | # Restore configuration saved in safezone by preinst in | ||
+ | # the new filesystem. | ||
+ | # | ||
+ | restore_bscc_configurations() | ||
+ | { | ||
+ | echo "Restoring BSCC configurations from safezone..." | ||
+ | if [ -f ${SAFEZONE_MOUNTPOINT}/${BSCC_CONFFILE} ] | ||
+ | then | ||
+ | mkdir -p /user/bscc/ | ||
+ | cp -f ${SAFEZONE_MOUNTPOINT}/${BSCC_CONFFILE} /user/bscc/ | ||
+ | echo "Restoration finished" | ||
+ | else | ||
+ | echo "No restoration files in safezone. Nothing done." | ||
+ | fi | ||
+ | } | ||
+ | |||
+ | # Restore Prove&Core SecureStorage information. | ||
+ | restore_securestorage() | ||
+ | { | ||
+ | echo "Restore Prove&Core SecureStorage..." | ||
+ | if [ -f ${SAFEZONE_MOUNTPOINT}/pcore_data.img.gz ]; then | ||
+ | gunzip -c ${SAFEZONE_MOUNTPOINT}/pcore_data.img.gz | dd of=/dev/${EMMC_DEVICE} bs=512 seek=10240 | ||
+ | echo "Prove&Core SecureStorage restored" | ||
+ | else | ||
+ | echo "No Prove&Core SecureStorage found. Nothing done." | ||
+ | fi | ||
+ | } | ||
+ | |||
+ | # Adapt WMC configuration files for new firmware (if necessary) | ||
+ | # | ||
+ | adapt_wmc_configurations() | ||
+ | { | ||
+ | echo "Adapting WMC configuration files..." | ||
+ | |||
+ | # Sysupgrade | ||
+ | echo "${WMC_SYSUPGRADE_FILES}" > ${WMC_SYSUPGRADE_FILE} | ||
+ | |||
+ | # Tunneling Tools 3.0 modifications | ||
+ | # | ||
+ | |||
+ | # OpenVPN configuration | ||
+ | sed -i 's/^route-up/;route-up/g' ${WMC_OPENVPN_CONFIG} | ||
+ | |||
+ | # Firewall rules | ||
+ | cat << EOF > ${WMC_FIREWALL_RULES} | ||
+ | #Firewall rules to accept OpenVPN traffic | ||
+ | |||
+ | *filter | ||
+ | -I INPUT -m udp -p udp --sport 1194 --dport 1024:65535 -j ACCEPT | ||
+ | -I INPUT -m udp -p udp --sport 30000:35000 --dport 1024:65535 -j ACCEPT | ||
+ | -I OUTPUT -m udp -p udp --sport 1024:65535 --dport 1194 -j ACCEPT | ||
+ | -I OUTPUT -m udp -p udp --sport 1024:65535 --dport 30000:35000 -j ACCEPT | ||
+ | COMMIT | ||
+ | EOF | ||
+ | |||
+ | # forcibly set lns, snmp & ntp addresses | ||
+ | awk -F "\t" ' | ||
+ | $2 == "lns" || $2 == "snmp" || $2 == "ntp.ran.com" { next } | ||
+ | { print } | ||
+ | END { | ||
+ | printf "172.17.0.1\tlns\n" | ||
+ | printf "172.17.0.1\tsnmp\n" | ||
+ | printf "172.17.0.1\tntp.ran.com\n" | ||
+ | }' < /etc/hosts > /etc/hosts.new \ | ||
+ | && mv -f /etc/hosts.new /etc/hosts | ||
+ | |||
+ | echo "Done" | ||
+ | |||
+ | } | ||
+ | |||
+ | # Restore WMC configuration from safezone | ||
+ | restore_wmc_configurations() | ||
+ | { | ||
+ | echo "Restoring WMC configurations from safezone..." | ||
+ | if [ -f ${SAFEZONE_MOUNTPOINT}/${WMC_CONFIGS_ARCHIVE} ] | ||
+ | then | ||
+ | # Restore the configuration | ||
+ | tar -xvzf ${SAFEZONE_MOUNTPOINT}/${WMC_CONFIGS_ARCHIVE} -C / | ||
+ | |||
+ | # Adapt for KerOS 4.0 | ||
+ | adapt_wmc_configurations | ||
+ | |||
+ | echo "Restoration finished" | ||
+ | else | ||
+ | echo "No restoration files in safezone. Nothing done." | ||
+ | fi | ||
+ | } | ||
+ | |||
+ | #################### | ||
+ | # MAIN KEROS PART | ||
+ | #################### | ||
detect_emmc | detect_emmc | ||
mount_safezone | mount_safezone | ||
- | restore_keros_configurations | + | |
- | adjust_keros_configurations | + | echo -e "\n== Start of PREAPPS script ==\n" 2>&1 | tee -a ${LOGFILE} |
+ | |||
+ | # KerOS configuration | ||
+ | restore_keros_configurations 2>&1 | tee -a ${LOGFILE} | ||
+ | adjust_keros_configurations 2>&1 | tee -a ${LOGFILE} | ||
+ | |||
+ | # LoRa configuration | ||
+ | restore_lora_configurations 2>&1 | tee -a ${LOGFILE} | ||
+ | |||
+ | # BSCC configuration | ||
+ | restore_bscc_configurations 2>&1 | tee -a ${LOGFILE} | ||
+ | |||
+ | # SecureStorage information | ||
+ | restore_securestorage 2>&1 | tee -a ${LOGFILE} | ||
+ | |||
+ | # WMC configuration | ||
+ | restore_wmc_configurations 2>&1 | tee -a ${LOGFILE} | ||
#################### | #################### | ||
Line 264: | Line 631: | ||
# cp -fR ${SAFEZONE_MOUNTPOINT}/* /etc/ | # cp -fR ${SAFEZONE_MOUNTPOINT}/* /etc/ | ||
+ | echo -e "\n== End of PREAPPS script ==\n" 2>&1 | tee -a ${LOGFILE} | ||
+ | sync | ||
</code> | </code> | ||
++++ | ++++ | ||
Line 273: | Line 642: | ||
==== Install a custom liveburner ==== | ==== Install a custom liveburner ==== | ||
- | To upgrade your system, follow the software update process. Information [[wiki:sw_updates|here]]. | + | To upgrade your system, follow the software update process. Information [[wiki:sw_updates|here]]. |
- | ==== Expected traces of upgrade ==== | + | ==== Read custom liveburner information ==== |
- | Please find here the important part of a liveburner upgrade with save/restoration of ''network'' files: | + | It is possible to extract some information about the content of a previously generated custom liveburner using the tool ''show_ipk_infos.sh'': |
- | ++++ traces.log | | + | <code bash> |
+ | # ./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 | ||
+ | </code> | ||
+ | |||
+ | For example: | ||
+ | <code bash> | ||
+ | # ./show_ipk_infos.sh custom-liveburner_4.0.2_klk-lpbs-signed.ipk | ||
+ | == Package content == | ||
+ | |||
+ | /tmp/updateliveburner/ipk/ | ||
+ | ├── control | ||
+ | │ ├── control | ||
+ | │ ├── postinst | ||
+ | │ └── preinst | ||
+ | ├── data | ||
+ | │ └── tmp | ||
+ | │ └── linux.itb | ||
+ | └── debian-binary | ||
+ | |||
+ | 3 directories, 5 files | ||
+ | |||
+ | == Package CONTROL == | ||
+ | |||
+ | Package: liveburner | ||
+ | Version: 4.0.2-0-g0d9f3135 | ||
+ | Depends: keros (>= 2.0.0) | ||
+ | Architecture: klk_lpbs | ||
+ | Maintainer: Kerlink <support@kerlink.fr> | ||
+ | Priority: required | ||
+ | Section: keros | ||
+ | Source: http://www.kerlink.fr | ||
+ | Description: Kerlink OS | ||
+ | Kerlink OS tunned for klk_lpbs target | ||
+ | Sign information: SRK0=0xDBCE282B | ||
+ | Files added: | ||
+ | lorad_1.0.0-1_klk_lpbs.ipk | ||
+ | lorafwd_1.0.1-1_armv7ahf-neon.ipk | ||
+ | netsnmphotfix_1.0.0_klk_lpbs.ipk | ||
+ | lorasnmp_v3.1_klk_lpbs.ipk | ||
+ | bscc_v3.1_klk_lpbs.ipk | ||
+ | preinst | ||
+ | postapps | ||
+ | prereboot | ||
+ | preapps | ||
+ | |||
+ | == Burner content == | ||
+ | |||
+ | /tmp/updateliveburner/ipk/data/tmp/itb/initrd/burner/ | ||
+ | ├── bscc_v3.1_klk_lpbs.ipk | ||
+ | ├── keros.ipk | ||
+ | ├── lorad_1.0.0-1_klk_lpbs.ipk | ||
+ | ├── lorafwd_1.0.1-1_armv7ahf-neon.ipk | ||
+ | ├── lorasnmp_v3.1_klk_lpbs.ipk | ||
+ | ├── netsnmphotfix_1.0.0_klk_lpbs.ipk | ||
+ | ├── postapps | ||
+ | ├── preapps | ||
+ | ├── prereboot | ||
+ | └── spftocpfconf | ||
+ | |||
+ | 0 directories, 10 files | ||
+ | </code> | ||
+ | |||
+ | ==== Extract content of a custom liveburner ==== | ||
+ | |||
+ | Custom packages and scripts are integrated deeply in the liveburner. A tool is present to extract them easily: | ||
+ | <code bash> | ||
+ | # ./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 | ||
+ | </code> | ||
+ | |||
+ | For example: | ||
+ | <code bash> | ||
+ | # ./extract_custom_elements.sh custom-liveburner_4.0.2_klk-lpbs-signed.ipk | ||
+ | Extracting IPK file "custom-liveburner_4.0.2_klk-lpbs-signed.ipk" in workspace /tmp/updateliveburner... | ||
+ | IPK file "custom-liveburner_4.0.2_klk-lpbs-signed.ipk" extracted | ||
+ | Extracting Linux ITB "/tmp/updateliveburner/ipk/data/tmp/linux.itb" in workspace /tmp/updateliveburner/ipk/data/tmp... | ||
+ | Extracting Kernel... | ||
+ | Extracted: | ||
+ | Image 0 (kernel@1) | ||
+ | Description: Kerlink Linux kernel | ||
+ | Created: Mon Apr 1 11:04:03 2019 | ||
+ | Type: Kernel Image | ||
+ | Compression: uncompressed | ||
+ | Data Size: 4668384 Bytes = 4558.97 kB = 4.45 MB | ||
+ | Architecture: ARM | ||
+ | OS: Linux | ||
+ | Load Address: 0x80800000 | ||
+ | Entry Point: 0x80800000 | ||
+ | Hash algo: md5 | ||
+ | Hash value: 932a4133297a29fb9ebb0b65fd8bcd44 | ||
+ | Kernel extracted | ||
+ | Extracting DTB... | ||
+ | Extracted: | ||
+ | Image 1 (fdt@1) | ||
+ | Description: Kerlink board Flattened Device Tree blob | ||
+ | Created: Mon Apr 1 11:04:03 2019 | ||
+ | Type: Flat Device Tree | ||
+ | Compression: uncompressed | ||
+ | Data Size: 32907 Bytes = 32.14 kB = 0.03 MB | ||
+ | Architecture: ARM | ||
+ | Hash algo: md5 | ||
+ | Hash value: ebc1494b4546fa4bb824965abcebac86 | ||
+ | DTB extracted | ||
+ | Extracting INITRD... | ||
+ | Extracted: | ||
+ | Image 2 (ramdisk@1) | ||
+ | Description: Ramdisk Image | ||
+ | Created: Mon Apr 1 11:04:03 2019 | ||
+ | Type: RAMDisk Image | ||
+ | Compression: gzip compressed | ||
+ | Data Size: 55649617 Bytes = 54345.33 kB = 53.07 MB | ||
+ | Architecture: ARM | ||
+ | OS: Linux | ||
+ | Load Address: 0x82000000 | ||
+ | Entry Point: 0x82000000 | ||
+ | Hash algo: md5 | ||
+ | Hash value: b051802e0f1797103a8ab41540edac29 | ||
+ | INITRD extracted | ||
+ | Linux ITB extracted | ||
+ | Extracting INITRD "/tmp/updateliveburner/ipk/data/tmp/itb/initrd.cpio.gz" in workspace /tmp/updateliveburner/ipk/data/tmp/itb... | ||
+ | 116753 blocs | ||
+ | INITRD extracted | ||
+ | |||
+ | == Extracting elements == | ||
+ | |||
+ | File bscc_v3.1_klk_lpbs.ipk extracted | ||
+ | File keros.ipk extracted | ||
+ | File lorad_1.0.0-1_klk_lpbs.ipk extracted | ||
+ | File lorafwd_1.0.1-1_armv7ahf-neon.ipk extracted | ||
+ | File lorasnmp_v3.1_klk_lpbs.ipk extracted | ||
+ | File netsnmphotfix_1.0.0_klk_lpbs.ipk extracted | ||
+ | File postapps extracted | ||
+ | File preapps extracted | ||
+ | File prereboot extracted | ||
+ | File spftocpfconf extracted | ||
+ | File preinst extracted | ||
+ | |||
+ | All elements are extracted in custom-liveburner_4.0.2_klk-lpbs-signed directory | ||
+ | |||
+ | == Extraction finished == | ||
+ | </code> | ||
+ | |||
+ | ==== Upgrade traces ==== | ||
+ | |||
+ | Some traces are available after an upgrade in ''/user/.upgrade.log'': | ||
+ | |||
+ | ++++ .upgrade.log | | ||
<code> | <code> | ||
- | Application package custom-liveburner_4.0-beta1-72-g1461500-dirty_klk-lpbs-unsigned.ipk found | + | == START of PREINST script == |
- | Creating safezone | + | |
- | mke2fs 1.43.5 (04-Aug-2017) | + | Upgrade started at: 2019.04.01-09:05:45 |
- | Discarding device blocks: done | + | Installed packages: |
- | Creating filesystem with 2048 1k blocks and 256 inodes | + | Package: keros |
+ | Version: 3.4.5-0-g1d8781c3 | ||
+ | Status: install user installed | ||
+ | Architecture: klk_lpbs | ||
+ | Conffiles: | ||
+ | /user/rootfs_rw/etc/strongswan.conf cf3d1b642d68b1af384aa0d8adf31deb | ||
+ | /user/rootfs_rw/etc/timestamp 388d21c6903889b890300fac5fdff1f0 | ||
+ | /user/rootfs_rw/etc/network/netctl.cfg 9aca669e1306572262ef84dec656bf55 | ||
+ | /user/rootfs_rw/etc/network/connman/wlan.config 12970b252f6f74ad9e2d6aa951fdcdd8 | ||
+ | /user/rootfs_rw/etc/network/connman/settings a2ab33efcebeb5bcfd2fafe6241c3664 | ||
+ | /user/rootfs_rw/etc/network/connman/lan.config ab1b3ada039b2a5f9b6edb70bf1db0e7 | ||
+ | /user/rootfs_rw/etc/network/connman/main.conf 95c5fdd6595b53d575df41d37531a3ae | ||
+ | /user/rootfs_rw/etc/network/networkmonitoring.conf c41c77dbc5f68c2f11f58de00e241d38 | ||
+ | /user/rootfs_rw/etc/network/ifplugd/local.conf 3d44653fc4425d091ade75fc9b1df8f4 | ||
+ | /user/rootfs_rw/etc/network/ifplugd/local.action a2546d68f405d8d59222aa6482b12247 | ||
+ | /user/rootfs_rw/etc/network/fixnetwork.conf 6e63c6334d1e660ab1ecd4e12e56d7a8 | ||
+ | /user/rootfs_rw/etc/network/ofono/provisioning e27418f4fa48d772ff1ebd9b0247e31c | ||
+ | /user/rootfs_rw/etc/network/udhcpd.conf e0d43b5339045ec7cee8628efdbbefdc | ||
+ | /user/rootfs_rw/etc/network/if-pre-up.d/nfsroot 860854f45d519a51115e57ca385cfdab | ||
+ | /user/rootfs_rw/etc/network/interfaces 0e79ac68d83a8845f49afc61043c79a5 | ||
+ | /user/rootfs_rw/etc/bnm/bnm.conf 9b2452e4a278678c858fcb46acaf4ffb | ||
+ | /user/rootfs_rw/etc/hosts 4af6093d05fd4d338a78484bd352927d | ||
+ | /user/rootfs_rw/etc/syslog.conf.busybox 540bb318838b630604b5402a215823c4 | ||
+ | /user/rootfs_rw/etc/kgpsd.conf 00e7484a7d46e0f1cc6ac37214286b32 | ||
+ | /user/rootfs_rw/etc/syslog-startup.conf.busybox 2f3c9dede1fc155ef7483a2da55ce6d7 | ||
+ | /user/rootfs_rw/etc/default/useradd 7a57ebc1418d2d642af3be1de10d0aa0 | ||
+ | /user/rootfs_rw/etc/default/networking e81d6de8b5acf94aa3e1f046ffb18687 | ||
+ | /user/rootfs_rw/etc/default/ntpdate cd14e09db7250943bcc3faa96455b963 | ||
+ | /user/rootfs_rw/etc/default/usbd d41d8cd98f00b204e9800998ecf8427e | ||
+ | /user/rootfs_rw/etc/default/connman d41d8cd98f00b204e9800998ecf8427e | ||
+ | /user/rootfs_rw/etc/default/ssh 18d0a455bee343e830355f8172905e00 | ||
+ | /user/rootfs_rw/etc/default/volatiles/01_bootlogd 1702eb9b6085684d59e25b4f161563c4 | ||
+ | /user/rootfs_rw/etc/default/volatiles/99_sshd c6ea8ff7e649754524cd9e75c9745692 | ||
+ | /user/rootfs_rw/etc/default/volatiles/00_core e5c4a7033f31af5f6d7196438c2b415e | ||
+ | /user/rootfs_rw/etc/default/volatiles/99_dbus 8631f479b6e6f2a1b6fd77917318b8c0 | ||
+ | /user/rootfs_rw/etc/default/devpts 096b1396d8f56264264ba3a811057e66 | ||
+ | /user/rootfs_rw/etc/default/ofono d41d8cd98f00b204e9800998ecf8427e | ||
+ | /user/rootfs_rw/etc/default/rcS 168925386cef321719e9444b79dc079f | ||
+ | /user/rootfs_rw/etc/default/udev-cache d58a17ab27f6c83f7b5f4a6223aa6cec | ||
+ | /user/rootfs_rw/etc/firewall.d/zz_reject.rules 183dbab28e4433c49f2dd645f5b34f52 | ||
+ | /user/rootfs_rw/etc/firewall.d/zz_reject.v6rules 43f44cb1d26431afbd895fd06bc26672 | ||
+ | /user/rootfs_rw/etc/firewall.d/00_default.v6rules d8c79c7d460bcc7c21b95b367251cda0 | ||
+ | /user/rootfs_rw/etc/firewall.d/00_default.rules 4e54f851de9d064bbd9b04a855460532 | ||
+ | /user/rootfs_rw/etc/ssh/sshd_config_readonly 75a76714faec7b15e9029ec844a9e3a6 | ||
+ | /user/rootfs_rw/etc/ssh/ssh_config d67fa61ccbd8e0dbdfd2fb29d28cf715 | ||
+ | /user/rootfs_rw/etc/ssh/sshd_config 1979d17ccbf2f885fda32b1fe8b6c006 | ||
+ | /user/rootfs_rw/etc/ssh/moduli b27b6034c05755a41dfec04ce29c09ed | ||
+ | /user/rootfs_rw/etc/ipsec.secrets 7e4728359aece845fc087624273f2bd9 | ||
+ | /user/rootfs_rw/etc/ipsec.conf 01485a8658db82dd781f9229f4151661 | ||
+ | /user/rootfs_rw/etc/monit.d/watchdog 92efa65dabd036060cfdea5831c19191 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon.conf 0672ccc2d2d2b11709b64b5bfadcd203 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/gcm.conf 13ee7ff0e89523b688a6c46c74e085f2 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/pubkey.conf 61d9bf247a544d18deca9a2495f8a9bf | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/pem.conf 9c2afa980f36e76a5f11401187789364 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/kernel-netlink.conf 74f9efb2a9826523db3c774393bffd86 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/md5.conf 51840e725e3fa3aef815767b7219cd9c | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/constraints.conf e99f94125d99e9b0860af190b539af51 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/stroke.conf effb1b5bc46a7c849754fada75bae0d2 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/x509.conf d005d70bf8f9a027d4f63b4022310f89 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/vici.conf f2900f82fb39ef2539933ca143d53765 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/pkcs1.conf 9d2fd3f462e24ccd84db7581a6e8a79a | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/xauth-generic.conf a7190a4f18b8947d9fd41b47714790a6 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/sha2.conf 48b9881b58c374092e72668e8ff89f29 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/random.conf 8fc0148bfb6efe8033c7cacebe5da452 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/resolve.conf b66dc6537ea8e97b4fb294549ae36fff | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/gmp.conf 697cf867d66f97ac4b0fdc9b5642b214 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/fips-prf.conf 0e040afc20ca84907ab0b429e09741b6 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/socket-default.conf 6d84fb4b6fb735f4a4453085174d069a | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/xcbc.conf 15b9fc5696459acf30ee5702727678b6 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/cmac.conf fbd1ee81be48f5facce569cd20131848 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/rc2.conf b40a14dfd4b1752674d7d94f68380c16 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/dnskey.conf 2eca11a1873d4e5bdf2e9ce9b31c8388 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/des.conf 72042146faee078d43917d199e4ca1d0 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/curve25519.conf e0bf280a7f9cc8faf054b9194377ddda | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/pkcs12.conf 99155df25407780627c03317bb86d4bd | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/pkcs7.conf 11efe7f05fb024f7bf0ae0e82c03032c | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/aes.conf f7653385de28b293e155c7257d976162 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/sha1.conf a233d1540ec2cabf0ff1e53113f3a2fd | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/hmac.conf 96276990445951092f232d92696562bb | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/curl.conf 5df3d2385675d2eee2b04c39c9a14dcf | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/nonce.conf 81985735b2aa564a34d9537dfec47aa1 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/revocation.conf 6e92a2290c40898265a3a47c5a16e1a9 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/pkcs8.conf ff23bb9a129a830ff124556cedc100fc | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/openssl.conf 2d9b7f2f3f9655d3c115d40dc1cbf7df | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/updown.conf 241b5341a5537b0864c7f2027d38f37d | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/sshkey.conf 2a454f37202953d289f193ae5e002c10 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/sqlite.conf c01d77bfd63fb7f62e923f76ac21969a | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/attr.conf 21648bde93f9784652cdbbb306cfd88e | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon/pgp.conf 651a092d54d65f0b16ac6a3566fdbde4 | ||
+ | /user/rootfs_rw/etc/strongswan.d/charon-logging.conf cffbfccbe86d9791affa7e75c7b288c8 | ||
+ | /user/rootfs_rw/etc/strongswan.d/pki.conf cf98e1db88564cf22ed739248e40a641 | ||
+ | /user/rootfs_rw/etc/strongswan.d/starter.conf 2ba2784c18e268e34cec179d90e38437 | ||
+ | /user/rootfs_rw/etc/cron/crontabs/root a627eda691b84a41fd59db058eeecfc0 | ||
+ | /user/rootfs_rw/etc/shadow de7508af2d9419de71bf36037ae8e09c | ||
+ | /user/rootfs_rw/etc/udhcpc.d/50default 49bd58c861c2e2a6725b46c37de59336 | ||
+ | /user/rootfs_rw/etc/ntp.conf 902e083d1d354b769c19d02aee0ad808 | ||
+ | Installed-Size: 45408612 | ||
+ | Installed-Time: 1554106886 | ||
+ | |||
+ | Package: kerlink-openvpn-config-pki2-klk-lpbs-060240 | ||
+ | Version: 1.11-190108 | ||
+ | Depends: keros (>= 3.1) | ||
+ | Status: install user installed | ||
+ | Architecture: cortexa9hf-neon-mx6sx | ||
+ | Conffiles: | ||
+ | /user/rootfs_rw/etc/firewall.d/iptables_openvpn.rules f6f8c63d4451d410f42f95517d664154 | ||
+ | /user/rootfs_rw/etc/openvpn/client-openvpn.conf 6777f803d77e15dbcfce9629d14464b0 | ||
+ | /user/rootfs_rw/etc/network/connman/openvpn.config 8c576523f73b19b588c6b629305a2d50 | ||
+ | Installed-Size: 9476 | ||
+ | Installed-Time: 1554107004 | ||
+ | |||
+ | Package: spf2 | ||
+ | Version: 5.1.0-klk4_5.1.0-klk5 | ||
+ | Depends: keros | ||
+ | Conflicts: lorad, kpfd, pkt-forwarder, packet-forwarder-v2 | ||
+ | Status: install user installed | ||
+ | Architecture: klk_lpbs | ||
+ | Conffiles: | ||
+ | /user/spf2/etc/config_single_antenna_64ch_US915.json 8573f878cd008c5166f6339ee8f6570f | ||
+ | /user/spf2/etc/config_dual_antenna_8ch_AU928.json 093f3fc1821c7fe2a06c191be653a837 | ||
+ | /user/spf2/etc/config_single_antenna_16ch_JP920.json 7bf9e34e6a9441e31b384665a8355969 | ||
+ | /user/spf2/etc/config_dual_antenna_8ch_JP920.json 6c7e9861b2bcd201e46b625fe7bbe741 | ||
+ | /user/spf2/etc/config_single_antenna_64ch_AU928.json 050e7bce9de86f05bf56a9ea11c8fb62 | ||
+ | /user/spf2/etc/config_dual_antenna_8ch_EU868.json 992c12d8e77d7e09d6c732a7af0303fc | ||
+ | /user/spf2/etc/config_dual_antenna_8ch_US915.json f4c8776152d0079b24ceebfcd1629f30 | ||
+ | /user/spf2/etc/config_single_antenna_16ch_EU868.json 5255993ea01a6cd17049e80a6e53e130 | ||
+ | /user/spf2/etc/config_single_antenna_16ch_AU928.json e5eb8235f688a9024ef952eed169c0bd | ||
+ | /user/spf2/etc/config_single_antenna_16ch_US915.json bdc062e48823fb4d6d2e709c738f096d | ||
+ | Installed-Size: 826562 | ||
+ | Installed-Time: 1554107009 | ||
+ | |||
+ | Package: bscc | ||
+ | Version: v3.0.8 | ||
+ | Depends: keros (>= 2.1.0) | ||
+ | Status: install user unpacked | ||
+ | Architecture: klk_lpbs | ||
+ | Installed-Size: 343428 | ||
+ | Installed-Time: 1554107003 | ||
- | Allocating group tables: done | + | Package: lorasnmp |
- | Writing inode tables: done | + | Version: v3.0.8 |
- | Writing superblocks and filesystem accounting information: done | + | Depends: keros (>= 2.1.0) |
+ | Status: install user installed | ||
+ | Architecture: klk_lpbs | ||
+ | Installed-Size: 1146354 | ||
+ | Installed-Time: 1554107009 | ||
- | [ 6.929758] EXT4-fs (mmcblk0boot0): mounted filesystem without journal. Opts: (null) | ||
- | Safezone created and ready to use | ||
Backuping KerOS configurations in safezone... | Backuping KerOS configurations in safezone... | ||
+ | Product does not support sysupgrade, backuping network | ||
etc/network/ | etc/network/ | ||
etc/network/connman/ | etc/network/connman/ | ||
- | etc/network/connman/lan.config.example | ||
- | etc/network/connman/main.conf | ||
etc/network/connman/settings | etc/network/connman/settings | ||
- | etc/network/connman/wlan.config.example | + | etc/network/connman/openvpn.config |
+ | etc/network/connman/lan.config | ||
+ | etc/network/connman/main.conf | ||
+ | etc/network/connman/vpn_ranintegrationocea_wanesy_fr_ran_com/ | ||
+ | etc/network/connman/vpn_ranintegrationocea_wanesy_fr_ran_com/settings | ||
+ | etc/network/connman/vpn_ranintegrationocea_wanesy_fr_ran_com/data | ||
etc/network/connman/wlan.config | etc/network/connman/wlan.config | ||
- | etc/network/connman/lan.config | ||
etc/network/connman/ethernet_7076ff017771_cable/ | etc/network/connman/ethernet_7076ff017771_cable/ | ||
etc/network/connman/ethernet_7076ff017771_cable/settings | etc/network/connman/ethernet_7076ff017771_cable/settings | ||
etc/network/connman/ethernet_7076ff017771_cable/data | etc/network/connman/ethernet_7076ff017771_cable/data | ||
- | etc/network/fixnetwork.conf | + | etc/network/interfaces |
etc/network/if-down.d/ | etc/network/if-down.d/ | ||
- | etc/network/if-post-down.d/ | + | etc/network/ofono/ |
- | etc/network/if-pre-up.d/ | + | etc/network/ofono/provisioning |
- | etc/network/if-pre-up.d/nfsroot | + | |
- | etc/network/if-up.d/ | + | |
- | etc/network/if-up.d/ntpdate-sync | + | |
etc/network/ifplugd/ | etc/network/ifplugd/ | ||
etc/network/ifplugd/local.action | etc/network/ifplugd/local.action | ||
etc/network/ifplugd/local.conf | etc/network/ifplugd/local.conf | ||
- | etc/network/interfaces | + | etc/network/networkmonitoring.conf |
etc/network/netctl.cfg | etc/network/netctl.cfg | ||
- | etc/network/networkmonitoring.conf | + | etc/network/if-up.d/ |
- | etc/network/ofono/ | + | etc/network/if-up.d/ntpdate-sync |
- | etc/network/ofono/provisioning | + | etc/network/if-pre-up.d/ |
+ | etc/network/if-pre-up.d/nfsroot | ||
etc/network/udhcpd.conf | etc/network/udhcpd.conf | ||
+ | etc/network/fixnetwork.conf | ||
+ | etc/network/if-post-down.d/ | ||
Backup finished | Backup finished | ||
- | Installing liveburner (4.0-beta1-72-g1461500) on root. | + | Backuping SPF configurations in safezone... |
- | Configuring liveburner. | + | File /user/spf2/etc/config.json found in system. Backup it in safezone |
- | 2018.07.23-15:05:11 -- Update from custom-liveburner_4.0-beta1-72-g1461500-dirty_klk-lpbs-unsigned.ipk: OK | + | Backup SPF finished |
- | 2018.07.23-15:05:11 -- Update Status : updated 1, failed 0 , partial 0 result : OK | + | Backuping CPF configurations in safezone... |
- | . | + | No CPF configuration found. Nothing done. |
- | . | + | Backuping BSCC configurations in safezone... |
- | . | + | File /user/bscc/var.xml found in system. Backup it in safezone |
- | Starting Burner | + | Backup BSCC finished |
- | + | Backuping assets loaded in Prove&Core SecureStorage... | |
- | -> Clean All EMMC including ProvenCore Data | + | 32768+0 records in |
- | 64+0 records in | + | 32768+0 records out |
- | 64+0 records out | + | Backup finished |
- | + | Backuping WMC configurations in safezone... | |
- | -> Create partitions | + | etc/hosts |
- | Checking that no-one is using this disk right now ... OK | + | etc/openvpn/client-openvpn.conf |
- | + | etc/firewall.d/iptables_openvpn.rules | |
- | Disk /dev/mmcblk0: 7.3 GiB, 7818182656 bytes, 15269888 sectors | + | Backup WMC configurations finished |
- | Units: sectors of 1 * 512 = 512 bytes | + | |
- | Sector size (logical/physical): 512 bytes / 512 bytes | + | |
- | I/O size (minimum/optimal): 512 bytes / 512 bytes | + | |
- | + | ||
- | >>> Created a new DOS disklabel with disk identifier 0xc68711b9. | + | |
- | /dev/mmcblk0p1: Created a new partition 1 of type 'Linux' and of size 512 MiB. | + | |
- | /dev/mmcblk0p2: Created a new partition 2 of type 'Linux' and of size 512 MiB. | + | |
- | Partition #2 contains a ext4 signature. | + | |
- | /dev/mmcblk0p3: Created a new partition 3 of type 'Linux' and of size 6.3 GiB. | + | |
- | Partition #3 contains a ext4 signature. | + | |
- | /dev/mmcblk0p4: Done. | + | |
- | + | ||
- | New situation: | + | |
- | Disklabel type: dos | + | |
- | Disk identifier: 0xc68711b9 | + | |
- | + | ||
- | Device Boot Start End Sectors Size Id Type | + | |
- | /dev/mmcblk0p1 2048 1050623 1048576 512M 83 Linux | + | |
- | /dev/mmcblk0p2 1050624 2099199 1048576 512M 83 Linux | + | |
- | [ 11.129860] mmcblk0: p1 p2 p3887 13170688 6.3G 83 Linux | + | |
- | + | ||
- | + | ||
- | The partition table has been altered. | + | |
- | Calling ioctl() to re-read partition table. | + | |
- | Syncing disks. | + | |
- | [ 11.155498] mmcblk0: p1 p2 p3 | + | |
- | Checking that no-one is using this disk right now ... OK | + | |
- | + | ||
- | Disk /dev/mmcblk0: 7.3 GiB, 7818182656 bytes, 15269888 sectors | + | |
- | Units: sectors of 1 * 512 = 512 bytes | + | |
- | Sector size (logical/physical): 512 bytes / 512 bytes | + | |
- | I/O size (minimum/optimal): 512 bytes / 512 bytes | + | |
- | Disklabel type: dos | + | |
- | Disk identifier: 0xc68711b9 | + | |
- | + | ||
- | Old situation: | + | |
- | + | ||
- | Device Boot Start End Sectors Size 11.197039] mmcblk0: p1 p2 p3 | + | |
- | 1mId Type | + | |
- | /dev/mmcblk0p1 2048 1050623 1048576 512M 83 Linux | + | |
- | /dev/mmcblk0p2 1050624 2099199 1048576 512M 83 Linux | + | |
- | /dev/mmcblk0p3 2099200 15269887 13170688 6.3G 83 Linux | + | |
- | /dev/mmcblk0p1: | + | == End of PREINST script == |
- | New situation: | + | |
- | Disklabel type: dos | + | |
- | Disk identifier: 0xc68711b9 | + | |
- | Device Boot Start End Sectors Size Id Type | ||
- | /dev/mmcblk0p1 131072 1048575 917504 448M 83 Linux | ||
- | /dev/mmcblk0p2 1050624 2099199 1048576 512M 83 Linux | ||
- | /dev/mmcblk0p3 2099200 15269887 13170688 6.3G 83 Linux | ||
- | The partition table has been altered. | + | == Start of PREAPPS script == |
- | Calling ioctl() to re-read partition table. | + | |
- | Syncing disks. | + | |
- | -> Formatting p1: Keros ... | ||
- | /dev/mmcblk0p1 contains a ext4 file system labelled 'Keros' | ||
- | last mounted on /keros on Mon Jul 23 15:04:58 2018 | ||
- | |||
- | -> Formatting p2: Update ... | ||
- | /dev/mmcblk0p2 contains a ext4 file system labelled 'Update' | ||
- | last mounted on /.update on Mon Jul 23 15:04:57 2018 | ||
- | |||
- | -> Formatting p3: User ... | ||
- | /dev/mmcblk0p3 contains a ext4 file system labelled 'User' | ||
- | last mounted on /user on Mon Jul 23 15:04:58 2018 | ||
- | [ 14.413387] random: crng init done | ||
- | [ 22.525725] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null) | ||
- | [ 22.613598] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null) | ||
- | umount: can't unmount none: No such file or directory | ||
- | -> Burning nominal firmware ... | ||
- | ---> Burning /burner/keros.ipk | ||
- | mount: mounting /dev/mmcblk0p1 on /keros failed: Device or resource busy | ||
- | [ 23.810167] EXT4-fs (mmcblk0p1): re-mounted. Opts: (null) | ||
- | -> Updating u-boot ... | ||
- | 94+0 records in | ||
- | 94+0 records out | ||
- | 455+1 records in | ||
- | 455+1 records out | ||
- | 4906+1 records in | ||
- | 4906+1 records out | ||
- | Installing keros (4.0-beta1-72-g1461500) on root. | ||
- | Configuring keros. | ||
- | ---> Save it as STOCK package | ||
- | [ 36.280173] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null) | ||
- | umount: can't unmount none: No such file or directory | ||
- | [ 36.525435] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null) | ||
- | OverlayFS available, mounting RootFS in RW | ||
- | preapps script present, execute it... | ||
- | Mounting safezone | ||
- | [ 37.117425] EXT4-fs (mmcblk0boot0): mounted filesystem without journal. Opts: (null) | ||
- | Safezone ready to use | ||
Restoring KerOS configurations from safezone... | Restoring KerOS configurations from safezone... | ||
etc/network/ | etc/network/ | ||
etc/network/connman/ | etc/network/connman/ | ||
- | etc/network/connman/lan.config.example | ||
- | etc/network/connman/main.conf | ||
etc/network/connman/settings | etc/network/connman/settings | ||
- | etc/network/connman/wlan.config.example | + | etc/network/connman/openvpn.config |
- | etc/network/connman/wlan.config | + | |
etc/network/connman/lan.config | etc/network/connman/lan.config | ||
+ | etc/network/connman/main.conf | ||
+ | etc/network/connman/vpn_ranintegrationocea_wanesy_fr_ran_com/ | ||
+ | etc/network/connman/vpn_ranintegrationocea_wanesy_fr_ran_com/settings | ||
+ | etc/network/connman/vpn_ranintegrationocea_wanesy_fr_ran_com/data | ||
+ | etc/network/connman/wlan.config | ||
etc/network/connman/ethernet_7076ff017771_cable/ | etc/network/connman/ethernet_7076ff017771_cable/ | ||
etc/network/connman/ethernet_7076ff017771_cable/settings | etc/network/connman/ethernet_7076ff017771_cable/settings | ||
etc/network/connman/ethernet_7076ff017771_cable/data | etc/network/connman/ethernet_7076ff017771_cable/data | ||
- | etc/network/fixnetwork.conf | + | etc/network/interfaces |
etc/network/if-down.d/ | etc/network/if-down.d/ | ||
- | etc/network/if-post-down.d/ | + | etc/network/ofono/ |
- | etc/network/if-pre-up.d/ | + | etc/network/ofono/provisioning |
- | etc/network/if-pre-up.d/nfsroot | + | |
- | etc/network/if-up.d/ | + | |
- | etc/network/if-up.d/ntpdate-sync | + | |
etc/network/ifplugd/ | etc/network/ifplugd/ | ||
etc/network/ifplugd/local.action | etc/network/ifplugd/local.action | ||
etc/network/ifplugd/local.conf | etc/network/ifplugd/local.conf | ||
- | etc/network/interfaces | ||
- | etc/network/netctl.cfg | ||
etc/network/networkmonitoring.conf | etc/network/networkmonitoring.conf | ||
- | etc/network/ofono/ | + | etc/network/netctl.cfg |
- | etc/network/ofono/provisioning | + | etc/network/if-up.d/ |
+ | etc/network/if-up.d/ntpdate-sync | ||
+ | etc/network/if-pre-up.d/ | ||
+ | etc/network/if-pre-up.d/nfsroot | ||
etc/network/udhcpd.conf | etc/network/udhcpd.conf | ||
+ | etc/network/fixnetwork.conf | ||
+ | etc/network/if-post-down.d/ | ||
Restoration finished | Restoration finished | ||
+ | Adjusting KerOS configurations... | ||
+ | Adjust configuration in /etc/network/connman/ethernet_7076ff017771_cable/settings | ||
+ | LAN and WLAN configuration files removed | ||
+ | Adjustements finished | ||
+ | Restoring CPF configurations from safezone... | ||
+ | No CPF configuration in safezone. Nothing done. | ||
+ | Restoring BSCC configurations from safezone... | ||
+ | Restoration finished | ||
+ | Restore Prove&Core SecureStorage... | ||
+ | 32768+0 records in | ||
+ | 32768+0 records out | ||
+ | Prove&Core SecureStorage restored | ||
+ | Restoring WMC configurations from safezone... | ||
+ | etc/hosts | ||
+ | etc/openvpn/client-openvpn.conf | ||
+ | etc/firewall.d/iptables_openvpn.rules | ||
+ | Adapting WMC configuration files... | ||
Done | Done | ||
- | -> Installing additional packages ... | + | Restoration finished |
- | -> Burning Stock Firmware ... | + | |
- | -> Set Redundant Boot (Secondary Image Table) | + | == End of PREAPPS script == |
- | 0+1 records in | + | |
- | 0+1 records out | + | |
- | -> flashing Secondary boot binaries | ||
- | 94+0 records in | ||
- | 94+0 records out | ||
- | 455+1 records in | ||
- | 455+1 records out | ||
- | 4906+1 records in | ||
- | 4906+1 records out | ||
- | -> flashing Stock Linux | + | == Start of POSTAPPS script == |
- | 16899+1 records in | + | |
- | 16899+1 records out | + | |
- | -> Creating backup ... | + | Adapting CPF default files for converted SPF configuration |
- | umount: can't unmount /rootfs/tmp: Device or resource busy | + | /etc/default/lorad file present, adapting it |
- | MAC0 = 70:76:ff:01:77:71 | + | /etc/default/lorafwd file present, adapting it |
- | MAC1 = 72:76:ff:01:77:71 | + | CPF default files updated |
- | Serial no = 0x2e060240 | + | Report status in update journal... |
- | 0x00000005 | + | Done |
- | Reboot is needed | + | |
+ | == End of POSTAPPS script == | ||
+ | |||
+ | |||
+ | == Start of PREREBOOT script == | ||
+ | |||
+ | Converting SPF to CPF Configuration files | ||
+ | File /tmp/safezeone/config.json found in safezone. Converting it. | ||
+ | SPF configuration converted | ||
+ | Report status in update journal... | ||
+ | Done | ||
+ | |||
+ | == End of PREREBOOT script == | ||
</code> | </code> | ||
++++ | ++++ | ||
+ | These traces are kept between custom liveburner but are lost in these situations: | ||
+ | * restore stock | ||
+ | * original liveburner | ||
+ | * liveburner without sample scripts | ||
+ | In addition, the update journal in ''/user/.update'' is reset when using a liveburner: | ||
+ | <code bash> | ||
+ | 2019.04.01-09:06:37 -- Update from keros.ipk: OK | ||
+ | 2019.04.01-09:06:55 -- Update from bscc_v3.1_klk_lpbs.ipk: OK | ||
+ | 2019.04.01-09:06:56 -- Update from lorad_1.0.0-1_klk_lpbs.ipk: OK | ||
+ | 2019.04.01-09:07:01 -- Update from lorafwd_1.0.1-1_armv7ahf-neon.ipk: OK | ||
+ | 2019.04.01-09:07:02 -- Update from lorasnmp_v3.1_klk_lpbs.ipk: OK | ||
+ | 2019.04.01-09:07:03 -- Update from netsnmphotfix_1.0.0_klk_lpbs.ipk: OK | ||
+ | 2019.04.01-09:07:15 -- Update Status : updated 6, failed 0 , partial 0 result : OK | ||
+ | </code> |