Rooting Toon (or boxx)

Everything about rooting Toons 1 and 2.

Moderators: marcelr, TheHogNL, Toonz

marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Rooting Toon (or boxx)

Post 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.
rubyan
Starting Member
Starting Member
Posts: 10
Joined: Sat Nov 11, 2017 12:09 am

Re: Rooting Toon (or boxx)

Post 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?
lsiepel
Starting Member
Starting Member
Posts: 14
Joined: Tue Oct 31, 2017 8:49 pm

Re: Rooting Toon (or boxx)

Post 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.
gielie
Member
Member
Posts: 70
Joined: Thu Nov 02, 2017 11:06 am

Re: Rooting Toon (or boxx)

Post 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.
lxz
Starting Member
Starting Member
Posts: 16
Joined: Mon Nov 13, 2017 12:45 pm

Re: Rooting Toon (or boxx)

Post 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
Toonz
Forum Moderator
Forum Moderator
Posts: 1873
Joined: Mon Dec 19, 2016 1:58 pm

Re: Rooting Toon (or boxx)

Post 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.
member of the Toon Software Collective
michel30
Member
Member
Posts: 286
Joined: Fri Aug 25, 2017 4:42 pm

Re: Rooting Toon (or boxx)

Post 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.
glsf91
Member
Member
Posts: 184
Joined: Fri Sep 15, 2017 9:25 pm

Re: Rooting Toon (or boxx)

Post 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?
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Rooting Toon (or boxx)

Post 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.
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Rooting Toon (or boxx)

Post 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.
gielie
Member
Member
Posts: 70
Joined: Thu Nov 02, 2017 11:06 am

Re: Rooting Toon (or boxx)

Post 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.
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Rooting Toon (or boxx)

Post 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
glsf91
Member
Member
Posts: 184
Joined: Fri Sep 15, 2017 9:25 pm

Re: Rooting Toon (or boxx)

Post 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!
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Rooting Toon (or boxx)

Post by marcelr »

De nada
densoft
Starting Member
Starting Member
Posts: 6
Joined: Mon Nov 20, 2017 11:46 am

Re: Rooting Toon (or boxx)

Post 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?
Post Reply

Return to “Toon Rooting”