Twonky 7 upgrade

StorCenter ix2-200 Network Storage
Post Reply
goochman
Posts: 13
Joined: Fri Mar 14, 2014 10:39 am

Twonky 7 upgrade

Post by goochman » Fri Mar 14, 2014 10:50 am

Recently my HD went bad on my ix2-200 NAS so during the process of upgrading to 4TB drives I saw that the new Lenovo boxes came with Twonky 7. Figuring this should just be an easy software update after getting SSH enabled I starting digging around the internet and saw its a major hassle!

Anyhow I have 6.0.34, or whatever was the latest Twonky release for the ix2-200. From what I understand now whenever the ix2-200 is turned on/booted up it replaces all the 'system' files from a file called "apps" in the /boot/images folder. This appears to be a zip like file which contains all the apps that run on the box.

Ive seen documents which talk about ftp'ing this file to a Linux machine, running cramfsck -x apps_dir apps to unpack the file, replace the Twonky files, repack, and then replace on the NAS. I have tried this but during the cramfsck procedure I get a superblock magic error which I can seem to figure out.

I believe the Twonky server gets loaded to the /usr/local/twonky directory, but like most things Unix it appears in a # of other directories behind the scenes.

It is my understanding that if you replace the Twonky server on the NAS it will be overwritten on the next boot up from the default in the "apps" image.

So - has anyone been able to successfully upgrade their ix2-200 Twonky server?

Does anyone know the directory where the twonky server runs from on the NAS? Since I keep my box on 24x7 having to recopy every now and then might not be an issue if that works.

Anyone successful performing the cramfsck procedure to unpack the apps file?

Thanks for any help in advance.

goochman
Posts: 13
Joined: Fri Mar 14, 2014 10:39 am

Re: Twonky 7 upgrade

Post by goochman » Fri Mar 14, 2014 9:24 pm

Ok Ive done some more digging and found the following:

This shows how you can install custom apps on the box:
http://iomega.nas-central.org/wiki/Application:FFP

This shows how you can use ffp to install twonky but doesnt talk about the ix2-200:
http://nas-tweaks.net/384/installation- ... s-devices/

Anyone know if this method would work? Id rather just disable the default Twonky 6 server and run a new licensed Twonky 7 server?

Im a newbie on Linux so Im not sure how to do the following from the ffp setup:
After installing the box will have a login-less telnet daemon started, and an ssh daemon. You can telnet to the box and get a root shell, or login as root (password soho<your-admin-password>) over ssh. By executing
passwd admin
you can enable shell access for admin.
If ssh login works, you can disable the telnet daemon:
/ffp/start/telnetd.sh stop
chmod a-x /ffp/start/telnetd.sh
When you have sftp enabled, the sshd daemon will fail to start. You might want to use a different port:
-----------
Currently I have SSH enabled on my ix2-200 box and can connect via putty with root access. SSH is enabled on port 23 since something else was on port 22.

ffp is now installed and running but it appears above I need to connect and change its port - thats what I dont understand?

Mijzelf
Posts: 6199
Joined: Mon Jun 16, 2008 10:45 am

Re: Twonky 7 upgrade

Post by Mijzelf » Sat Mar 15, 2014 9:25 am

If you already have ssh access, there is no need to use the ffp-ssh. It doesn't add anything. The ffp start script will change the root shell from /bin/sh to /ffp/bin/sh, so the firmware ssh just gives you the same shell/environment.

About Twonky on ffp, it might work on your box either. The package to be installed is actually compiled for the Kuro Box Pro, so it might be dependent on some libraries from that box, but as the package also runs on D-Link boxes, I guess these libraries are very common, if there is a dependency.

The directions are intended to install Twonky on a D-Link. The data partition of a D-Link is mounted on /mnt/HD_a2/, while the data partition of an Iomega is mounted on /mnt/pools/A. When I remember well the startscript of ffp also creates a symlink /mnt/HD_a2 to /mnt/pools/A, especially to make this kind of tutorials fit.

About the apps file, as far as I remember it contains a filesystem, which is loopmounted somewhere. (On a *nix system everything is a file, even if it isn't. This means a partition is also a file, and that means an ordinary file can be treated as a partition. That is what loopmounting does, mounting a file as if it was a partition). Unfortunately the file is mounted read-only, and it cannot be remounted as the filesystem is busy. But the file (apps) can be renamed. That means you can put another apps next to it, and reboot the box to get it active. But if you make a mistake in generating the new apps file, the box might not boot anymore.

If twonky is installed in /usr/local/twonky, you could also use a bindmount to 'overwrite' it. Assuming Twonky 7 is installed in /mnt/pools/A/twonky7:

Code: Select all

mount --bind /mnt/pools/A/twonky7 /usr/local/twonky
Restart twonky, and it should use the new one. This is not persistent, the bindmount (and restarting of twonky) should be done on each boot. But you could use a script in /ffp/start/ for that.

goochman
Posts: 13
Joined: Fri Mar 14, 2014 10:39 am

Re: Twonky 7 upgrade

Post by goochman » Sat Mar 15, 2014 11:15 pm

Mijzelf,

Thanks for the info. Id like to not run Twonky 6 and have Twony 7 run from wherever I can without losing this upon bootup.

I dont know what to do to have an autoscript run. Could you provide some directions on that to put the mount into and I think I should be good.

goochman
Posts: 13
Joined: Fri Mar 14, 2014 10:39 am

Re: Twonky 7 upgrade

Post by goochman » Sat Mar 15, 2014 11:19 pm

Sorry I did have one more question on how to install twonky into that directory mentioned above.

I presume some modification of these directions would get me there(I would change the http URL to the Kirkwood install):

mkdir -p /mnt/pools/A/twonky7
cd /mnt/pools/A/twonky7
wget http://www.twonkyforum.com/downloads/7. ... 7.0.11.zip
unzip twonky-*.zip
rm twonky-*.zip
chmod +x twonkyserver twonkystarter twonkyproxy twonkywebdav plugins/* cgi-bin/*
wget http://wolf-u.li/u/449 -O /ffp/start/twonky.sh
wget http://wolf-u.li/u/448 -O /ffp/opt/twonky/twonkyserver-default.ini

Mijzelf
Posts: 6199
Joined: Mon Jun 16, 2008 10:45 am

Re: Twonky 7 upgrade

Post by Mijzelf » Sun Mar 16, 2014 10:01 am

goochman wrote:I dont know what to do to have an autoscript run. Could you provide some directions on that to put the mount into and I think I should be good.
When you have installed ffp, the 'ffp engine' will call all executable /ffp/start/*.sh

So you can create a script /ffp/start/exchange_twonky.sh:

Code: Select all

#!/bin/sh

if mount | grep /usr/local/twonky
then
    # This script is already executed once. Exit here
    exit 0
fi

mount --bind /mnt/pool/A/twonky7 /usr/local/twonky

# restart twonky. 
killall twonky
/usr/local/twonky/twonky  # Maybe it's necessary to provide some command line options. 
# And maybe the executable is not 'twonky'. Just don't know
And make it executable:

Code: Select all

chmod a+x /ffp/start/exchange_twonky.sh
goochman wrote:Sorry I did have one more question on how to install twonky into that directory mentioned above.

<snip>
I don't see a question here?

goochman
Posts: 13
Joined: Fri Mar 14, 2014 10:39 am

Re: Twonky 7 upgrade

Post by goochman » Mon Mar 17, 2014 3:14 pm

Thanks again for your help. Ive got the new Twonky server up and running. I spent a bit more time reading through the instructions and realized it basically did everything for me :)

For the ix2-200 just perform the instructions on these 2 sites except you need to download the Kirkwood edition of Twonky:

This shows how you can install custom apps on the box:
http://iomega.nas-central.org/wiki/Application:FFP

This shows how you can use ffp to install twonky:
http://nas-tweaks.net/384/installation- ... s-devices/

Its pretty straight forward for those that want to upgrade their Twonky server.

Things I still have to do:

1. Reboot my ix2-200 and see if Twonky7 restarts
2. Find the process that is running Twonky6 on the ix2-200. Its not apparent the process so I cant kill it. Twonky7 runs on a different port, but Id like to remove the confusion and kill the OEM 6 version.

Mijzelf
Posts: 6199
Joined: Mon Jun 16, 2008 10:45 am

Re: Twonky 7 upgrade

Post by Mijzelf » Mon Mar 17, 2014 7:44 pm

goochman wrote:Things I still have to do:

2. Find the process that is running Twonky6 on the ix2-200.
There might be a '/var/run/twonky.pid' file, or something like that, which contains the pid of the running twonky daemon. If so, you can kill the process by executing

Code: Select all

kill ` cat /var/run/twonky.pid `
(The single quotes are not 'normal' single quotes).
If not, you can see the pid by executing

Code: Select all

netstat -ltn
and search for the port twonky6 has open. If you rather see the process name, you can execute

Code: Select all

netstat -ltnp

goochman
Posts: 13
Joined: Fri Mar 14, 2014 10:39 am

Re: Twonky 7 upgrade

Post by goochman » Mon Mar 17, 2014 8:45 pm

Thanks again!

Ok here is what I found. Port 50599 is v6 and Port 9000 is v7. I dont know what 9443 is and trying to navigate to that URL yields nothing.

tcp 0 0 192.168.1.4:9443 0.0.0.0:* LISTEN 27467/twonkyserver
tcp 0 0 127.0.0.1:9443 0.0.0.0:* LISTEN 27467/twonkyserver
tcp 0 0 192.168.1.4:50599 0.0.0.0:* LISTEN 21867/twonkymediase
tcp 0 0 127.0.0.1:50599 0.0.0.0:* LISTEN 21867/twonkymediase
tcp 0 0 192.168.1.4:9000 0.0.0.0:* LISTEN 27467/twonkyserver
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 27467/twonkyserver

I tried to do

Code: Select all

killall twonkymediase
and it responded that the process was not found so not sure what I am missing here?

I used the ix2-200 Web interface to shutdown the v6 Twonky server previously but for some reason it still showed up as a DLNA device on my Media player (I saw the Twonky v6 Media Server and the new Twonky7 Media Server).

When selecting the v6 DLNA entry no media was found (made sense) - but I must be missing something to kill its DLNA broadcast?

Mijzelf
Posts: 6199
Joined: Mon Jun 16, 2008 10:45 am

Re: Twonky 7 upgrade

Post by Mijzelf » Mon Mar 17, 2014 9:18 pm

The name is truncated. Apparently netstat only shows the first n characters. I guess the name is twonkymediaserver. If that doesn't fit either, try 'ps' or 'ps -A' to find the whole name.

goochman
Posts: 13
Joined: Fri Mar 14, 2014 10:39 am

Re: Twonky 7 upgrade

Post by goochman » Mon Mar 17, 2014 11:45 pm

I think success - I turned the v6 server off and rebooted the box. Upon restart only the v7 Twonky server was running.

Thanks for all the help - the other instructions on the web offer some whacky advice when it was pretty straight forward install!

goochman
Posts: 13
Joined: Fri Mar 14, 2014 10:39 am

Re: Twonky 7 upgrade

Post by goochman » Mon Mar 17, 2014 11:57 pm

Mijzelf wrote:The name is truncated. Apparently netstat only shows the first n characters. I guess the name is twonkymediaserver. If that doesn't fit either, try 'ps' or 'ps -A' to find the whole name.
You are probably right. I thought the 'se' at the end stood for like a restricted edition that you would get for free on a NAS and not the full version, but its probably truncated for server :)

furfoots
Posts: 1
Joined: Thu Jun 05, 2014 1:07 pm

Re: Twonky 7 upgrade

Post by furfoots » Thu Jun 05, 2014 1:10 pm

I assume by IX2 you mean the IX2-200, mine seems to come with twonky 4.xx? Is there a more specific guide to updaring? I can't seem to install FFP on my IX2-200.

Freedom1976
Posts: 1
Joined: Sun Aug 10, 2014 9:16 pm

Re: Twonky 7 upgrade

Post by Freedom1976 » Sun Aug 10, 2014 9:20 pm

Hi Goochman, Is your move from twonky 6 to 7 on you Ix2-200 is a success?

If yes, can you post a procedure to do it. I have some skill with computer but not with Linux...

Thanks!

goochman
Posts: 13
Joined: Fri Mar 14, 2014 10:39 am

Re: Twonky 7 upgrade

Post by goochman » Fri Aug 15, 2014 6:56 pm

Freedom1976 wrote:Hi Goochman, Is your move from twonky 6 to 7 on you Ix2-200 is a success?

If yes, can you post a procedure to do it. I have some skill with computer but not with Linux...

Thanks!
I did - all my notes are listed in this msg thread. Im not a Unix guy either but know the basics. The websites I list above help with getting things going.

Post Reply