Page 18 of 55

Re: Rooting Toon (or boxx)

Posted: Tue Nov 14, 2017 9:20 pm
by marcelr
flamingbob wrote:Old ascii file transfer. That has been ages ago since that was last used! Good find.

Im quite interesed to see if its now removed or its still in there(getty) Still waiting for 4.9.23 on my rooted toon. The backup toon also didnt get it yet so cant check it. Using this way we could even get getty back that is a lot smaller and makes the waiting a bit less. Still strange logic. With local access there is always no way to lock users out.
Thanks, ASCII file transfer still works like a charm. Busybox 1.27.2, without getty, was introduced in fw 4.9.23. Earlier versions don't have it. You can do without it, just don't install it when updating manually.

Re: Rooting Toon (or boxx)

Posted: Wed Nov 15, 2017 12:01 am
by rubyan
So I got some steps futher. I downloaded dropbear from http://files.domoticaforum.eu/index.php?cam=/Toon
I used plink for transferring the base64 file. It belongs to the putty family,
so it can reuse a saved putty connection. My putty connection to Toon is on com10, and called toon. With
plink, sending a file using a saved connection can be done by:

Code: Select all

plink.exe toon < filename
After the ascii show, I checked the md5sum on both systems, they are equal.

md5sum: 0385737390810f2b1bca1b25977821fc dropbear_2015.71-r0_qb2.ipk

I then installed the package, but it gave some errors.

Code: Select all

/ # opkg install dropbear_2015.71-r0_qb2.ipk
 
Collected errors:
 * pkg_run_script: package "dropbear" postinst script returned status 255.
 * opkg_configure: dropbear.postinst returned 255.
So I reinstalled it verbose:

Code: Select all

/ # opkg install dropbear_2015.71-r0_qb2.ipk -V2
opkg_conf_parse_file: Loading conf file /etc/opkg/arch.conf.
opkg_conf_parse_file: Supported arch all priority (1)
opkg_conf_parse_file: Supported arch any priority (6)
opkg_conf_parse_file: Supported arch noarch priority (11)
opkg_conf_parse_file: Supported arch arm priority (16)
opkg_conf_parse_file: Supported arch quby2 priority (21)
opkg_conf_parse_file: Supported arch qb2 priority (26)
opkg_conf_parse_file: Loading conf file /etc/opkg/check.conf.
opkg_conf_parse_file: Loading conf file /etc/opkg/opkg.conf.
pkg_hash_load_feeds:
pkg_hash_load_status_files:
pkg_info_preinstall_check: Updating file owner list.
Installing dropbear (2015.71-r0) to root...
pkg_run_script: Running script /tmp/opkg-5DGVYb/dropbear-hRVnfI/preinst.
check_data_file_clashes: Replacing pre-existing file /etc/init.d/dropbear owned by package dropbear
check_data_file_clashes: Replacing pre-existing file /usr/sbin/dropbearkey owned by package dropbear
check_data_file_clashes: Replacing pre-existing file /usr/sbin/dropbearmulti owned by package dropbear
check_data_file_clashes: Replacing pre-existing file /usr/sbin/dropbearconvert owned by package dropbear
check_data_file_clashes: Replacing pre-existing file /usr/sbin/dropbear owned by package dropbear
check_data_file_clashes: Replacing pre-existing file /usr/bin/dbclient owned by package dropbear
opkg_install_pkg: Installing maintainer scripts.
opkg_install_pkg: Installing data files for dropbear.
install_data_files: Extracting data files to /.
pkg_write_filelist: Creating //usr/lib/opkg/info/dropbear.list file for pkg dropbear.
opkg_install_pkg: Resolving conf files for dropbear
opkg_configure_packages: Configuring unpacked packages.
opkg_configure_packages: Reordering packages before configuring them...
Configuring dropbear.
pkg_run_script: Running script //usr/lib/opkg/info/dropbear.postinst.
write_status_files_if_changed: Writing status file.
pkg_write_changed_filelists: Saving changed filelists.
Collected errors:
 * pkg_run_script: package "dropbear" postinst script returned status 255.
 * opkg_configure: dropbear.postinst returned 255.
After rebooting, I was unable to connect to Toon. I performed a full portscan:

Code: Select all

Host is up, received syn-ack (0.0025s latency).
Scanned at 2017-11-14 22:31:40 CET for 119s
Not shown: 65531 filtered ports
Reason: 65531 no-responses
PORT      STATE  SERVICE   REASON
22/tcp    closed ssh       conn-refused
80/tcp    open   http      syn-ack
7080/tcp  closed empowerid conn-refused
10080/tcp open   amanda    syn-ack
The relevant part of the firewall is present:

Code: Select all

-A HCB-INPUT -p tcp -m tcp --dport 22 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
I now only can browse to port 80 to find some zwave configuration page.

TL;DR Installed dropbear. Cannot SSH to device. Did the installation fail? How does dropbear start automatically?

Re: Rooting Toon (or boxx)

Posted: Thu Nov 16, 2017 5:43 pm
by lsiepel
glsf91 wrote:
marcelr wrote: If you have a cron daemon running, then yes. I would try and test for that first. Another option is to edit the base-qb2-ene package. That's the route I tend to take.
Is there somewhere an instruction how to carry out a manual update?
i have exact same question.

Re: Rooting Toon (or boxx)

Posted: Thu Nov 16, 2017 11:16 pm
by gielie
Oh crap, Somone in my home started the update of Toon. Now I have to open him up again and start all over. Hopefully the new tut will work for me.

Re: Rooting Toon (or boxx)

Posted: Fri Nov 17, 2017 4:26 pm
by lxz
marcelr wrote:
lxz wrote:Thanks for the quick (and creative) getty workaround. Am I correct if I say this is only necessary when initially rooting Toon?
That's correct.
lxz wrote: I have a rooted R10 Toon with SSH access already. Which steps do I have to take to update from 3.6.xx to to 4.9.23?
Can I use this method to update and gain access again after updating?
If you have a cron daemon running, then yes. I would try and test for that first. Another option is to edit the base-qb2-ene package. That's the route I tend to take.
Updating with the cron daemon running works perfectly. I have succesfully updated to 4.8.25 now. Seems that is the latest version Eneco is enrolling now

Re: Rooting Toon (or boxx)

Posted: Fri Nov 17, 2017 8:03 pm
by Toonz
4.9.23 will be available soon on your Toon but you can also wait for 4.10.x. 4.9 is not worth the trouble.

Re: Rooting Toon (or boxx)

Posted: Fri Nov 17, 2017 10:11 pm
by michel30
Hello,

I did my update before with edit this file base-qb2-ene package and that works.

The cronjob I never try, I also read somewhere on this forum that somebody creates an upgrade script but it has never post it here.

Re: Rooting Toon (or boxx)

Posted: Fri Nov 17, 2017 10:15 pm
by glsf91
michel30 wrote:Hello,

I did my update before with edit this file base-qb2-ene package and that works.

The cronjob I never try, I also read somewhere on this forum that somebody creates an upgrade script but it has never post it here.
Can you explain a little bit more what you did?

Re: Rooting Toon (or boxx)

Posted: Fri Nov 17, 2017 11:05 pm
by marcelr
I will write a short manual for that, this weekend.

Don't know about the upgrade script. Upgrading while retaining ssh access involves quite a few steps, not sure if that's easily automated.

Re: Rooting Toon (or boxx)

Posted: Fri Nov 17, 2017 11:09 pm
by marcelr
rubyan wrote: After rebooting, I was unable to connect to Toon. I performed a full portscan:

Code: Select all

Host is up, received syn-ack (0.0025s latency).
Scanned at 2017-11-14 22:31:40 CET for 119s
Not shown: 65531 filtered ports
Reason: 65531 no-responses
PORT      STATE  SERVICE   REASON
22/tcp    closed ssh       conn-refused
80/tcp    open   http      syn-ack
7080/tcp  closed empowerid conn-refused
10080/tcp open   amanda    syn-ack
The relevant part of the firewall is present:

Code: Select all

-A HCB-INPUT -p tcp -m tcp --dport 22 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
I now only can browse to port 80 to find some zwave configuration page.

TL;DR Installed dropbear. Cannot SSH to device. Did the installation fail? How does dropbear start automatically?
Was dropbear installed already on this system? Could be that the installer does not like to overwrite previously installed files, from the same version. Normally dropbear installs, and is active immediately afterwards. Startup at boot is set by the installer.

Re: Rooting Toon (or boxx)

Posted: Sat Nov 18, 2017 12:42 am
by gielie
Ok after some trial and error i find out what i had to do. I updated my rooted Toon from 4.8 to 4.9 and i could figure out what steps i had to take. I tried a lot without any luck. Bet then i had a bright moment (after some beers) and i only changed the ip table part, witch was disabled after the update, and voila i had access to my Toon again.

So if you have rooted your Toon before just change the ip table part and your back in business.
Thanks Marcelr for making this possible.

Re: Rooting Toon (or boxx)

Posted: Sat Nov 18, 2017 11:14 am
by marcelr
A short manual for upgrading while keeping ssh access is now available in the manuals/tutorials thread:

viewtopic.php?f=87&t=11235#p84033

Re: Rooting Toon (or boxx)

Posted: Sat Nov 18, 2017 5:37 pm
by glsf91
marcelr wrote:A short manual for upgrading while keeping ssh access is now available in the manuals/tutorials thread:

viewtopic.php?f=87&t=11235#p84033
Thanks for your work!

Re: Rooting Toon (or boxx)

Posted: Sat Nov 18, 2017 7:19 pm
by marcelr
De nada

Re: Rooting Toon (or boxx)

Posted: Mon Nov 20, 2017 12:33 pm
by densoft
HI all,

I have the same error as @rybyan when i try to install Dropbear with firmware 4.9.23.

opkg install dropbear_2015.71-r0_qb2.ipk

Collected errors:
* pkg_run_script: package "dropbear" postinst script returned status 255.
* opkg_configure: dropbear.postinst returned 255.

this is what i have done before (manual Marcelr):
1) connect my serial interface to toon ->Works
2) enter the password for U-Boot 2010.09-R8 ->Works
3) command "printenv" -> Works
4) command "setenv addmisc setenv bootargs \$\{bootargs\} mem=\$\{mem\} lpj=999424 init=/bin/sh" -> Works
5) command "run boot_nand" ->Works
6) not edit "/etc/inittab", because getty not works with firmware 4.9.23. (manual marcelr)
7) edit "/etc/passwd" remove disabled to line "root::0:0:root:/root:/bin/sh" ->Works
8) no reboot toon/go to Dropbear installation with firmware 4.9.23
9) download package dropbear_2015.71-r0_qb2.ipk ->Done
10) package to ASCII with command "base64 dropbear_2015.71-r0_qb2.ipk > dropbear_2015.71-r0_qb2.ipk.b64" ->Done
11) then command "cat > dropbear_2015.71-r0_qb2.ipk.b64". After 15 minutes to wait no response from MInicom, but i can select <Ctrl+A> S en transfer the file to Toon.
When i connect with MInicom back to Toon <Ctrl+D> , i see the transfer file "dropbear_2015.71-r0_qb2.ipk.b64 " in the directory of Toon.
12) after command "base64 -d dropbear_2015.71-r0_qb2.ipk.b64 > dropbear_2015.71-r0_qb2.ipk", i see the file "dropbear_2015.71-r0_qb2.ipk"in the directory of Toon.
13) Now i try install the file with "opkg install dropbear_2015.71-r0_qb2.ipk" ,but now i see the error :
Collected errors:
* pkg_run_script: package "dropbear" postinst script returned status 255.
* opkg_configure: dropbear.postinst returned 255.

What i did wrong?