Re: update fails with a message along the lines of “Critical error. Update date failed. Call support”. These comments refer to a Vera 3 and firmware 1.7.902:
The firmware updater does an initial check for space and may indicate there is not enough space or Datamine needs to be backed up and removed. If it finds it has enough space it will allow the update to proceed. After the user starts the update, the updater makes a back up file that is stored in /etc/cmh-backup/backup.tgz for its own purposes. It’s deleted at some point after the flash occurs. Refer to the updater script /usr/bin/cmh-upgrade.sh where backup-store.sh is executed on line 263. If you regularly refresh the directory /etc/cmh-backup/backup.tgz you will see the backup pop up during a firmware upgrade.
The backup file created can take up a lot of space, especially if the user has large plugins installed such as AltUI or PLEG. So for example AltUI will take up a total of 1,728 KB (actual measured value) - that’s the original files plus the files in the tarred zipped backup. So deleting all the AltUI files in /etc/cmh-ludl/ makes “twice” the difference. Note that on rebooting, the firmware will download any missing plugin files that where originally downloaded from the store (ie not those manually installed - they need to be backed up by you). Do deletions at your own risk.
The “Critical error. Update date failed. Call support” occurs because the available space is rechecked again after the back up is created. Refer to the updater script /usr/bin/cmh-upgrade.sh line 512. Looks like MCV thinks it’s a garbage collection problem when it’s actually huge backups causing problems.
It would be useful to check the backup size before the user initiates the firmware update by creating it earlier.
Another problem occurs in that the upgrade log file is destroyed immediately after the upgrade fails - see /tmp/log.upgrade, because the logs are rotated. Refer to /usr/bin/cmh-upgrade.sh line 695. So trying to work out what went wrong is not easy.
Here is a list of all the files (and folders) found in my backup file:
[code]…\Backup contents\etc\cmh
…\Backup contents\etc\cmh-ludl
…\Backup contents\etc\cmh-ra
…\Backup contents\etc\config
…\Backup contents\etc\crontabs
…\Backup contents\etc\dropbear
…\Backup contents\etc\ethers
…\Backup contents\etc\filelist.txt
…\Backup contents\etc\lighttpd.users
…\Backup contents\etc\mios_backup.info
…\Backup contents\etc\openwrt_release
…\Backup contents\etc\passwd
…\Backup contents\etc\TZ
…\Backup contents\etc\TZ-full
…\Backup contents\etc\cmh\alerts.json
…\Backup contents\etc\cmh\cmh.conf
…\Backup contents\etc\cmh\datetime
…\Backup contents\etc\cmh\devices
…\Backup contents\etc\cmh\dongle.3.20.dump.0
…\Backup contents\etc\cmh\dongle.3.20.dump.1
…\Backup contents\etc\cmh\dongle.dump
…\Backup contents\etc\cmh\ergy_key
…\Backup contents\etc\cmh\first_boot
…\Backup contents\etc\cmh\HW_Key
…\Backup contents\etc\cmh\HW_Key2
…\Backup contents\etc\cmh\keys
…\Backup contents\etc\cmh\last_report
…\Backup contents\etc\cmh\lighttpd_failures
…\Backup contents\etc\cmh\lock_log_levels
…\Backup contents\etc\cmh\PK_AccessPoint
…\Backup contents\etc\cmh\servers.conf.default
…\Backup contents\etc\cmh\srv_timestamp
…\Backup contents\etc\cmh\sync_kit
…\Backup contents\etc\cmh\sync_rediscover
…\Backup contents\etc\cmh\user_data.json.luup.lzo
…\Backup contents\etc\cmh\user_data.json.lzo
…\Backup contents\etc\cmh\user_data.json.lzo.1
…\Backup contents\etc\cmh\user_data.json.lzo.2
…\Backup contents\etc\cmh\user_data.json.lzo.3
…\Backup contents\etc\cmh\user_data.json.lzo.4
…\Backup contents\etc\cmh\user_data.json.lzo.5
…\Backup contents\etc\cmh\vera_model
…\Backup contents\etc\cmh\wan_failover
…\Backup contents\etc\cmh\zwave_locale
…\Backup contents\etc\cmh\wan_failover\check_internet.hosts
– all the files in \etc\cmh-ludl, which are the plugin files listed in the UI under “App—>Develop apps–>Lupp files”,
– are include in the back up. AltUI plugin is very large and PLEG is pretty big as well. They may cause problems.
…\Backup contents\etc\cmh-ra\cmh-ra.conf
…\Backup contents\etc\cmh-ra\keys
…\Backup contents\etc\cmh-ra\keys\cmh-ra-key.priv
…\Backup contents\etc\cmh-ra\keys\cmh-ra-key.pub
…\Backup contents\etc\config\ddns
…\Backup contents\etc\config\dhcp
…\Backup contents\etc\config\dropbear
…\Backup contents\etc\config\firewall
…\Backup contents\etc\config\luci
…\Backup contents\etc\config\luci_devinfo
…\Backup contents\etc\config\multiwan
…\Backup contents\etc\config\network
…\Backup contents\etc\config\ntpclient
…\Backup contents\etc\config\system
…\Backup contents\etc\config\timeserver
…\Backup contents\etc\config\ucitrack
…\Backup contents\etc\config\wireless
…\Backup contents\etc\config\wol
…\Backup contents\etc\crontabs\root
…\Backup contents\etc\dropbear\dropbear_dss_host_key
…\Backup contents\etc\dropbear\dropbear_rsa_host_key
[/code]
Here’s the upgrade log that almost succeeded. Note that the log reckons there is 8 KB to play with. It wasn’t enough:
[code]…
initial log stuff
…
2017-03-08_12:38:23 -[4498]- ==fu== BEGIN MiOS UPGRADE ==fu==
2017-03-08_12:38:23 -[4498]- ==fu== Check if /tmp/newmios.squashfs exists ==fu==
2017-03-08_12:38:23 -[4498]- ==fu== found ==fu==
2017-03-08_12:38:23 -[4498]- ==fu== Check /tmp/newmios.squashfs md5sum ==fu==
2017-03-08_12:38:24 -[4498]- ==fu== md5sum ok ==fu==
2017-03-08_12:38:24 -[4498]- ==fu== Renaming old files created by mios_mount script from: /etc/cmh-firmware/1.7.902/ ==fu==
2017-03-08_12:38:24 -[4498]- ==fu== Remove old squashfs: /etc/cmh-firmware/mios.squashfs ==fu==
2017-03-08_12:38:28 -[4498]- ==fu== Check free space for copy: /tmp/newmios.squashfs to: /etc/cmh-firmware/mios.squashfs ==fu==
…Note: we have 8 KB free!!!
2017-03-08_12:38:28 -[4498]- ==fu== We have 6120 KB jffs free space and required is 6112 KB ==fu==
2017-03-08_12:38:28 -[4498]- ==fu== Copy MiOS Squashfs into jffs2 partition ==fu==
cp: write error: No space left on device
cp: can’t preserve times of ‘/etc/cmh-firmware/mios.squashfs’: No space left on device
cp: can’t preserve ownership of ‘/etc/cmh-firmware/mios.squashfs’: No space left on device
cp: can’t preserve permissions of ‘/etc/cmh-firmware/mios.squashfs’: No space left on device
2017-03-08_12:38:42 -[4498]- e[1;31mERROR: Failed to copy MiOS Squashfs into jffs2 partition. Try 0 / 3. Wait 30 sece[1;00m
cp: write error: No space left on device
cp: can’t preserve times of ‘/etc/cmh-firmware/mios.squashfs’: No space left on device
cp: can’t preserve ownership of ‘/etc/cmh-firmware/mios.squashfs’: No space left on device
cp: can’t preserve permissions of ‘/etc/cmh-firmware/mios.squashfs’: No space left on device
2017-03-08_12:39:28 -[4498]- e[1;31mERROR: Failed to copy MiOS Squashfs into jffs2 partition. Try 1 / 3. Wait 30 sece[1;00m
cp: write error: No space left on device
cp: can’t preserve times of ‘/etc/cmh-firmware/mios.squashfs’: No space left on device
cp: can’t preserve ownership of ‘/etc/cmh-firmware/mios.squashfs’: No space left on device
cp: can’t preserve permissions of ‘/etc/cmh-firmware/mios.squashfs’: No space left on device
2017-03-08_12:40:13 -[4498]- e[1;31mERROR: Failed to copy MiOS Squashfs into jffs2 partition. Try 2 / 3. Wait 30 sece[1;00m
cp: write error: No space left on device
cp: can’t preserve times of ‘/etc/cmh-firmware/mios.squashfs’: No space left on device
cp: can’t preserve ownership of ‘/etc/cmh-firmware/mios.squashfs’: No space left on device
cp: can’t preserve permissions of ‘/etc/cmh-firmware/mios.squashfs’: No space left on device
2017-03-08_12:40:58 -[4498]- e[1;31mERROR: Failed to copy MiOS Squashfs into jffs2 partition. Try 3 / 3. Wait 30 sece[1;00m
[/code]