Rooting Toon (or boxx)

Everything about rooting Toons 1 and 2.

Moderators: marcelr, TheHogNL, Toonz

Rudolf
Member
Member
Posts: 136
Joined: Mon Dec 04, 2017 8:50 pm

Re: Rooting Toon (or boxx)

Post by Rudolf »

passwd is also missing from the busybox-binary, here's the output from --help

Code: Select all

/ # busybox --help
BusyBox v1.27.2 (2017-10-03 14:20:01 CEST) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2015.
Licensed under GPLv2. See source distribution for detailed
copyright notices.

Usage: busybox [function [arguments]...]
   or: busybox --list
   or: function [arguments]...

        BusyBox is a multi-call binary that combines many common Unix
        utilities into a single executable.  Most people will create a
        link to busybox for each function they wish to use and BusyBox
        will act like whatever it was invoked as.

Currently defined functions:
        [, [[, acpid, ar, ash, awk, base64, basename, beep, blkid, blockdev,
        bootchartd, bunzip2, bzcat, cat, chattr, chgrp, chmod, chown, chroot,
        chvt, clear, cmp, conspy, cp, cpio, cut, date, dc, dd, deallocvt, df,
        dhcprelay, diff, dirname, dmesg, dnsdomainname, du, dumpkmap, echo,
        egrep, env, expr, factor, fallocate, false, fatattr, fbset, fbsplash,
        fdisk, fgconsole, fgrep, find, flock, free, freeramdisk, fsck,
        fsfreeze, fstrim, fsync, ftpd, fuser, getopt, grep, groups, gunzip,
        gzip, halt, head, hexdump, hostname, hwclock, i2cdetect, i2cdump,
        i2cget, i2cset, id, ifconfig, ifdown, ifplugd, ifup, init, ionice,
        iostat, ip, ipneigh, kill, killall, klogd, less, link, linux32,
        linux64, linuxrc, ln, loadfont, loadkmap, logger, logname, logread,
        losetup, ls, lsof, lspci, lsscsi, lsusb, lzcat, lzma, lzop, makedevs,
        md5sum, mdev, mkdir, mkdosfs, mke2fs, mkfifo, mkfs.ext2, mkfs.vfat,
        mknod, mkpasswd, mktemp, modinfo, more, mount, mpstat, mv, nbd-client,
        netstat, nice, nl, nohup, nproc, nslookup, ntpd, od, openvt, partprobe,
        paste, pidof, ping, ping6, pivot_root, pmap, poweroff, powertop,
        printf, ps, pstree, pwd, pwdx, rdate, rdev, readlink, readprofile,
        realpath, reboot, renice, reset, rev, rm, rmdir, route, run-parts,
        scriptreplay, sed, seq, setconsole, setfont, setpriv, setserial, sh,
        sha256sum, sha3sum, sha512sum, showkey, shred, shuf, sleep, smemcap,
        sort, ssl_client, start-stop-daemon, strings, stty, svc, swapoff,
        swapon, switch_root, sync, sysctl, syslogd, tail, tar, tee, test, time,
        timeout, top, touch, tr, traceroute, traceroute6, true, truncate, tty,
        tunctl, ubiattach, ubidetach, ubimkvol, ubirename, ubirmvol, ubirsvol,
        ubiupdatevol, udhcpc, uevent, umount, uname, uniq, unlink, unshare,
        unxz, unzip, uptime, usleep, vi, volname, watch, wc, which, whoami,
        whois, xargs, xxd, xz, xzcat, yes, zcat

I agree that replacing the current BusyBox is a dangerous operation.
Wouldn't it be possible to copy the previous executable and recreate the symlinks only for getty and password and continue from there; so you can install dropbear from the non-limited shell as before?

Hmmm, running the post-install script manually returns no errors:
(first part is opkg -V4 install)

Code: Select all

opkg_recurse_pkgs_in_order: pkg hcb-watchdog already visited, skipping.
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.
hash_table: pkg-hash, 12288 bytes
        n_buckets=1024, n_elements=206, n_collisions=23
        max_bucket_len=2, n_used_buckets=183, ave_bucket_len=1.13
        n_hits=365, n_misses=206
hash_table: file-hash, 12288 bytes
        n_buckets=1024, n_elements=5824, n_collisions=4801
        max_bucket_len=15, n_used_buckets=1023, ave_bucket_len=5.69
        n_hits=20, n_misses=5833
hash_table: obs-file-hash, 768 bytes
        n_buckets=64, n_elements=0, n_collisions=0
        max_bucket_len=0, n_used_buckets=0, ave_bucket_len=0.00
        n_hits=0, n_misses=16
Collected errors:
 * pkg_run_script: package "dropbear" postinst script returned status 255.
 * opkg_configure: dropbear.postinst returned 255.
/ # ./usr/lib/opkg/info/dropbear.post
dropbear.postinst  dropbear.postrm
/ # ./usr/lib/opkg/info/dropbear.postinst
update-alternatives: Linking //usr/bin/scp to /usr/sbin/dropbearmulti
update-alternatives: Linking //usr/bin/ssh to /usr/sbin/dropbearmulti
 Adding system startup for /etc/init.d/dropbear.
After this my system contains /etc/rc5.d/S10dropbear
It still won't run in this shell, because /proc/mounts and /dev/urandom are missing.

Let's reboot:

Code: Select all

INIT: Entering runlevel: 5
Starting Dropbear SSH server: Generating key, this may take a while...
Looks promising...
Rudolf
Member
Member
Posts: 136
Joined: Mon Dec 04, 2017 8:50 pm

Re: Rooting Toon (or boxx)

Post by Rudolf »

Here's what I did:

I installed dropbear as per the instructions (but extra verbose); this fails with an error.

Code: Select all

opkg -V4 install dropbear_2015.71-r0_qb2.ipk
Then I re-ran the post-installscript manually, this creates /etc/rc5.d/S10dropbear, which we need in the next step:
Edit that file

Code: Select all

DROPBEAR_EXTRA_ARGS=-B
I created an extra script to install dropbear in runlevel5 (/etc/rc5.d)

Code: Select all

eneco-001-037311:~# cat S50installDropbear
#!/bin/sh

echo Installing dropbear!

opkg -V4 install dropbear_2015.71-r0_qb2.ipk

echo Dropbear installed!
This completed the install succesfully during boot.

You can now login with putty/ssh with root and no password.

It seems that in my setup (possibly due to the reinstall-script?) the '-B'-argument was deleted. Maybe the install in S50 is not required.
Make sure to add it again, before rebooting.
phoenixb
Advanced Member
Advanced Member
Posts: 512
Joined: Thu Jul 23, 2009 1:00 pm
Location: Netherlands

Re: Rooting Toon (or boxx)

Post by phoenixb »

unfortunately i have update an rooted toon to version 4.9.23 so i have lost my ssh connection.
Now when i follow only the first steps i'm not able default come after an reboot into the eneco-xxx-xxxxxx:~# prompt.

Is this related to the installation of dropbear because in the startup log i see the next info

Code: Select all

Starting Dropbear SSH server: dropbear.
But after the Toon is done with the startup i can not login with "root"

small edit, the first step "setenv addmisc setenv bootargs \$\{bootargs\} mem=\$\{mem\} lpj=999424 init=/bin/sh" shows me with printenv:

Code: Select all

U-Boot> printenv                                                                bootdelay=2
baudrate=115200
loadaddr=0xA1000000
bootdelay=2
mtdids=nand0=mxc_nand
mtdparts=mtdparts=mxc_nand:1M(u-boot)ro,512K(u-boot-env)ro,1536K(splash-image),3M(kernel),3M(kernel-backup),119M(rootfs)
mtdparts_kernel=mtdparts=mxc_nand:512K@0x00100000(u-boot-env)ro,1536K(splash-image),3M(kernel),3M(kernel-backup),119M(rootfs)
mem=128M
autoload=no
backlight_brightness=50
baudrate=115200
console=ttymxc0
addtty=setenv bootargs ${bootargs} console=${console},${baudrate}
addmtd=setenv bootargs ${bootargs} ${mtdparts_kernel}
nandargs=setenv bootargs ubi.mtd=4 root=ubi0:rootfs rw rootfstype=ubifs
boot_nand=run nandargs addmtd addtty addmisc; nand read ${loadaddr} kernel; bootm ${loadaddr}
boot_nand_backup=run nandargs addmtd addtty addmisc; nand read ${loadaddr} kernel-backup; bootm ${loadaddr}
bootcmd=run boot_nand
splashimage=0x180000
ethact=FEC
sn=xx-xx-xxx-xxx
pn=6500-1200-38xx
software_compatibility=0
manufacture_date=2013/02
ethaddr=00:0F:11:01:EE:DA
addmisc=setenv bootargs ${bootargs} mem=${mem} lpj=999424 init=/bin/sh
But when i reboot the Toon the last rule is disappeared, is this ok?
__________________
Paul2WR
Starting Member
Starting Member
Posts: 3
Joined: Thu Dec 07, 2017 1:04 am

Re: Rooting Toon (or boxx)

Post by Paul2WR »

Good Evening all, i am new to this forum but eager to start rooting my Toon and integrating it in my home domotica system.

I am a bit confused on which Usb adapter to use, as it clearly states it must be 3,3V, i have found this part on stock which i can puck up tomorrow could any of you conform that this one will do the trick?

I will make a good write up / tutorial including pictures so it will be clear for future rooters."

USB - TTL converter info

USB naar TTL Converter based on the PCP2102 Chip

Image

htfelectronics.nl/nl/usb-naar-ttl-conve ... erter.html

Thank you
gielie
Member
Member
Posts: 70
Joined: Thu Nov 02, 2017 11:06 am

Re: Rooting Toon (or boxx)

Post by gielie »

phoenixb wrote:unfortunately i have update an rooted toon to version 4.9.23 so i have lost my ssh connection.
Now when i follow only the first steps i'm not able default come after an reboot into the eneco-xxx-xxxxxx:~# prompt.

Is this related to the installation of dropbear because in the startup log i see the next info

Code: Select all

Starting Dropbear SSH server: dropbear.
But after the Toon is done with the startup i can not login with "root"

small edit, the first step "setenv addmisc setenv bootargs \$\{bootargs\} mem=\$\{mem\} lpj=999424 init=/bin/sh" shows me with printenv:

Code: Select all

U-Boot> printenv                                                                bootdelay=2
baudrate=115200
loadaddr=0xA1000000
bootdelay=2
mtdids=nand0=mxc_nand
mtdparts=mtdparts=mxc_nand:1M(u-boot)ro,512K(u-boot-env)ro,1536K(splash-image),3M(kernel),3M(kernel-backup),119M(rootfs)
mtdparts_kernel=mtdparts=mxc_nand:512K@0x00100000(u-boot-env)ro,1536K(splash-image),3M(kernel),3M(kernel-backup),119M(rootfs)
mem=128M
autoload=no
backlight_brightness=50
baudrate=115200
console=ttymxc0
addtty=setenv bootargs ${bootargs} console=${console},${baudrate}
addmtd=setenv bootargs ${bootargs} ${mtdparts_kernel}
nandargs=setenv bootargs ubi.mtd=4 root=ubi0:rootfs rw rootfstype=ubifs
boot_nand=run nandargs addmtd addtty addmisc; nand read ${loadaddr} kernel; bootm ${loadaddr}
boot_nand_backup=run nandargs addmtd addtty addmisc; nand read ${loadaddr} kernel-backup; bootm ${loadaddr}
bootcmd=run boot_nand
splashimage=0x180000
ethact=FEC
sn=xx-xx-xxx-xxx
pn=6500-1200-38xx
software_compatibility=0
manufacture_date=2013/02
ethaddr=00:0F:11:01:EE:DA
addmisc=setenv bootargs ${bootargs} mem=${mem} lpj=999424 init=/bin/sh
But when i reboot the Toon the last rule is disappeared, is this ok?
read my post a few pages back.
gielie wrote: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 couldnt figure out what steps i had to take. I tried a lot without any luck. But then i had a bright moment (after some beers) and i only changed the ip table part, which 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.
Rudolf
Member
Member
Posts: 136
Joined: Mon Dec 04, 2017 8:50 pm

Re: Rooting Toon (or boxx)

Post by Rudolf »

phoenixb wrote: But when i reboot the Toon the last rule is disappeared, is this ok?
Yes, this modification is temporary.
You only need a (serial) terminal once; to install dropbear, set a password and configure the firewall.
After that you can login via SSH/dropbear.
Paul2WR
Starting Member
Starting Member
Posts: 3
Joined: Thu Dec 07, 2017 1:04 am

Re: Rooting Toon (or boxx)

Post by Paul2WR »

After a lot of trail and error i got further, i have updated the Toon to 4.9.23.

Followed all instructions and Installed drop-bear over serial with minicom, all went great.

Upon install i received an error regarding the post inst script,

Code: Select all

* pkg_run_script: package "dropbear" postinst script returned status 255.
* opkg_configure: dropbear.postinst returned 255.
i saw the post of Rudolf and did the following:

1: Installed in verbose
2: ran the post install script manually
3: found the file in etc/rc5.d/S10dropbear
4: edited the file modifying:

Code: Select all

DROPBEAR_EXTRA_ARGS=-B
At this point i am not sure how to make the install script, i have made a file in /etc/rc5.d called S50Dropbear with the following script (with my toon id)

Code: Select all

eneco-001-(myid):~# cat S50installDropbear
#!/bin/sh

echo Installing dropbear!

opkg -V4 install dropbear_2015.71-r0_qb2.ipk

echo Dropbear installed!
when i reboot the toon i see permission denied, did i do it right?

ATM i am trying if i can connect via SSH, i do see the server start up, i do not have root access.
Rudolf
Member
Member
Posts: 136
Joined: Mon Dec 04, 2017 8:50 pm

Re: Rooting Toon (or boxx)

Post by Rudolf »

I think the installation in the S50-script is redundant, and actually overwrites/undoes our modification that adds the '-B' argument.

In your situation we can safely assume that dropbear has been installed, so you need to login via serial again; remove the S50-script and re-add the -B-parameter and try again.
(As alternative for -B you could add your public key to /root/.ssh/authorized_keys)
densoft
Starting Member
Starting Member
Posts: 6
Joined: Mon Nov 20, 2017 11:46 am

Re: Rooting Toon (or boxx)

Post by densoft »

Is there any progress for rooting Firmware 4.9.23? :roll:
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 »

Busybox is a bit more stubborn than I thought. It will be a job for the christmas holidays...
Rudolf
Member
Member
Posts: 136
Joined: Mon Dec 04, 2017 8:50 pm

Re: Rooting Toon (or boxx)

Post by Rudolf »

densoft wrote:Is there any progress for rooting Firmware 4.9.23? :roll:
It may not be as straightforward as it used to be; but it's certainly doable.
Did you see the steps above? Happy to help if you get stuck.
wbmk
Starting Member
Starting Member
Posts: 24
Joined: Sun Nov 13, 2016 5:10 pm

Re: Rooting Toon (or boxx)

Post by wbmk »

moved to the right topic, marcelr

Hi all,

I am in the process of rooting my Toon. Luckily i have bootloader U-Boot 2010.09-R8, so i can use a password.

Currently i have a USB-serial connection to my Toon and i am able to get in to the bootloader using Putty (Windows10) and make the modifications to the inittab and passwd files. Did not applied the getty line as i am running the latest Toon firmware.

The settings are saved (double-checked the syntax of the modifications).

Upon rebooting the Toon (using the reset-button), Toon boots normally into runlevel 5, but i can't find any login credentials in the boot-output. It seems as Toon keeps trying to connect to a network endlessly (same output-entry for at least 20 times e.g. 15 minutes) and i do not get a prompt.

Also, the lines 'Eneco Toon by Quby' and 'eneco-001-xxxxxx login:' are not present in the output. (copied it from putty to notepad++ and searched it)

Based on this info, can someone point out to me what i am doing wrong? Or is additional info (e.g. output-log) required?

TIA

Wbmk
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 »

You are probably stuck at /bin/sh, in the serial console, since you state that you saved the bootloader settings.
After rooting, the bootloader should proceed as before rooting, so without the /bin/sh in the addmisc bootloader environment variable. Just redefine it without the init=/bin/sh addition, and save once more.
wbmk
Starting Member
Starting Member
Posts: 24
Joined: Sun Nov 13, 2016 5:10 pm

Re: Rooting Toon (or boxx)

Post by wbmk »

Hi marcelr,

Thanx for moving my post and your fast reply.

So, do i understand correctly that after i made the modifications to inittab en passwd and do a reboot..

i should not let Toob boot normally, but again with the bootloader password and the modified string you mentioned.. e.g.
setenv addmisc setenv bootargs \$\{bootargs\} mem=\$\{mem\} lpj=999424 correct?

and then run:
run boot_nand

i will try this.. thanx

Regards,

Wbmk
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 »

That is correct. In general, there's no need to save the bootloader environment, since it needs changing for a single session only.
Post Reply

Return to “Toon Rooting”