Howto update to 01.01

JohnM
Posts: 9
Joined: Wed Apr 22, 2015 1:23 am

Re: Howto update to 00.86 - error step 4

Postby JohnM » Wed Apr 22, 2015 5:24 pm

I ran it again and got a different result. As previously mentioned prior to this no changes to DNS on my server or router (ISP blocks changes to DNS).

CloneNum3 wrote:I suggest copy/paste... first line makes a backup of your existing file, second one overwrites the active file.
[code]cp /etc/resolv.conf /database/resolv.conf.save
echo "nameserver 52.4.183.25" > /etc/resolv.conf



My results are as below, towards the end the same error appears 'Exiting, name server cannot be used: Temporary failure in name resolution (-3) 1 Jan 00:10:14 ntpdate[4052]: name server cannot be used: Temporary failure in name resolution (-3)..'


[root@flex-dvt ~]# touch /database/ENABLE_SSH
[root@flex-dvt ~]# cp /root/.ssh/authorized_keys /database/authorized_keys
cp: can't stat '/root/.ssh/authorized_keys': No such file or directory
[root@flex-dvt ~]# sed -i 's/reboot/#reboot/g' /root/platform/*.sh
[root@flex-dvt ~]# cp /var/www/set_dev_value.php /database/set_dev_value.php # S
ave for later
[root@flex-dvt ~]# /root/platform/upgrade.sh
+ echo 'Press enter to cancel update...'
Press enter to cancel update...
+ read -t2 stdin
+ '[' 1 = 0 ']'
+ set_rgb 100 100 0 0 0 0 flash 250000
+ source /root/platform/platform.sh
++ set -x
+++ mount
+++ grep database
++ dbcheck='ubi1:database on /database type ubifs (rw,relatime)'
++ '[' '' == 'ubi1:database on /database type ubifs (rw,relatime)' ']'
+++ grep badapp
+++ cat /proc/cmdline
++ kernel_cmd_line=
++ '[' '' '!=' '' ']'
+++ grep badupdater
+++ cat /proc/cmdline
++ kernel_cmd_line=
++ '[' '' '!=' '' ']'
++ source /root/platform/platform.config
+++ SCRIPT_VERSION=UPDATE
+++ sw_pkg_url=https://hub-updates.winkapp.com
+++ alt_pkg_url=https://wink-hub-images.s3.amazonaws.com
++++ cat /database/cf_url
cat: can't open '/database/cf_url': No such file or directory
+++ eval tmp=
++++ tmp=
+++ '[' '' '!=' '' ']'
++++ cat /database/cf_build
+++ eval build=00.01
++++ build=00.01
+++ '[' 00.01 '!=' '' ']'
+++ board_id=00.01
+++ sw_pkg_url=https://hub-updates.winkapp.com/00.01
+++ alt_pkg_url=https://wink-hub-images.s3.amazonaws.com/00.01
+++ group_id=0
+++ fparts=4
+++ ntpserver1=0.rhel.pool.ntp.org
+++ ntpserver2=1.rhel.pool.ntp.org
+++ '[' UPDATE '!=' APP ']'
+++ canupdate[0]=1
+++ canupdate[1]=1
+++ upgrade_boot=1
+++ app_boot=0
+++ num_bootloaders=2
+++ eth_dev=wlan0
+++ eth_timeout=60
+++ ntpd_retry=3
+++ curl_args='--cacert /etc/ssl/certs/ca-certificates.crt --retry 5'
+ forced_update=0
+ (( idx=0 ))
+ (( idx<fparts ))
+ flash_get 'fver[0]' cf_fver0
++ cat /database/cf_fver0
cat: can't open '/database/cf_fver0': No such file or directory
+ eval 'fver[0]='
++ fver[0]=
+ '[' 0 '!=' 0 ']'
+ [[ '' != [0-9][0-9].[0-9][0-9] ]]
+ echo 'No valid version for part 0, set to 00.00'
No valid version for part 0, set to 00.00
+ fver[$idx]=00.00
+ '[' 00.00 = 00.00 ']'
+ forced_update=1
+ (( idx++ ))
+ (( idx<fparts ))
+ flash_get 'fver[1]' cf_fver1
++ cat /database/cf_fver1
cat: can't open '/database/cf_fver1': No such file or directory
+ eval 'fver[1]='
++ fver[1]=
+ '[' 0 '!=' 0 ']'
+ [[ '' != [0-9][0-9].[0-9][0-9] ]]
+ echo 'No valid version for part 1, set to 00.00'
No valid version for part 1, set to 00.00
+ fver[$idx]=00.00
+ '[' 00.00 = 00.00 ']'
+ forced_update=1
+ (( idx++ ))
+ (( idx<fparts ))
+ flash_get 'fver[2]' cf_fver2
++ cat /database/cf_fver2
cat: can't open '/database/cf_fver2': No such file or directory
+ eval 'fver[2]='
++ fver[2]=
+ '[' 0 '!=' 0 ']'
+ [[ '' != [0-9][0-9].[0-9][0-9] ]]
+ echo 'No valid version for part 2, set to 00.00'
No valid version for part 2, set to 00.00
+ fver[$idx]=00.00
+ '[' 00.00 = 00.00 ']'
+ forced_update=1
+ (( idx++ ))
+ (( idx<fparts ))
+ flash_get 'fver[3]' cf_fver3
++ cat /database/cf_fver3
cat: can't open '/database/cf_fver3': No such file or directory
+ eval 'fver[3]='
++ fver[3]=
+ '[' 0 '!=' 0 ']'
+ [[ '' != [0-9][0-9].[0-9][0-9] ]]
+ echo 'No valid version for part 3, set to 00.00'
No valid version for part 3, set to 00.00
+ fver[$idx]=00.00
+ '[' 00.00 = 00.00 ']'
+ forced_update=1
+ (( idx++ ))
+ (( idx<fparts ))
+ cd /tmp
+ '[' '!' -d temp ']'
+ mkdir /tmp/temp
+ rm -rf /tmp/temp/upgrade_00.01.txt
+ wait_on_network
++ grep wlan0
++ ifconfig
+ tmp='wlan0 Link encap:Ethernet HWaddr B4:79:A7:04:BE:5B '
+ '[' '' == 'wlan0 Link encap:Ethernet HWaddr B4:79:A7:04:BE:5B ' ']'
+ (( idx=0 ))
+ (( idx<60 ))
+ sleep 1
++ ifconfig wlan0
++ grep 'inet addr'
+ tmp=' inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0'
+ '[' '' '!=' ' inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0' ']'
+ return 0
+ '[' 0 '!=' 0 ']'
+ set_date
+ (( idx=0 ))
+ (( idx<3 ))
++ date
++ grep 1970
+ datecheck='Thu Jan 1 00:10:14 UTC 1970'
+ '[' '' '!=' 'Thu Jan 1 00:10:14 UTC 1970' ']'
+ ntpdate 0.rhel.pool.ntp.org 1.rhel.pool.ntp.org
Exiting, name server cannot be used: Temporary failure in name resolution (-3) 1 Jan 00:10:14 ntpdate[4052]: name server cannot be used: Temporary failure in name resolution (-3)
+ '[' 0 = 1 ']'
+ (( idx++ ))
+ (( idx<3 ))
++ date
++ grep 1970
+ datecheck='Thu Jan 1 00:10:14 UTC 1970'
+ '[' '' '!=' 'Thu Jan 1 00:10:14 UTC 1970' ']'
+ ntpdate 0.rhel.pool.ntp.org 1.rhel.pool.ntp.org
Exiting, name server cannot be used: Temporary failure in name resolution (-3) 1 Jan 00:10:14 ntpdate[4059]: name server cannot be used: Temporary failure in name resolution (-3)
+ '[' 0 = 1 ']'
+ (( idx++ ))
+ (( idx<3 ))
++ date
++ grep 1970
+ datecheck='Thu Jan 1 00:10:14 UTC 1970'
+ '[' '' '!=' 'Thu Jan 1 00:10:14 UTC 1970' ']'
+ ntpdate 0.rhel.pool.ntp.org 1.rhel.pool.ntp.org
Exiting, name server cannot be used: Temporary failure in name resolution (-3) 1 Jan 00:10:14 ntpdate[4065]: name server cannot be used: Temporary failure in name resolution (-3)
+ '[' 0 = 1 ']'
+ (( idx++ ))
+ (( idx<3 ))
+ return 1
+ '[' 0 '!=' 1 ']'
+ echo 'unable to set date.'
unable to set date.
+ set_boot_application
+ flash_set DO_UPDATE 0
+ echo 0
+ end 1
+ echo END
END
+ '[' 1 = 1 ']'
+ set_rgb 200 0 0
+ '[' UPDATE '!=' APP ']'
+ sleep 5
+ exit 0
[root@flex-dvt ~]#


Should I continue past step #4?

JohnM
Posts: 9
Joined: Wed Apr 22, 2015 1:23 am

Re: Howto update to 00.86 - error step 4

Postby JohnM » Wed Apr 22, 2015 5:52 pm

fyi CloneNum3 - I'm not sure if the date issue where my update fails has to do with my being based in Europe and system date configured in wrong format?

CloneNum3
Site Admin
Posts: 107
Joined: Wed Jan 07, 2015 10:02 am

Re: Howto update to 00.86 - error step 4

Postby CloneNum3 » Wed Apr 22, 2015 6:57 pm

JohnM wrote:fyi CloneNum3 - I'm not sure if the date issue where my update fails has to do with my being based in Europe and system date configured in wrong format?


I would say try updating your time with ntpdate... the timezone should be irrelevant, as long as the UTC time is correct.

Code: Select all

[root@flex-dvt ~]# ntpdate ntp.org
22 Apr 22:55:53 ntpdate[2118]: adjust time server 128.4.24.98 offset -0.007189 sec
[root@flex-dvt ~]#

CloneNum3
Site Admin
Posts: 107
Joined: Wed Jan 07, 2015 10:02 am

Re: Howto update to 00.86 - error step 4

Postby CloneNum3 » Wed Apr 22, 2015 6:58 pm

JohnM wrote:fyi CloneNum3 - I'm not sure if the date issue where my update fails has to do with my being based in Europe and system date configured in wrong format?


I would say try updating your time with ntpdate... the timezone should be irrelevant, as long as the UTC time is correct.

Code: Select all

[root@flex-dvt ~]# ntpdate ntp.org
22 Apr 22:55:53 ntpdate[2118]: adjust time server 128.4.24.98 offset -0.007189 sec
[root@flex-dvt ~]#

CloneNum3
Site Admin
Posts: 107
Joined: Wed Jan 07, 2015 10:02 am

Re: Howto update to 00.86 - error step 4

Postby CloneNum3 » Wed Apr 22, 2015 7:09 pm

JohnM wrote:I ran it again and got a different result. As previously mentioned prior to this no changes to DNS on my server or router (ISP blocks changes to DNS).

+ ntpdate 0.rhel.pool.ntp.org 1.rhel.pool.ntp.org
Exiting, name server cannot be used: Temporary failure in name resolution (-3) 1 Jan 00:10:14 ntpdate[4065]: name server cannot be used: Temporary failure in name resolution (-3)



You can add the ntp.org entries to your /etc/hosts file...

Code: Select all

72.14.183.239 0.rhel.pool.ntp.org
24.124.0.251 0.rhel.pool.ntp.org
204.235.61.9 0.rhel.pool.ntp.org
208.88.126.226 0.rhel.pool.ntp.org
204.2.134.163 1.rhel.pool.ntp.org
206.51.211.152 1.rhel.pool.ntp.org
38.229.71.1 1.rhel.pool.ntp.org
108.61.73.243 1.rhel.pool.ntp.org
15.126.135.247 2.rhel.pool.ntp.org
155.101.3.114 2.rhel.pool.ntp.org
198.60.22.240 2.rhel.pool.ntp.org
72.20.40.62 2.rhel.pool.ntp.org
69.164.192.17 3.rhel.pool.ntp.org
198.199.100.108 3.rhel.pool.ntp.org
142.54.181.202 3.rhel.pool.ntp.org
15.125.94.239 3.rhel.pool.ntp.org


so...

Code: Select all

echo "72.14.183.239 0.rhel.pool.ntp.org" >> /etc/hosts
echo "204.2.134.163 1.rhel.pool.ntp.org" >> /etc/hosts


and try again.

CloneNum3
Site Admin
Posts: 107
Joined: Wed Jan 07, 2015 10:02 am

Re: Howto update to 00.86 - error step 4

Postby CloneNum3 » Wed Apr 22, 2015 7:22 pm

JohnM wrote:
CloneNum3 wrote:I also tried editing the resolv.conf file directly adding the second nameserver as
nameserver 52.4.183.25
nameserver 52.0.103.131

But same error occurs. Any further help appreciated. Thanks


You can add the following to your /etc/hosts and it shouldn't even need to attempt dns lookups.

Code: Select all

54.231.1.249 wink-hub-images.s3.amazonaws.com
54.231.18.41 s3-1-w.amazonaws.com
54.231.2.113 wink-hub-images.s3.amazonaws.com
54.231.9.97 s3-1-w.amazonaws.com
72.14.183.239 0.rhel.pool.ntp.org
24.124.0.251 0.rhel.pool.ntp.org
204.235.61.9 0.rhel.pool.ntp.org
208.88.126.226 0.rhel.pool.ntp.org
204.2.134.163 1.rhel.pool.ntp.org
206.51.211.152 1.rhel.pool.ntp.org
38.229.71.1 1.rhel.pool.ntp.org
108.61.73.243 1.rhel.pool.ntp.org

JohnM
Posts: 9
Joined: Wed Apr 22, 2015 1:23 am

Re: Howto update to 00.86 - error step 4

Postby JohnM » Thu Apr 23, 2015 3:42 am

Hi
I tried
CloneNum3 wrote:

Code: Select all

[root@flex-dvt ~]# ntpdate ntp.org
22 Apr 22:55:53 ntpdate[2118]: adjust time server 128.4.24.98 offset -0.007189 sec
[root@flex-dvt ~]#


and result was:-
# ntpdate ntp.org 22 Apr 22:55:53 ntpdate[2118]: adjust time server 128.4.24.98 offset -0.007189 sec
Exiting, name server cannot be used: Temporary failure in name resolution (-3) 1 Jan 00:19:35 ntpdate[6020]: name server cannot be used: Temporary failure in name resolution (-3)


And I added
CloneNum3 wrote:echo "72.14.183.239 0.rhel.pool.ntp.org" >> /etc/hosts
echo "204.2.134.163 1.rhel.pool.ntp.org" >> /etc/hosts


But when I ran step 4 again, permission to run update is denied.
[root@flex-dvt ~]# /root/platform/upgrade.sh
-sh: /root/platform/upgrade.sh: Permission denied

Thanks.

CloneNum3
Site Admin
Posts: 107
Joined: Wed Jan 07, 2015 10:02 am

Re: Howto update to 00.86 - error step 4

Postby CloneNum3 » Thu Apr 23, 2015 8:07 am

JohnM wrote:But when I ran step 4 again, permission to run update is denied.
[root@flex-dvt ~]# /root/platform/upgrade.sh
-sh: /root/platform/upgrade.sh: Permission denied

Thanks.


I don't know how that could happen... it sounds as though the permissions on upgrade.sh were changed.

You can try...

Code: Select all

chmod +x /root/platform/*


and try again.

JohnM
Posts: 9
Joined: Wed Apr 22, 2015 1:23 am

Re: Howto update to 00.86 - error step 4

Postby JohnM » Thu Apr 23, 2015 10:18 am

Hi,
Thanks the solution below unlocked the permission
CloneNum3 wrote:chmod +x /root/platform/*


however, when I ran step 4 again, nothing appeared after running '[root@flex-dvt ~]# /root/platform/upgrade.sh', so I continued on steps 5-6. Checked the updater-rootfs was attached to mtd2, and the following was produced
[root@flex-dvt ~]# UBI: attaching mtd2 to ubi0
-sh: UBI:: not found
[root@flex-dvt ~]# UBI: attached mtd2 to ubi0


Stopped there as not sure if any update is really occurring after no output produced after /root/platform/upgrade.sh. Thanks.

CloneNum3
Site Admin
Posts: 107
Joined: Wed Jan 07, 2015 10:02 am

Re: Howto update to 00.86 - error step 4

Postby CloneNum3 » Thu Apr 23, 2015 10:25 am

JohnM wrote:Hi,
Thanks the solution below unlocked the permission
CloneNum3 wrote:chmod +x /root/platform/*


however, when I ran step 4 again, nothing appeared after running '[root@flex-dvt ~]# /root/platform/upgrade.sh', so I continued on steps 5-6. Checked the updater-rootfs was attached to mtd2, and the following was produced
[root@flex-dvt ~]# UBI: attaching mtd2 to ubi0
-sh: UBI:: not found
[root@flex-dvt ~]# UBI: attached mtd2 to ubi0


Stopped there as not sure if any update is really occurring after no output produced after /root/platform/upgrade.sh. Thanks.


The lines starting with:

Code: Select all

[root@flex-dvt ~]# <some text here>

Are command that you type...

lines such as:

Code: Select all

UBI: attached mtd2 to ubi0

Are output... you do not need to type these as these are not commands.

Example:

Code: Select all

[root@flex-dvt ~]# pwd
/root
[root@flex-dvt ~]# ls
bt        config    platform  wifi
[root@flex-dvt ~]#

The commands I used are "pwd" and "ls"
"/root" and "bt config platform wifi" were output from those commands, I did not type these.


Return to “Upgrade to current firmware maintaining root”

Who is online

Users browsing this forum: No registered users and 1 guest